centos7yum安装php7.4
时间: 2023-05-01 13:06:35 浏览: 173
centos7编译安装php
可以通过以下步骤在CentOS 7上安装PHP 7.4:
1. 添加Remi源:
sudo yum install epel-release -y
sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm -y
sudo yum install yum-utils -y
2. 启用Remi源:
sudo yum-config-manager --enable remi-php74
3. 安装PHP 7.4:
sudo yum install php php-cli php-common php-devel php-pear php-gd php-mbstring php-mysqlnd php-xml -y
4. 验证安装是否成功:
php -v
阅读全文