Tim pengembangan PHP telah mengumumkan rilis terbaru mereka yaitu PHP 5.3.x. Rilis ini adalah sebuah peningkatan dalam seri PHP 5.x, yang mencakup beberapa fitur-fitur baru dan perbaikan bug pada PHP. Jika Anda ingin mencoba PHP versi 5.3.x, silahkan baca tutorial cara update php 5.2 dibawah ini.
Beberapa perubahan signifikan pada PHP Versi 5.3.x diantaranya:
– Extension and PECL cleanup
– Numerous bug fixes
– Peningkatan Performance (dalam hal internal API cleansing)
– mysqlnd goes mainstream
– Peningkatan kemampuan pada system Windows
– New language
– Perubahan beberapa paradigma syntax pada coding PHP
Masih penasaran ingin mencoba update php 5.2 ke php 5.3? Langsung saja upgrade PHP 5.2.x ke PHP 5.3.x dengan mengikuti tutorial cara update php 5.2 ke PHP 5.3.x dibawah ini.
Artikel ini menjelaskan cara Update php 5.2 server linux ke php 5.3, menggunakan disto Centos 5.3.
Langkah-langkah tutorial cara update php 5.2 ke php versi 5.3 menggunakan linux commands line :
Langkah 1 – Periksa versi PHP yang sedang digunakan saat.
[root@server3 ~]# php -v
PHP 5.1.6 (cli) (built: Nov 13 2008 11:24:03)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
Langkah 2 – Periksa apakah paket PHP versi yang kita inginkan sudah adaserver saat ini.
[root@server3 ~]# rpm -qa |grep php
php-pdo-5.1.6-27.el5_5.3
php-cli-5.1.6-27.el5_5.3
php-5.1.6-27.el5_5.3
php-devel-5.1.6-27.el5_5.3
php-pgsql-5.1.6-27.el5_5.3
php-xmlrpc-5.1.6-27.el5_5.3
php-common-5.1.6-27.el5_5.3
php-pear-1.4.9-6.el5
php-odbc-5.1.6-27.el5_5.3
php-imap-5.1.6-27.el5_5.3
php-gd-5.1.6-27.el5_5.3
php-mysql-5.1.6-27.el5_5.3
php-snmp-5.1.6-27.el5_5.3
php-mbstring-5.1.6-27.el5_5.3
wbm-php-pear-1.5-1
Langkah 3 – Update CentOS Repository, biasanya berada pada directory /etc/yum.repos.d/CentOS-Testing.repo
[root@server3 ~]# vi /etc/yum.repos.d/CentOS-Testing.repo
[c5-testing]
name=CentOS-5 Testing
baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
includepkgs=php*
Langkah 4 – Update yum yang sudah di edit diatas (proses update yum biasanya membutuhkan waktu, tergantung koneksi internet pada server Anda)
[root@server3 ~]# yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.de.leaseweb.net
* extras: mirror.de.leaseweb.net
* updates: mirror.de.leaseweb.net
c5-testing | 1.9 kB 00:00
c5-testing/primary_db | 682 kB 00:01
Reducing CentOS-5 Testing to included packages only
Finished
Setting up Update Process
Resolving Dependencies
–> Running transaction check
—> Package php.i386 0:5.2.10-1.el5.centos set to be updated
—> Package php-cli.i386 0:5.2.10-1.el5.centos set to be updated
—> Package php-common.i386 0:5.2.10-1.el5.centos set to be updated
—> Package php-devel.i386 0:5.2.10-1.el5.centos set to be updated
—> Package php-gd.i386 0:5.2.10-1.el5.centos set to be updated
—> Package php-imap.i386 0:5.2.10-1.el5.centos set to be updated
—> Package php-mbstring.i386 0:5.2.10-1.el5.centos set to be updated
—> Package php-mysql.i386 0:5.2.10-1.el5.centos set to be updated
—> Package php-odbc.i386 0:5.2.10-1.el5.centos set to be updated
—> Package php-pdo.i386 0:5.2.10-1.el5.centos set to be updated
—> Package php-pear.noarch 1:1.8.1-2.el5.centos set to be updated
—> Package php-pgsql.i386 0:5.2.10-1.el5.centos set to be updated
—> Package php-snmp.i386 0:5.2.10-1.el5.centos set to be updated
—> Package php-xmlrpc.i386 0:5.2.10-1.el5.centos set to be updated
–> Finished Dependency Resolution
Dependencies Resolved
=========================================================================================
Package Arch Version Repository Size
=========================================================================================
Updating:
php i386 5.2.10-1.el5.centos c5-testing 1.2 M
php-cli i386 5.2.10-1.el5.centos c5-testing 2.4 M
php-common i386 5.2.10-1.el5.centos c5-testing 240 k
php-devel i386 5.2.10-1.el5.centos c5-testing 549 k
php-gd i386 5.2.10-1.el5.centos c5-testing 112 k
php-imap i386 5.2.10-1.el5.centos c5-testing 49 k
php-mbstring i386 5.2.10-1.el5.centos c5-testing 1.1 M
php-mysql i386 5.2.10-1.el5.centos c5-testing 80 k
php-odbc i386 5.2.10-1.el5.centos c5-testing 48 k
php-pdo i386 5.2.10-1.el5.centos c5-testing 62 k
php-pear noarch 1:1.8.1-2.el5.centos c5-testing 419 k
php-pgsql i386 5.2.10-1.el5.centos c5-testing 66 k
php-snmp i386 5.2.10-1.el5.centos c5-testing 24 k
php-xmlrpc i386 5.2.10-1.el5.centos c5-testing 52 k
Transaction Summary
=========================================================================================
Install 0 Package(s)
Upgrade 14 Package(s)
Total download size: 6.3 M
Is this ok [y/N]: y
Diatas adalah keterangan ketersediaan paket2 PHP apa saja yang bisa di upgrade, jika setuju untuk upgrade, silahkan ketik “y” pada pertanyaan “Is this ok [y/N]: y”.
Proses download semua paket sedang dilakukan… Sekarang kita lanjutkan cara update php 5.2 ke php 5.3.
Downloading Packages:
(1/14): php-snmp-5.2.10-1.el5.centos.i386.rpm | 24 kB 00:00
(2/14): php-odbc-5.2.10-1.el5.centos.i386.rpm | 48 kB 00:00
(3/14): php-imap-5.2.10-1.el5.centos.i386.rpm | 49 kB 00:00
(4/14): php-xmlrpc-5.2.10-1.el5.centos.i386.rpm | 52 kB 00:00
(5/14): php-pdo-5.2.10-1.el5.centos.i386.rpm | 62 kB 00:00
(6/14): php-pgsql-5.2.10-1.el5.centos.i386.rpm | 66 kB 00:00
(7/14): php-mysql-5.2.10-1.el5.centos.i386.rpm | 80 kB 00:00
(8/14): php-gd-5.2.10-1.el5.centos.i386.rpm | 112 kB 00:00
(9/14): php-common-5.2.10-1.el5.centos.i386.rpm | 240 kB 00:01
(10/14): php-pear-1.8.1-2.el5.centos.noarch.rpm | 419 kB 00:01
(11/14): php-devel-5.2.10-1.el5.centos.i386.rpm | 549 kB 00:01
(12/14): php-mbstring-5.2.10-1.el5.centos.i386.rpm | 1.1 MB 00:02
(13/14): php-5.2.10-1.el5.centos.i386.rpm | 1.2 MB 00:02
(14/14): php-cli-5.2.10-1.el5.centos.i386.rpm | 2.4 MB 00:03
—————————————————————————————–
Total 286 kB/s | 6.3 MB 00:22
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 7203f491
c5-testing/gpgkey | 1.8 kB 00:00
Importing GPG key 0x7203F491 “CentOS-testing (CentOS Developers testing key) ” from http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : php-common 1/28
Updating : php-pdo 2/28
Updating : php-cli 3/28
Updating : php 4/28
Updating : php-pgsql 5/28
Updating : php-mysql 6/28
Updating : php-odbc 7/28
Updating : php-mbstring 8/28
Updating : php-imap 9/28
Updating : php-gd 10/28
Updating : php-xmlrpc 11/28
Updating : php-snmp 12/28
Updating : php-devel 13/28
Updating : php-pear 14/28
Cleanup : php-mbstring 15/28
Cleanup : php 16/28
Cleanup : php-pgsql 17/28
Cleanup : php-imap 18/28
Cleanup : php-pear 19/28
Cleanup : php-mysql 20/28
Cleanup : php-pdo 21/28
Cleanup : php-gd 22/28
Cleanup : php-common 23/28
Cleanup : php-xmlrpc 24/28
Cleanup : php-devel 25/28
Cleanup : php-odbc 26/28
Cleanup : php-cli 27/28
Cleanup : php-snmp 28/28
Updated:
php.i386 0:5.2.10-1.el5.centos php-cli.i386 0:5.2.10-1.el5.centos
php-common.i386 0:5.2.10-1.el5.centos php-devel.i386 0:5.2.10-1.el5.centos
php-gd.i386 0:5.2.10-1.el5.centos php-imap.i386 0:5.2.10-1.el5.centos
php-mbstring.i386 0:5.2.10-1.el5.centos php-mysql.i386 0:5.2.10-1.el5.centos
php-odbc.i386 0:5.2.10-1.el5.centos php-pdo.i386 0:5.2.10-1.el5.centos
php-pear.noarch 1:1.8.1-2.el5.centos php-pgsql.i386 0:5.2.10-1.el5.centos
php-snmp.i386 0:5.2.10-1.el5.centos php-xmlrpc.i386 0:5.2.10-1.el5.centos
Complete!
Proses download paket PHP sudah selesai dilakukan.
Langkah 5 – Periksa apakah PHP versi terbaru sudah di install pada server kita.
[root@server3 ~]# rpm -qa |grep php
php-5.2.10-1.el5.centos
php-mbstring-5.2.10-1.el5.centos
php-snmp-5.2.10-1.el5.centos
php-common-5.2.10-1.el5.centos
php-cli-5.2.10-1.el5.centos
php-pgsql-5.2.10-1.el5.centos
php-odbc-5.2.10-1.el5.centos
php-imap-5.2.10-1.el5.centos
php-xmlrpc-5.2.10-1.el5.centos
php-devel-5.2.10-1.el5.centos
wbm-php-pear-1.5-1
php-pdo-5.2.10-1.el5.centos
php-mysql-5.2.10-1.el5.centos
php-gd-5.2.10-1.el5.centos
php-pear-1.8.1-2.el5.centos
Selamat!
Upgrade paket dan modul PHP sudah berhasil dilakukan pada server, coba lihat perbedaan versi modul PHP yang baru dengan versi modul PHP sebelumnya.
Langkah 6 – Restart Web Server Apache untuk menjalankan PHP versi terbaru Anda.
[root@server3 ~]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
Langkah 7 – Periksan versi PHP yang sudah selesai kita upgrade.
[root@server3 ~]# php -v
PHP 5.2.10 (cli) (built: Nov 13 2009 11:24:03)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
Selamat mencoba 🙂
Demo Tutorial cara update php 5.2 diatas adalah simulasi upgrade PHP versi 5.1. ke php versi 5.2. Namun langkah-langkahnya sama saja jika Anda ingin update php 5.2 server centos ke PHP versi 5.3.x pada server Centos.
Salam, Saya adalah Administrator Website di e-Padi. Melalui website ini kami berbagai artikel dan wawasan tentang pengelolaan server, website, dan solusi untuk sysadmin server dalam menghadapi tantangan teknis di dunia digital berdasarkan pengalaman team e-Padi dan kumpulan dari berbagai sumber terpercaya.