您好,登錄后才能下訂單哦!
操作系統: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
#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)
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。