linux系统之PHP7.0.*版本升级到PHP7.2.*版本

之前系统中安装的PHP扩展包,可进行:

$ yum remove php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64 php70w-mysql.x86_64 php70w-pdo.x86_64
$ yum remove php70w-fpm php70w-opcache

    
    
    
    
  • 1
  • 2

要是忘记之前安装的扩展包:

$ yum remove php*

    
    
    
    
  • 1

查看可使用的php包:

$ yum list | grep php

    
    
    
    
  • 1

PHP源可不用删除,可以更新,也可不必执行此操作:

$ rpm -Uvh  https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm 
$ rpm -Uvh  http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

    
    
    
    
  • 1
  • 2

然后直接安装PHP7.2.*的扩展包:

$ yum install php72w php72w-cli php72w-common php72w-devel php72w-embedded php72w-fpm php72w-gd php72w-mbstring php72w-mysqlnd php72w-opcache php72w-pdo php72w-xml php72w-ldap php72w-mcrypt

    
    
    
    
  • 1

然后可查看PHP已安装的扩展包:

$ yum list installed |grep php

    
    
    
    
  • 1

然后启动php-fpm:

$ systemctl start php-fpm

    
    
    
    
  • 1

其实在下次安装的时候直接可以安装PHP7.2.*的扩展包。

你可能感兴趣的:(Linux之系统(安防))