linux下php环境搭建

1.卸载自带的php
rpm -qa|grep php
yum -y remove php*

2.tar zxvf libiconv-1.14.tar.gz
cd libiconv-1.14
./configure prefix=/usr/local/libiconv
make && make install

3.tar -zxvf libxml2-2.6.30.tar.gz
cd libxml2-2.6.30
./configure prefix=/usr/local/libxml2/ --enable-shared
make
make install

4./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/include/mysql --with-mysqli=/usr/bin/mysql_config --with-mysql-sock=/var/lib/mysql/mysql.sock --with-jpeg-dir --with-iconv=/usr/local/libiconv/ --with-libxml-dir=/usr/local/libxml2 --with-zlib --with-png-dir --with-curl --with-ldap --with-xmlrpc --with-openssl --with-mhash --with-mcrypt --with-freetype-dir --with-ldap-sasl --with-curlwrappers --enable-xml --enable-shared --enable-discard-path --enable-safe-mode --enable-bcmath --enable-sysvsem --enable-inline-optimization --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring=all --enable-pcntl --enable-sockets --enable-zip --enable-soap
cp php.ini-dist /usr/local/php/etc/php.ini
#修改php-fpm.conf
vi /usr/local/php/etc/php-fpm.conf
#查找63,66行将注释去掉
<value name=“user”>nobody</value>
<value name=“group”>nobody</value>

5 vi /etc/profile #把php/php-fpm服务加入系统环境变量:在最后添加下面这一行
export PATH=$PATH:/usr/local/php/bin
export PATH=$PATH:/usr/local/php/sbin
. /etc/profile #使其生效
/usr/local/php/sbin/php-fpm start

[url]http://www.linuxde.net/2011/06/29.html[/url]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值