linux下php环境搭建_PHP_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > PHP > linux下php环境搭建

linux下php环境搭建

 2012/4/24 17:14:22  fireDragonpzy  程序员俱乐部  我要评论(0)
  • 摘要:1.卸载自带的phprpm-qa|grepphpyum-yremovephp*2.tarzxvflibiconv-1.14.tar.gzcdlibiconv-1.14./configureprefix=/usr/local/libiconvmake&&makeinstall3.tar-zxvflibxml2-2.6.30.tar.gzcdlibxml2-2.6.30./configureprefix=/usr/local/libxml2/--enable
  • 标签: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  

http://www.linuxde.net/2011/06/29.html
发表评论
用户名: 匿名