安装php

下载地址http://www.php.net/downloads.php

一、安装php

1. wget 'http://cn.php.net/distributions/php-5.4.8.tar.bz2'

2. tar jxvf php-5.4.8.tar.bz2 

3. ./configure       --prefix=/usr/local/php       --with-config-file-path=/usr/local/php/etc  --with-curl       --with-pear        --with-gd       --with-jpeg-dir        --with-png-dir       --with-zlib      --with-xpm-dir        --with-freetype-dir       --with-t1lib        --with-mcrypt       --with-mhash        --with-mysql       --with-mysqli       --with-pdo-mysql        --with-openssl       --with-xmlrpc        --with-xsl           --with-gettext       --with-fpm-user=jzy        --with-fpm-group       --enable-fpm        --enable-exif       --enable-wddx       --enable-zip        --enable-bcmath       --enable-calendar        --enable-ftp       --enable-mbstring        --enable-soap       --enable-sockets             --enable-shmop        --enable-dba       --enable-sysvmsg       --enable-sysvsem        --enable-sysvshm  --enable-pcntl 

4.make

5.sudo make install

6.加入环境变量vim /etc/profile

export PHP_HOME=/usr/local/php 
export PATH=$PHP_HOME/bin:$PATH

7. source /etc/profile就可以执行php命令

8.添加php.ini

sudo cp php.ini-development /usr/local/php/etc/php.ini

9. 依赖环境安装

(3)yum install gcc

(4)yum install libxml2

(5)yum install libxml2-devel

(6)yum install openssl openssl-devel

(7)yum install bzip2 bzip2-devel

(8)yum install curl curl-devel

(9)yum install libjpeg libjpeg-devel

(10) yum install libpng libpng-devel

(11)yum install freetype-devel

(12)yum install gmp-devel

(13)yum install libXpm-devel

(14)yum install t1lib-devel

(15)rpm -ivh "http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm"

(16)yum install  libmcrypt libmcrypt-devel

(17)yum install libxslt  libxslt-devel

(18)yum install make



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值