連接:http://www.qianxingweb.comphp
#yum list installed | grep php
#查看已安裝的PHP,查到後rpm -e 卸載 #yum repolist all | grep php
yum install epel-release -y
rpm -ivh https://mirrors.tuna.tsinghua.edu.cn/remi/enterprise/remi-release-7.rpm
yum repolist all | grep php
yum-config-manager --enable remi-php74
若提示:-bash: yum-config-manager: 未找到命令
代表未安裝yum-utlis包,yum -y install yum-utils 便可
yum -y install php
#查看PHP版本
php -v
#查看已安裝的模塊
php -m
yum search php74-php
示例:安裝php74-php-fpm擴展,則執行:(不用加php74-) yum -y install php-fpm
# 啓動 systemctl start php-fpm # 中止 systemctl stop php-fpm
#重啓
systemctl restart php-fmp # 重載 systemctl reload php-fpm #設置開機啓動 systemctl enable php-fpm #禁止開機啓動 systemctl disable php-pfm