Cara Upgrade PHP 5.3 to PHP 5.6 di CentOS 6

,

Langkah-langkahnya sebagai berikut:

1. Login ke server sebagai superuser atau root
2. Cek versi php saat ini
[root@localhost ~]# php -v
PHP 5.3.3 (cli) (built: Aug 11 2016 20:23:18)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

3. Instal repositori remi dan epel rpm
-Download terlebih dahulu rpm filenya :
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm && rpm -Uvh epel-release-latest-6.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm && rpm -Uvh remi-release-6*.rpm

-Enable repository remi secara global
[root@localhost ~]# vi /etc/yum.repos.d/remi.repo

-Edit Dibagian berikut sesuai tampilan dibawah (yang di cetak tebal):
[remi]
name=Remi's RPM repository for Enterprise Linux 6 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/6/remi/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/6/remi/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

[remi-php56]
name=Remi's PHP 5.6 RPM repository for Enterprise Linux 6 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/6/php56/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/6/php56/mirror
# WARNING: If you enable this repository, you must also enable "remi"
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

- Jangan lupa di simpan (:wq!)

4. Jalankan upgrade php
[root@localhost ~]# yum -y upgrade php*

5. Cek kembali versi php :
[root@localhost ~]# php -v
PHP 5.6.27 (cli) (built: Oct 14 2016 13:58:34)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies

Selamat versi php anda sudah diupgrade.

0 komentar to “Cara Upgrade PHP 5.3 to PHP 5.6 di CentOS 6”

Poskan Komentar