CentOS 7 upgrade to PHP 7.4

Recently, the WordPress background has been prompting to upgrade to PHP 7.4. The 7.1.33 I used before stopped supporting ten months ago. Because the version in the default source of CentOS is older, the steps to upgrade PHP are slightly cumbersome in my impression. But Remi's RPM repository provides a wizard with very clear and simple steps.

 

Visit  https://rpms.remirepo.net/wizard/  and select the system as CentOS 7, the PHP version as 7.4.11, and the installation type as Default/Single (simplest way). Then follow the wizard to operate.

If you haven't installed the EPEL source, execute:

yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Install Remi source:

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

Install  yum-utils (yum-config-manager):

yum install yum-utils

Record and backup current PHP installation

yum list installed | grep php > /tmp/current-php.txt
cp /etc/php.ini /tmp/php.ini.bak
cp /etc/php-fpm.d/www.conf /temp/www.conf

#...

Configuration source:

yum-config-manager --disable 'remi-php*'
yum-config-manager --enable   remi-php74

Update:

yum update

/tmp/current-php.txt Install PHP components according to  :

yum install php-a php-b php-c
#...

Then recheck the modifications  php.ini and  www.conf. You're done!

Guess you like

Origin blog.csdn.net/taoanbang/article/details/112360563