• Check Current PHP Version

[root@testsvr01 ~]# php -v
PHP 7.4.33 (cli) (built: Oct 31 2022 10:36:05) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies

  • Install yum utils 

[root@testsvr01 yum.repos.d]# yum -y install yum-utils

  • Disable existing Repo

[root@testsvr01 yum.repos.d]# yum-config-manager --disable remi-php74

  • Enable New Repo

[root@testsvr01 yum.repos.d]# yum-config-manager --enable remi-php81

  • Update PHP Version

[root@testsvr01 yum.repos.d]# yum install php -y

[root@testsvr01 ~]# php -v
PHP 8.1.13 (cli) (built: Nov 22 2022 14:42:07) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.1.13, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.13, Copyright (c), by Zend Technologies
 

Technology