php-5.6.31.tar.gz 使用搜狐镜像进行下载.
wget'http://mirrors.sohu.com/php/php-5.6.31.tar.gz'
step 4 编译安装
tar zxf php-5.6.31.tar.gz
cd php-5.6.31
./configure \
--prefix=/application/php5.6.31\
--with-mysql=/application/mysql#如果没进行step2 则 --enable-mysqld \--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-openssl \
--with-iconv-dir=/usr/local/libiconv \
--with-freetype-dir \
--with-jpeg-dir \
--with-png-dir \
--with-zlib \
--with-libxml-dir=/usr \
--enable-xml \
--disable-rpath \
--enable-bcmath \
--enable-shmop \
--enable-sysvsem \
--enable-inline-optimization \
--with-curl \
--enable-mbregex \
--enable-fpm \
--enable-mbstring \
--with-mcrypt \
--with-gd \
--enable-gd-native-ttf \
--with-xmlrpc \
--enable-zip \
--enable-soap \
--enable-short-tags \
--enable-static \
--with-xsl \
--with-fpm-user=nginx \
--with-fpm-group=nginx \
--enable-ftp
https://blog.csdn.net/qq_34853874/article/details/76222519
安装php5.6.31
./configure --prefix=/usr/local/php --enable-mysqld --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-openssl --with-iconv-dir=/usr/local/libiconv --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-fpm --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-xmlrpc --enable-zip --enable-soap --enable-short-tags --enable-static --with-xsl --with-fpm-user=nginx --with-fpm-group=nginx --enable-ftp
make&&makeinstall
step 5 初始化PHP配置引擎文件
建立软链接
ln -s /application/php-5.6.31/application/php
初始化php.ini文件
cd /php-5.6.31# 进入安装包目录cpphp.ini-production /application/php/lib/php.ini
step 6 初始化PHP服务(FastCGI)配置文件
cd /application/php/etc/
cpphp-fpm.conf.defaultphp-fpm.conf
step 7 开启php-fpm服务
启动
/application/php/sbin/php-fpm
检查
netstat -ltunp| grep 9000#或者
lsof -i :9000
网友评论