添加 EPEL and REMI 仓库
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
安装PHP 7.4
启用PHP 7.4 Remi 仓库
yum -y install yum-utils
yum-config-manager --enable remi-php74
yum update
yum install php php-cli
安装扩展
yum install php php-cli php-fpm php-mysqlnd php-zip php-devel php-gd php-mcrypt php-mbstring php-curl php-xml php-pear php-bcmath php-json
配置
php -v
systemctl enable php-fpm.service
systemctl start php-fpm.service