Contents
  1. 1. 记录CentOS6.5升级PHP7.0
    1. 1.1. 检查系统版本
    2. 1.2. 卸载旧版本
    3. 1.3. 更新源
    4. 1.4. 安装

记录CentOS6.5升级PHP7.0

检查系统版本

1
2
3
cat /etc/centos-release

# CentOS release 6.5 (Final)

卸载旧版本

1
2
3
4
5
6
7
8
9
10
11
12
13
14
yum list installed |grep php

php56w.x86_64 5.6.30-1.w6 @webtatic
php56w-cli.x86_64 5.6.30-1.w6 @webtatic
php56w-common.x86_64 5.6.30-1.w6 @webtatic
php56w-gd.x86_64 5.6.30-1.w6 @webtatic
php56w-ldap.x86_64 5.6.30-1.w6 @webtatic
php56w-mbstring.x86_64 5.6.30-1.w6 @webtatic
php56w-mysql.x86_64 5.6.30-1.w6 @webtatic
php56w-odbc.x86_64 5.6.30-1.w6 @webtatic
php56w-pdo.x86_64 5.6.30-1.w6 @webtatic
php56w-soap.x86_64 5.6.30-1.w6 @webtatic
php56w-xml.x86_64 5.6.30-1.w6 @webtatic
php56w-xmlrpc.x86_64 5.6.30-1.w6 @webtatic

卸载:

1
yum remove php56w.x86_64 php56w-cli.x86_64 php56w-common.x86_64 php56w-gd.x86_64 php56w-ldap.x86_64 php56w-mbstring.x86_64 php56w-mysql.x86_64 php56w-odbc.x86_64 php56w-pdo.x86_64 php56w-soap.x86_64 php56w-xml.x86_64 php56w-xmlrpc.x86_64

更新源

1
2
3
4
5
6
7
# CentOS/RHEL 7.x:
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

#CentOS/RHEL 6.x:
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm

安装

1
yum install php70w

其它模块[optional]

1
yum install php70w-bcmath php70w-dba php70w-devel php70w-embedded php70w-enchant php70w-fpm php70w-gd php70w-imap php70w-interbase php70w-intl php70w-ldap php70w-mbstring php70w-mcrypt php70w-mysql php70w-mysqlnd php70w-odbc php70w-opcache php70w-pdo php70w-pdo_dblib php70w-pear php70w-pecl-apcu php70w-pecl-imagick php70w-pecl-xdebug php70w-pgsql php70w-phpdbg php70w-process php70w-pspell php70w-recode php70w-snmp php70w-soap php70w-tidy php70w-xml php70w-xmlrpc

一次性安装可能有冲突报错,根据所需模块,逐个安装即可。

1
2
3
4
5
yum install php70w-bcmath  #支持大整数计算模块
yum install php70w-imap
yum install php70w-fpm
yum install php70w-ldap
yum install php70w-mbstring php70w-mcrypt

    
        
        版权声明:
        本文由Lomo创作和发表,采用署名(BY)-非商业性使用(NC)-相同方式共享(SA)国际许可协议进行许可,
        转载请注明作者及出处,本文作者为Lomo,本文标题为CentOS upgrade PHP TO 7.0.
    
    


 Leave a message ^_^:

Contents
  1. 1. 记录CentOS6.5升级PHP7.0
    1. 1.1. 检查系统版本
    2. 1.2. 卸载旧版本
    3. 1.3. 更新源
    4. 1.4. 安装