wdcp 升级php7,WDCP 升级 PHP7 记录

据说性能有显著提升,

1、clone源码

git clone https://git.php.net/repository/php-src.git

2、进入 ./configure

./configure --prefix=/www/wdlinux/nginx_php-7.0.0 \

--with-config-file-path=/www/wdlinux/nginx_php-7.0.0/etc \

--with-mcrypt=/usr/include \

--with-mysql=mysqlnd \

--with-mysqli=mysqlnd \

--with-pdo-mysql=mysqlnd \

--with-gd \

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

--with-zlib \

--enable-xml \

--enable-bcmath \

--enable-shmop \

--enable-sysvsem \

--enable-inline-optimization \

--enable-mbregex \

--enable-fpm \

--enable-mbstring \

--enable-ftp \

--enable-gd-native-ttf \

--with-openssl \

--enable-pcntl \

--enable-sockets \

--with-xmlrpc \

--enable-zip \

--enable-soap \

--without-pear \

--with-gettext \

--enable-session \

--with-curl \

--with-jpeg-dir \

--with-freetype-dir \

--with-fpm-group=www \

--with-fpm-user=www \

--enable-opcache

PS:遇到 libiconv 问题,就去下载一个libiconv 并且把路径配置上.

3、安装,配置。

make

make install

cp php.ini-production /www/wdlinux/nginx_php-7.0.0/etc/php.ini

sed -i 's/short_open_tag = Off/short_open_tag = On/g' /www/wdlinux/nginx_php-7.0.0/etc/php.ini

service php-fpm stop

rm -f /www/wdlinux/nginx_php

ln -sf /www/wdlinux/nginx_php-7.0.0 /www/wdlinux/nginx_php

cp /www/wdlinux/nginx_php-7.0.0/etc/php-fpm.conf.default /www/wdlinux/nginx_php-7.0.0/etc/php-fpm.conf

sed -i 's/user = nobody/user = www/g' /www/wdlinux/nginx_php/etc/php-fpm.conf

sed -i 's/group = nobody/group = www/g' /www/wdlinux/nginx_php/etc/php-fpm.conf

sed -i 's/;pid =/pid =/g' /www/wdlinux/nginx_php/etc/php-fpm.conf

cp -f sapi/fpm/init.d.php-fpm /www/wdlinux/init.d/php-fpm

chmod 755 /www/wdlinux/init.d/php-fpm

mv /www/wdlinux/nginx_php/etc/php-fpm.d/www.conf.default /www/wdlinux/nginx_php/etc/php-fpm.d/www.conf

参考了一下网上的升级5.6的脚本


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部