Linux serverNETWORK ADMINISTRATIONS

How to upgrade PHP from 5 to 7 in Enterprise Linux (RHEL/CentOS/Oracle Linux etc.)

This tutorial will demonstrate how to upgrade PHP from 5 to 7 in Enterprise Linux like RHEL, CentOS, Oracle Linux and others. PHP 7.x packages are available in several different repositories. We’ll use the Remi repository which provides newer versions of various software packages including PHP.

Please find the complete command used in this tutorials 👇👇👇

# Viewing current installed php version
rpm -q php

# Installing EPEL Repository Package
yum install epel-release yum-utils -y

# Installing Remi Repository
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm -y

# Viewing the available Repository
yum repolist all

# Enabling PHP 7.4
yum-config-manager –enable remi-php74

# Updating PHP to 7.4
php -v
yum update php php-* -y

# Verifing PHP has been updated to PHP 7.4
php -v

source

centos 7

Leave a Reply

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