Blog Hosting, Server, Linux, Jaringan Komputer dan Internet 

Home Tutorial Cara Upgrade Versi PHP 5.4 ke 7.0
formats

Cara Upgrade Versi PHP 5.4 ke 7.0

Published on January 1, 2020, by in Tutorial.

Pada tutorial kali ini kita akan membahas cara upgrade versi php 5.4 ke php 7.0 sesuai kebutuhan pada LAMP server.

Kita cek terlebih dahulu versi php saat ini digunakan

[root@server ~]# php -v

akan tampil versi php yang digunakan saat ini

PHP 5.4.16 (cli) (built: Nov 1 2019 16:04:20)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
[root@server ~]# nano /etc/httpd/conf.d/phpMyAdmin.conf

Mari kita move on ke php 7.0

Terlebih dahulu kita install repositori Remi dan EPEL

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://rpms.remirepo.net/enterprise/remi-release-7.rpm

Kemudian pastikan repository Remi global seperti berikut :

[remi]
name=Remi’s RPM repository for Enterprise Linux 7 – $basearch
#baseurl=http://rpms.remirepo.net/enterprise/7/remi/$basearch/
#mirrorlist=https://rpms.remirepo.net/enterprise/7/remi/httpsmirror
mirrorlist=http://cdn.remirepo.net/enterprise/7/remi/mirror
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

Pastikan pada enabled=0

Kemudian aktifkan REMI repository PHP 7.0

nano /etc/yum.repos.d/remi-php70.repo

Maka akan muncul remi php 7.0

[remi-php70]
name=Remi’s PHP 7.0 RPM repository for Enterprise Linux 7 – $basearch
#baseurl=http://rpms.remirepo.net/enterprise/7/php73/$basearch/
mirrorlist=https://rpms.remirepo.net/enterprise/7/php73/httpsmirror
mirrorlist=http://cdn.remirepo.net/enterprise/7/php73/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

Pastikan pada enabled=1

Simpan setingan.

Sekarang kita lakukan upgrade php 5.4 ke versi php 7.0

yum -y upgrade php*

Kemudian kita cek versi php

php -v

Selamat anda berhasil upgrade php 5.4 ke php 7.0

PHP 7.0.33 (cli) (built: Dec 17 2019 16:44:25) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies

Selamat mencoba.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.