CentOS6.8升级PHP到7.0

1.停止PHP服务

    service php-fpm stop

2.卸载PHP

    rpm -qa|grep php
    rpm remove php*

3.更新源

    rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
    rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm

4.安装php及相应扩展

    #查看源 有7.0 | 7.1 | 7.1w |  7.2
    yum list php* 
    #安装
    yum install php70w.x86_64 php70w-opcache.x86_64 php70w-pdo.x86_64 php70w-fpm.x86_64 php70w-mysql.x86_64 php70w-gd.x86_64 libjpeg* php70w-ldap.x86_64 php70w-odbc.x86_64 php70w-pear.noarch php70w-xml.x86_64 php70w-xmlrpc.x86_64 php70w-mbstring.x86_64 php70w-bcmath.x86_64 php-mhash php70w-pecl-redis.x86_64

你可能感兴趣的:(PHP,linux,服务器环境搭建,升级PHP,CentOS6.8,PHP7)