CENTOS 7 YUM 安装PHP7.4

1.检查当前安装的PHP包

yum list installed | grep php

如果有安装的PHP包,先删除他们

yum remove php.x86_64 php-cli.x86_64 php-common.x86_64 php-gd.x86_64 php-ldap.x86_64 php-mbstring.x86_64 php-mcrypt.x86_64 php-mysql.x86_64 php-pdo.x86_64

2.安装源

先删除以前的 yum remove epel-release

yum install epel-release
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

3.安装YUM管理工具

yum install yum-utils

4. 查看PHP(可忽略此步骤)

yum search php73
yum search php74

5.安装PHP

yum install php74-php-gd php74-php-pdo php74-php-mbstring php74-php-cli php74-php-fpm php74-php-mysqlnd

6.启动FPM

service php74-php-fpm start

7.查看php版本

php74 -v

你可能感兴趣的:(CENTOS 7 YUM 安装PHP7.4)