Linux

Install APC on CentOS 5

APC (Alternative PHP Cache) is a free and open cache for PHP. It’s a free framework for caching and optimizing PHP intermediate code.
In other words, it could improve your php website performance

Here are some instructions on how install APC on CentOS 5:

yum install php-pear php-devel httpd-devel pcre-devel apr-devel
pecl install apc

Create the file : /etc/php.d/apc.ini

extension = apc.so
apc.enabled=1
apc.shm_segments=3
apc.optimization=0
apc.shm_size=128
apc.ttl=7200
apc.user_ttl=7200
apc.num_files_hint=1024
apc.mmap_file_mask=/tmp/apc.XXXXXX
apc.enable_cli=1
apc.slam_defense=Off
apc.cache_by_default=1

Then restart Apache:
service httpd restart

Now to see if it is really working, create a file info.php in your DocumentRoot.

<?php
phpinfo();
?>

Start your browser and go to your.server.xx/info.php.
You’ll see something like this:
After installing APC, run phpinfo to see if it's working
If it’s okay, don’t forget to delete the info.php file.
Congratz, You’ve just installed Alternative PHP Cache.

Leave a Reply


}) _0- O-) ;) ;( :{ :o :Y :X :P :N :D :@ :? :9~ :) :(