centos7安装php7.4

时间:2020-05-01

安装源

sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm

启用源

sudo yum -y install yum-utils
sudo yum-config-manager --enable remi-php74

安装

sudo yum update
sudo yum install php php-cli

安装其它扩展

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 --modules