How to Install Alternative PHP Cache (APC) on your Server?

Step a: Login to your server as root.

 

Step b: Download the APC

wget http://pecl.php.net/package/APC

 

eg : wget http://pecl.php.net/get/APC-3.0.15.tgz

 

Step c:  Extract it over to your server

tar -xzf APC-3.0.15.tgz

cd APC*

Step d:  Check the PHP location by running the below command:

which php

Step e: Create the configuration files using the below command

Phpize

Stepf:  Now the APC need to be compiled over the server :

./configure –enable-apc –enable-apc-mmap –with-apxs –with-php-config=/usr/local/bin/php-config

make

make install

Note : You must install the APC in the php.ini file

Step g: Below command would help you to find the php.ini over the server :

php -i | grep php.ini

Step h :  Amend php.ini by adding APC extension, as stated below :

vi /usr/local/Zend/etc/php.ini

Step I : Add the following to the php.ini file

apc.shm_segments=1
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

Step J :   Restart apache

service httpd restart

  • 44 utilizatori au considerat informația utilă
Răspunsul a fost util?

Articole similare

Can I use my domain name or must I use my IP address as the hostname for FTP?

Using your IP address (192.168.22.22  is an example IP address) is the preferred entry for...

Can you transfer my sites from my current host to my new VPS?

Yes. We will transfer all of your sites free* of charge and will assure that you experience no or...

Do you allow MP3 files? Do you allow streaming of videos?

Yes we do with our special plans at http://hostripples.in/avs-hosting.php

Do you support Cold Fusion?

We do not support or Cold Fusion on our shared hosting servers, however you are more than welcome...