码迷,mamicode.com
首页 > Web开发 > 详细

源码安装php-5.6.30.tar.gz

时间:2017-06-06 18:28:29      阅读:228      评论:0      收藏:0      [点我收藏+]

标签:php   虚拟机   操作系统   软件包   php-fpm   

操作系统:CentOSrelease 6.8 (Final)

虚拟机: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

设置软链接:#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)


本文出自 “sky9890” 博客,请务必保留此出处http://sky9896.blog.51cto.com/2330653/1932749

源码安装php-5.6.30.tar.gz

标签:php   虚拟机   操作系统   软件包   php-fpm   

原文地址:http://sky9896.blog.51cto.com/2330653/1932749

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!