1. 添加EPEL和REMI存储库
sudo yum install epel-release
sudo yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
在CentOS 7上安装PHP 7.4版本
2.
sudo yum -y install yum-utils
yum repolist all |grep php
sudo yum-config-manager --enable remi-php74
在CentOS 7上安装PHP 7.4 以及扩展:
sudo 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-redis
原文详见:https://blog.csdn.net/qq_27715357/article/details/106734411