您的足迹:首页 > 经验技术 >php 5.6.14 升级笔记

php 5.6.14 升级笔记

博主我用的是lnmp架构的amh4.2面板,如果自己安装的话,可能某些路径不一定一样,依葫芦画瓢应该也很简单~

目前最新版是5.6.14版本

首先wget一下php的源码压缩包

wget http://php.net/get/php-5.6.14.tar.bz2/from/a/mirror


然后

tar zxvf php-5.6.14.tar.gz
cd php-5.6.14

执行预编译

./configure --prefix=/usr/local/php --enable-fpm --with-fpm-user=www --with-fpm-group=www --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --with-openssl --with-zlib --with-curl --enable-ftp --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --enable-gd-native-ttf --enable-mbstring --enable-zip --with-iconv=/usr/local/libiconv --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pdo-mysql=/usr/local/mysql --without-pear --disable-fileinfo --enable-opcache

编译

make -j 3
make install

(-j的意思是使用多核cpu,这样能让编译速度加快,不过容易导致ssh掉线,因为我的cpu是4核的,所以我这里4-1=3,留出一个线程这样不容易死机)

好了,这样就已经升级完毕了

我用的是amh面板,所以还要加几句:

找到 /usr/local/php/etc/ 目录

修改如下文件

php-fpm.conf

;include=etc/fpm/*.conf

[global]
pid = run/php-fpm.pid
log_level = error

[www]
listen = /tmp/php-cgi.sock
listen.owner = www
listen.group = www
listen.mode = 0660
user = www
group = www
pm = static
pm.max_children = 25
pm.start_servers = 17
pm.min_spare_servers = 3
pm.max_spare_servers = 25
request_terminate_timeout = 10s

rlimit_files = 51200


php-fpm-template.conf

[global]
pid = run/php-fpm.pid
log_level = error

[example]
listen = /tmp/php-cgi.sock
listen.owner = www
listen.group = www
listen.mode = 0660
user = www
group = www
pm = dynamic
pm.max_children = 25
pm.start_servers = 17
pm.min_spare_servers = 3
pm.max_spare_servers = 25
request_terminate_timeout = 10s

rlimit_files = 51200
chroot = amysql.com

OK 完工~

本博客所有文章如无特别注明均为原创。作者:Lance.Moe复制或转载请以超链接形式注明转自 Lance's Blog
原文地址《php 5.6.14 升级笔记

相关推荐

发表评论

路人甲 表情
看不清楚?点图切换 Ctrl+Enter快速提交

网友评论(0)