iRedmail的php由5.4升级到5.6
Posted iitrust
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了iRedmail的php由5.4升级到5.6相关的知识,希望对你有一定的参考价值。
安装ireadmail时,自带的php是5.4,打算升级到5.6。
升级前注意备份原来的/etc/php-fpm.d下的www.conf,文件内容如下:
[inet] user = nginx group = nginx listen = 127.0.0.1:9999 listen.owner = nginx listen.group = nginx listen.mode = 0660 ; IP addresses must be separated by comma, and no space between comma and ip. listen.allowed_clients = 127.0.0.1 pm = dynamic pm.max_children = 100 pm.start_servers = 5 pm.min_spare_servers = 5 pm.max_spare_servers = 10 pm.max_requests = 100 pm.status_path = /status ping.path = /ping request_terminate_timeout = 60s request_slowlog_timeout = 10s ; ; Log files ; access.log = /var/log/php-fpm/php-fpm.log slowlog = /var/log/php-fpm/slow.log
还要备份一下/etc/php.ini,以便升级后对照修改.特别是禁用的相关函数部分,最好与5.4时一致,不然可能会邮件系统功能会有影响
接下来开始升级,先删除原来的
yum remove php php-common
centos7下的源
yum install epel-release rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
安装
yum install -y --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof php-fpm
因为是nginx,所以完了之后安装php-fpm
yum install --enablerepo=remi --enablerepo=remi-php56 php-fpm
对了,先别急重启,对照修改一下开篇提到的两个配置文件,之后,重启fpm和nginx
systemctl start php-fpm
systemctl restart nginx
以上是关于iRedmail的php由5.4升级到5.6的主要内容,如果未能解决你的问题,请参考以下文章
Mac 将 PHP 升级到 5.6,但是 CLI php -v 得到 5.3.28?