[Linux] Upgrade PHP 5 to PHP 7 using Yum on Oracle RHEL 6.3 Santiago

My Apache Web Server was running PHP version 5.3. But my developer need to use PHP 7.0, because they running on Laravel Framework 5.5. So I decided to upgrade PHP 5.3 to PHP 7.0. Although this is a development web server, I don’t want to disturb the existing setup and also, I don’t want to have multiple versions on PHP installed. So it should be a pure upgrade of PHP.

My environment is :

[root@devapp etc]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.3 (Santiago)

Here's what I've done to upgrade PHP.
1. Configure REMI Repository
# wget https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -Uvh epel-release-6-8.noarch.rpm

# wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
# rpm -Uvh remi-release-6.rpm

2. Activate REMI Repository
# yum repolist
# yum-config-manager --enable remi-php70
3. Upgrade PHP 5.3 to PHP 7.0
# yum --showduplicates list php
# yum update php

4. Verify the PHP version
# php -v

5. Restart Web Server
# service httpd restart

Artikel Terkait :