1、安装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
2、修改/etc/yum.repos.d/remi-php74.repo
This repository only provides PHP 7.4 and its extensions
NOTICE: common dependencies are in “remi-safe”
[remi-php74]
name=Remi’s PHP 7.4 RPM repository for Enterprise Linux 7 – $basearch
baseurl=http://rpms.remirepo.net/enterprise/7/php74/$basearch/
mirrorlist=https://rpms.remirepo.net/enterprise/7/php74/httpsmirror
mirrorlist=http://cdn.remirepo.net/enterprise/7/php74/mirror
enabled=1//1可用,0不可用
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
3、执行 yum -y upgrade php* 升级
yum -y upgrade php*
4、查看php版本
php -v
|