Tuesday, April 23, 2024

CentOS 8系统PHP 7.2更新到PHP 7.4

WordPress推荐将目前正在使用的PHP 7.2更新至PHP 7.4。查了一下资料,Remi’s RPM repository提供了一个向导,步骤简单清晰。

访问https://rpms.remirepo.net/wizard/,选择系统为CentOS 8 ,PHP版本为7.4.33,安装类型为Default/Single (simplest way)。接下来按向导操作即可。

操作步骤如下:

dnf config-manager --set-enabled powertools
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
dnf module reset php
dnf module install php:remi-7.4
dnf update

注意事项:
1、建议重新启动PHP,否则网站可能不能正常运行。
2、查看当前的PHP版本。

php --version
php --modules

One comment

  1. centos准备停更了,哎,vps还在用centos,到时候再和php一起换新版本吧

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.