RHEL upgrade php

Welcome to today’s guide on how to install PHP 7.4 on CentOS 8 / RHEL 8 Linux system. The PHP Version 7.4.0 has been released for the developers, and users interested in running it in production. The official release date for GA was November 28, 2019.

Follow the steps below to Install PHP 7.4 on CentOS 8 / RHEL 8 Linux system. PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. Popular web CMS platforms like WordPress are written in PHP.

Step 1: Add EPEL and REMI Repository

EPEL and REMI repositories are the main requirements for this installation. Add them to the system by running these commands:

sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo yum -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm

Step 2: Install PHP 7.4 on CentOS 8 / RHEL 8

Once the repositories are added, We can enable PHP 7.4 Remi module and install PHP 7.4 on CentOS 8 / RHEL 8.

sudo dnf -y install dnf-utils

Enable the module stream for PHP 7.4 on CentOS 8 / RHEL 8.

sudo dnf module reset php -y
sudo dnf module install php:remi-7.4

Installing PHP Version 8.0 in Red h...

Please enable JavaScript

Installing PHP Version 8.0 in Red hat Family

Accept installation prompt.

Dependencies resolved.
======================================================================================================================================================================================================
 Package                                      Architecture                       Version                                                               Repository                                Size
======================================================================================================================================================================================================
Installing group/module packages:
 php-cli                                      x86_64                             7.4.30-1.el8.remi                                                     remi-modular                             4.6 M
 php-common                                   x86_64                             7.4.30-1.el8.remi                                                     remi-modular                             1.2 M
 php-fpm                                      x86_64                             7.4.30-1.el8.remi                                                     remi-modular                             1.6 M
 php-mbstring                                 x86_64                             7.4.30-1.el8.remi                                                     remi-modular                             529 k
 php-xml                                      x86_64                             7.4.30-1.el8.remi                                                     remi-modular                             218 k
Installing dependencies:
 oniguruma5php                                x86_64                             6.9.8-1.el8.remi                                                      remi-safe                                212 k
 php-json                                     x86_64                             7.4.30-1.el8.remi                                                     remi-modular                              79 k
Installing weak dependencies:
 nginx-filesystem                             noarch                             1:1.14.1-9.module+el8.4.0+542+81547229                                appstream                                 23 k
Installing module profiles:
 php/common
Enabling module streams:
 nginx                                                                           1.14
 php                                                                             remi-7.4

Transaction Summary
======================================================================================================================================================================================================
Install  8 Packages

Total download size: 8.4 M
Installed size: 41 M
Is this ok [y/N]: y

The current PHP version should be 7.4.

$ php -v
PHP 7.4.30 (cli) (built: Jun  7 2022 08:38:19) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies

Step 3: Install PHP 7.4 Extensions CentOS 8 / RHEL 8

Use the next command to install additional packages:

sudo dnf update
sudo yum install php-xxx

Example:

sudo yum install wget php-{pear,cgi,common,curl,mbstring,gd,mysqlnd,gettext,bcmath,json,xml,fpm,intl,zip,imap}

Proceed to install commonly used PHP extensions in your system

Dependencies resolved.
======================================================================================================================================================================================================
 Package                                              Architecture                          Version                                               Repository                                     Size
======================================================================================================================================================================================================
Installing:
 php-bcmath                                           x86_64                                7.4.30-1.el8.remi                                     remi-modular                                   86 k
 php-gd                                               x86_64                                7.4.30-1.el8.remi                                     remi-modular                                   95 k
 php-imap                                             x86_64                                7.4.30-1.el8.remi                                     remi-modular                                  104 k
 php-intl                                             x86_64                                7.4.30-1.el8.remi                                     remi-modular                                  244 k
 php-mysqlnd                                          x86_64                                7.4.30-1.el8.remi                                     remi-modular                                  262 k
 php-pear                                             noarch                                1:1.10.13-1.el8.remi                                  remi-modular                                  366 k
 php-pecl-zip                                         x86_64                                1.21.0-3.el8.remi.7.4                                 remi-modular                                   69 k
Installing dependencies:
 gd3php                                               x86_64                                2.3.3-8.el8.remi                                      remi-safe                                     148 k
 libaom                                               x86_64                                3.1.1-1.el8                                           epel                                          1.7 M
 libavif                                              x86_64                                0.10.1-3.el8                                          epel                                           76 k
 libc-client                                          x86_64                                2007f-24.el8                                          epel                                          564 k
 libdav1d                                             x86_64                                0.5.2-1.el8                                           epel                                          347 k
 libicu69                                             x86_64                                69.1-4.el8.remi                                       remi-safe                                     9.6 M
 libimagequant                                        x86_64                                2.12.6-1.el8                                          openstack-yoga                                 63 k
 libraqm                                              x86_64                                0.7.0-4.el8                                           epel                                           19 k
 libzip                                               x86_64                                1.9.2-1.el8.remi                                      remi-modular                                   70 k
 php-pdo                                              x86_64                                7.4.30-1.el8.remi                                     remi-modular                                  146 k
 php-process                                          x86_64                                7.4.30-1.el8.remi                                     remi-modular                                  101 k
 svt-av1-libs                                         x86_64                                0.8.7-1.el8                                           epel                                          4.7 M
Installing weak dependencies:
 php-fedora-autoloader                                noarch                                1.0.1-2.el8.remi                                      remi-safe                                      13 k

Transaction Summary
======================================================================================================================================================================================================
Install  20 Packages

Total download size: 19 M
Installed size: 57 M
Is this ok [y/N]: y

To view enabled modules, run:

$ php --modules
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
imap
intl
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlwriter
xsl
zip
zlib

[Zend Modules]

You have successfully installed PHP 7.4 on CentOS 8 / RHEL 8.

Video Courses To Learn PHP Web Programming:

  • The Complete Web Developer Course
  • PHP for Beginners – Become a PHP Master – CMS Project
  • The Complete PHP Full Stack Web Developer Bootcamp
  • PHP with Laravel for beginners – Become a Master in Laravel
  • PHP OOP: Object Oriented Programming for beginners + Project

Similar:

Install PHP 7.4 on Ubuntu

How To Install PHP 7.4 on Fedora

How To Install PHP 7.4 on CentOS 7

How To Install PHP 7.4 on Debian

How To Install PHPUnit on CentOS / Fedora

YOU CAN SUPPORT OUR WORK WITH A CUP OF COFFEE


As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.

How to upgrade PHP version in redhat?

To do that, run the following command:.
subscription-manager repos --enable rhel-server-rhscl-7-rpms. ... .
yum install rh-php56 rh-php56-php rh-php56-php-gd rh-php56-php-mbstring rh-php56-php-mysqlnd rh-php56-php-intl rh-php56-php-ldap. ... .
cp /opt/rh/rh-php56/enable /etc/profile.d/rh-php56.sh source /opt/rh/rh-php56/enable..

How to upgrade PHP to 7.4 RHEL 8?

How to Install PHP 7.4 on CentOS 8 / RHEL 8.
Minimum System Requirements for PHP 7.4..
Step:1) Enable EPEL and Remi Repository..
Step:2) Enable latest PHP Module Stream (remi-7.4).
Step:3) Install and Verify PHP..
Step:4) Updating PHP Parameters..

How to update PHP in RHEL 8?

How to Install PHP 8 on CentOS/RHEL 8/7.
Step 1: Enable EPEL and Remi Repository on CentOS/RHEL. Right off the bat, you need to enable the EPEL repository on your system. ... .
Step 2: Install PHP 8 on CentOS/RHEL. ... .
Step 3: Verify PHP 8.0 on CentOS/RHEL. ... .
Step 3: Install PHP 8.0 Extensions in CentOS/RHEL..

How to upgrade PHP 7.2 to 7.4 in RHEL 8?

How To Install PHP 7.4 on CentOS 8 / RHEL 8.
Step 1: Add EPEL and REMI Repository. EPEL and REMI repositories are the main requirements for this installation. ... .
Step 2: Install PHP 7.4 on CentOS 8 / RHEL 8. ... .
Step 3: Install PHP 7.4 Extensions CentOS 8 / RHEL 8..