• 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
  • 相关阅读:
    【2021-06-14】何太第一次喝断片
    【2021-06-13】管理的目标也就是把事情做好
    判断字符串的两半是否相等
    生成每种字符都是奇数个的字符串
    叶子相似的树
    面试准备
    北京旅行计划
    M笔试
    连续字符
    字符串中第一个唯一字符
  • 原文地址:https://www.cnblogs.com/iitrust/p/12324507.html
Copyright © 2020-2023  润新知