美文网首页
centos lanmp环境php5升级为php7

centos lanmp环境php5升级为php7

作者: marility | 来源:发表于2017-05-26 17:49 被阅读0次

    centos lanmp环境php5升级为php7

    更新yum repo
    rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
    yum clean all
    yum make cache
    yum repolist 查看是否有webtatic源
    
    卸载现有版本的php
    systemctl stop php-fpm
    yum -y remove php*
    
    安装新的php7及对应的扩展
    yum install libxml2-devel gd-devel freetype-devel libmcrypt-devel curl curl-devel
    yum install php70w-fpm.x86_64  php70w-common.x86_64 php70w-devel.x86_64
    yum install php70w-mbstring.x86_64  php70w-mcrypt.x86_64 php70w-mysqlnd.x86_64
    yum install php70w-pdo.x86_64  php70w-pgsql.x86_64
    
    启动新有的php环境
    systemctl start php-fpm
    ss -tnlp 查看9000端口,确认php-fpm已经工作
    php-fpm -v 查看现在php的版本
    

    相关文章

      网友评论

          本文标题:centos lanmp环境php5升级为php7

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