Cara install XCache di CentOS agar load website jadi kencang ini adalah artikel lanjutan dari artikel sebelumnya mengenai cara install Kloxo-MR di VPS Centos dan cara install ioncube loader di VPS CentOS pada Kloxo-MR.
XCache adalah modul PHP dimana digunakan untuk menyimpan cache webserver agar load website menjadi lebih ringan atau kencang. Cara kerja XCache ini adalah meng-cache script PHP yang pernah dicompile dalam memory. XCache dapat mempercepat kinerja PHP pada server dengan cara menghilangkan waktu kompilasi script PHP dengan caching yang dikompilasi dari script PHP ke dalam RAM dan menggunakan script PHP yang sudah terkompilasi tersebut langsung dari RAM.
Cara install XCache di CentOS agar load website jadi kencang
Dini kentos menggunakan PHP 5.3.29 alias php53u.
Setelah menginstall Kloxo MR dan akan menggunakan cache webserver maka diperlukan XCache ini untuk melakukan caching. Sebelum ke tahap install, terlebih dahulu cek modul PHP yang telah terinstall dengan cara :
php -v
contoh hasilnya :
[root@PJJF002 ~]# php -v PHP 5.3.29 (cli) (built: Aug 14 2014 12:38:37) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2014 Zend Technologies with the ionCube PHP Loader v4.6.1, Copyright (c) 2002-2014, by ionCube Ltd. [root@PJJF002 ~]#
Yang sudah terinstall barulah ionCube PHP Loader. Mari dimulai proses install XCache dengan cara berikut :
Cek dulu ketersediaan package dengan perintah yum list php53u-xcache* jika menggunakan php53u.
[root@PJJF002 ~]# yum list php53u-xcache* Loaded plugins: fastestmirror, priorities, protectbase, replace, security Loading mirror speeds from cached hostfile * mratwork-epel: mirror.us.xxx.net * mratwork-ius-stable: mirror.symnds.com 0 packages excluded due to repository protections Available Packages php53u-xcache.i686 3.1.0-1.ius.el6 mratwork-ius-archive php53u-xcache-debuginfo.i686 3.1.0-1.ius.el6 mratwork-ius-archive [root@PJJF002 ~]#
Ditemujan 2 packages, untuk menginstall langsung keduanya gunakan perintah berikut :
yum install php53u-xcache*
Hasil saat Proses install XCache
[root@PJJF002 ~]# yum install php53u-xcache* Loaded plugins: fastestmirror, priorities, protectbase, replace, security Setting up Install Process Loading mirror speeds from cached hostfile * mratwork-epel: mirror.us.xxx.net * mratwork-ius-stable: mirror.symnds.com 0 packages excluded due to repository protections Resolving Dependencies --> Running transaction check ---> Package php53u-xcache.i686 0:3.1.0-1.ius.el6 will be installed ---> Package php53u-xcache-debuginfo.i686 0:3.1.0-1.ius.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: php53u-xcache i686 3.1.0-1.ius.el6 mratwork-ius-archive 108 k php53u-xcache-debuginfo i686 3.1.0-1.ius.el6 mratwork-ius-archive 244 k Transaction Summary ================================================================================ Install 2 Package(s) Total download size: 352 k Installed size: 1.5 M Is this ok [y/N]: y Downloading Packages: (1/2): php53u-xcache-3.1.0-1.ius.el6.i686.rpm | 108 kB 00:00 (2/2): php53u-xcache-debuginfo-3.1.0-1.ius.el6.i686.rpm | 244 kB 00:00 -------------------------------------------------------------------------------- Total 612 kB/s | 352 kB 00:00 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : php53u-xcache-debuginfo-3.1.0-1.ius.el6.i686 1/2 Installing : php53u-xcache-3.1.0-1.ius.el6.i686 2/2 Verifying : php53u-xcache-debuginfo-3.1.0-1.ius.el6.i686 1/2 Verifying : php53u-xcache-3.1.0-1.ius.el6.i686 2/2 Installed: php53u-xcache.i686 0:3.1.0-1.ius.el6 php53u-xcache-debuginfo.i686 0:3.1.0-1.ius.el6 Complete! [root@PJJF002 ~]#
Hasil setelah XCache terinstall
[root@PJJF002 ~]# php -v PHP 5.3.29 (cli) (built: Aug 14 2014 12:38:37) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2014 Zend Technologies with XCache v3.1.0, Copyright (c) 2005-2013, by mOo with the ionCube PHP Loader v4.6.1, Copyright (c) 2002-2014, by ionCube Ltd. with XCache Optimizer v3.1.0, Copyright (c) 2005-2013, by mOo with XCache Cacher v3.1.0, Copyright (c) 2005-2013, by mOo with XCache Coverager v3.1.0, Copyright (c) 2005-2013, by mOo [root@PJJF002 ~]#
Dah… Selesai juga install XCache di CentOS agar load website jadi kencang. Silahkan di konfigurasi sendiri script php cachingnya.