第一步:安装 EPEL 仓库 与 Remi仓库
第二步:启用 Remi 仓库
第三步:安装 PHP、PHP-FPM
第四步:启动并开机启用 PHP-FPM
在 CentOS 7 上使用 Remi 仓库安装 PHP 7.4,您可以按照以下步骤操作 安装 EPEL 仓库:
yum install -y epel-release
安装 Remi 仓库:
yum install yum-utils
yum-config-manager --enable remi-php74
安装 PHP:
yum -y install php php-{cli,fpm,mysqlnd,zip,devel,gd,mbstring,curl,xml,pear,bcmath,json}
验证安装:
php -v
PHP-FPM 是一个 PHP FastCGI 进程管理器,它可以与 Nginx 协同工作来处理 PHP 请求。
安装 PHP-FPM:
yum install -y php-fpm
启动并开机启用 PHP-FPM:
systemctl start php-fpm
systemctl enable php-fpm
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有