CENTOS 7平滑升级PHP到最新版7.3
安装Remi和EPEL数据源(仓库)
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm rpm -Uvh https://rpms.remirepo.net/enterprise/remi-release-7.rpm
编辑Remi(基本不需要调整)
vi /etc/yum.repos.d/remi.repo
[remi] name=Remi's RPM repository for Enterprise Linux 7 - $basearch #baseurl=http://rpms.remirepo.net/enterprise/7/remi/$basearch/ #mirrorlist=https://rpms.remirepo.net/enterprise/7/remi/httpsmirror mirrorlist=http://cdn.remirepo.net/enterprise/7/remi/mirror enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
启用Remi PHP7.3数据源(主要调整位置:enabled=1)
vi /etc/yum.repos.d/remi-php73.repo
[remi-php73] name=Remi's PHP 7.3 RPM repository for Enterprise Linux 7 - $basearch #baseurl=http://rpms.remirepo.net/enterprise/7/php73/$basearch/ mirrorlist=https://rpms.remirepo.net/enterprise/7/php73/httpsmirror mirrorlist=http://cdn.remirepo.net/enterprise/7/php73/mirror enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
升级php到php7.3
yum -y upgrade php*
检查php版本
php -v
PHP 7.3.23 (cli) (built: Sep 29 2020 08:33:03) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.23, Copyright (c) 1998-2018 Zend Technologies
重启php-fpm
systemctl restart php-fpm
转载自:https://blog.csdn.net/baidu_35297131/article/details/89960654