Install APC di Centos 6

APC yang merupakan kependekan dari Alternative PHP Cache. Fungsinya adalah untuk mempercepat server dalam mengeksekusi script PHP sehingga data hasil request bisa cepat disajikan kepada pihak yang mrequest, yang dalam hal ini adalah pengunjung yang ingin membuka halaman website.

Berikut langkah-langkah installasinya:
1. Install aplikasi depedency APC
# yum install php-pear php-devel httpd-devel pcre-devel gcc make

2. Install APC menggunakan YUM
# yum install php-pecl-apc -y
3. Setup memori share APC
# vi /etc/php.d/apc.ini

Cari dan edit baris ini:
; The size of each shared memory segment, with M/G suffix
apc.shm_size=512M
; A "hint" about the number of distinct source files that will be included or
; requested on your web server. Set to zero or omit if you are not sure;

4. Restart service Apache
# service httpd restart
atau
# /etc/init.d/httpd restart

5. Verifikasi installasi APC di phpinfo
# vi /var/www/html/phpinfo/php
Isi file phpinfo.php :
<?php
// Show all information, defaults to INFO_ALL
phpinfo();
?>

Buka browser: http://xxx.xxx.xxx.xxx/phpinfo.php, apabila terlihat seperti ini berarti APC berhasil di load.
Ket: xxx.xxx.xxx.xxx = ip server atau localhost  

 

6.  Upgrade APC menggunakan PECL
# pecl upgrade apc

7. Uninstall APC menggunakan PECL
# pecl uninstall apc

Share on Google Plus

About Admin

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.

0 comments: