[Server Management] CentOS8 upgrade php7.3 to php7.4 (upgrade php version)

brief description

I installed the LNMP environment once before , and the tutorial used PHP7.3 at that time. However, in subsequent use, it is found that PHP7.4 has more application scenarios, so it is necessary to upgrade PHP

Upgrade PHP

  1. Execute the following command to install php 7.4
dnf module reset php
dnf module install php:7.4
  1. Check if the installation is successful
[root@Sean ~]# php -v
PHP 7.4.19 (cli) (built: May  4 2021 11:06:37) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.19, Copyright (c), by Zend Technologies
  1. Restoring the configuration file, this will vary from person to person. Mainly check the following files /etc/php.ini, /etc/php-fpm.d/www.conf, but generally there will be no changes.

  2. restart servicesystemctl restart php-fpm

Guess you like

Origin blog.csdn.net/a19990412/article/details/129500691