美文网首页
通过yum把php5.4升级到php5.6

通过yum把php5.4升级到php5.6

作者: 邵俊颖 | 来源:发表于2018-08-20 20:38 被阅读0次

    https://blog.csdn.net/Naught00/article/details/54879937

    查看php版本

    php -v

    检查当前安装的php包

    yum list installed | grep php

    解决“Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast”问题,没有遇到可以跳过;

    yum clean all

    删除安装的PHP包

    yum remove php.x86_64 php-cli.x86_64 php-common.x86_64 php-gd.x86_64 php-ldap.x86_64 php-mbstring.x86_64 php-mysql.x86_64 php-odbc.x86_64 php-pdo.x86_64 php-process.x86_64 php-xml.x86_64 php-xmlrpc.x86_64

    升级包

    Centos 5.X

    rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpm

    CentOs 6.x

    rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm

    CentOs 7.X

    rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
    rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

    另外,如果想删除上面安装的包,重新安装,可以先查询

    rpm -qa | grep webtatic

    然后删除

    rpm -e “输入上面搜索到的包即可”

    安装php 5.6

    // 5.5 执行下面
    yum install php55w.x86_64 php55w-cli.x86_64 php55w-common.x86_64 php55w-gd.x86_64 php55w-ldap.x86_64 php55w-mbstring.x86_64 php55w-mcrypt.x86_64 php55w-mysql.x86_64 php55w-pdo.x86_64

    // 5.6 执行下面
    yum install php56w.x86_64 php56w-cli.x86_64 php56w-common.x86_64 php56w-gd.x86_64 php56w-ldap.x86_64 php56w-mbstring.x86_64 php56w-mcrypt.x86_64 php56w-mysql.x86_64 php56w-pdo.x86_64

    安装PHP FPM

    yum install php55w-fpm
    yum install php56w-fpm
    yum install php70w-fpm

    相关文章

      网友评论

          本文标题:通过yum把php5.4升级到php5.6

          本文链接:https://www.haomeiwen.com/subject/kbcriftx.html