189 8069 5689

源码安装php-5.6.30.tar.gz

操作系统:CentOSrelease 6.8 (Final)

创新互联2013年至今,先为宜春等服务建站,宜春等地企业,进行企业商务咨询服务。为宜春企业网站制作PC+手机+微官网三网同步一站式服务解决您的所有建站问题。

虚拟机:VMware

PHP软件包:php-5.6.30.tar.gz

安装步骤如下:

[root@localhost tools]# tar zxf php-5.6.30.tar.gz

[root@localhost tools]# cd php-5.6.30

[root@localhost tools]#

wget http://cn.php.net/distributions/php-5.6.30.tar.gz

[root@localhost php-5.6.30]#yum install zlib-devel libxml2-devel libjpeg-devel libjpeg-turbo-devellibiconv-devel -y #安装相关的lib软件包

[root@localhost php-5.6.30]#yum install freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devellibxslt-devel –y  #安装相关的lib软件包

[root@localhost php-5.6.30]#./configure \

--prefix=/application/php-5.6.30 \

--with-MySQL=/application/mysql \

--with-iconv-dir=/usr/local/libiconv \

--enable-fpm \

--enable-mbstring \

 --with-mcrypt \

 --with-gd \

 --with-openssl \

 --with-mhash \

 --enable-pcntl \

 --enable-sockets \

 --with-xmlrpc \

 --enable-zip \

 --enable-short-tags \

 --enable-static \

 --with-xsl \

 --with-fpm-user=nginx \

 --with-fpm-group=nginx \

--enable-opcache=no

#make && make install

设置软链接:#ln -s /application/php-5.6.30/  /application/php

拷贝PHP配置文件到PHP默认目录: cp php.ini-production  /application/php/lib/php.ini

配置php-fpm.conf文件:cp php-fpm.conf.default  php-fpm.conf

启动php服务php-fpm, 命令行:/application/php/sbin/php-fpm

检查php服务php-fpm的进程及端口的情况,命令如下:

[root@localhost nginx]# ps -ef|grep php-fpm

root     12228     1  0 13:42 ?        00:00:00 php-fpm: master process (/application/php-5.6.30/etc/php-fpm.conf)

nginx    12229 12228  0 13:42 ?        00:00:00 php-fpm: pool www            

nginx    12230 12228  0 13:42 ?        00:00:00 php-fpm: pool www            

root     12301  1708  0 14:01 pts/1    00:00:00 grep php-fpm

[root@localhost nginx]# lsof -i :9000

COMMAND   PID  USER   FD   TYPE DEVICE SIZE/OFF NODE NAME

php-fpm 12228  root    7u  IPv4 195435      0t0  TCP localhost:cslistener (LISTEN)

php-fpm 12229 nginx    0u  IPv4 195435      0t0  TCP localhost:cslistener (LISTEN)

php-fpm 12230 nginx    0u  IPv4 195435      0t0  TCP localhost:cslistener (LISTEN)

附件:http://down.51cto.com/data/2366726

网站题目:源码安装php-5.6.30.tar.gz
文章网址:http://cdxtjz.cn/article/iidjcc.html

其他资讯