How to install APC for PHP on Linux
APC is the Alternative PHP Cache which is a free, open, and robust framework for caching and optimizing PHP intermediate code. It can be installed by the following steps.
Step1. Download the latest stable version of APC.
#wget http://pecl.php.net/get/APC-3.1.9.tgz
Step2. Untar the file
#tar -xvf APC-3.1.9.tgz
#cd APC-3.1.9
Step3. Run the following command:
#phpize
Step4: You then configure APC, telling it where the executable file 'php-config' is. If you don't know where this is, then do this:
#whereis php-config
Step5. The above command will show 'php-config' path. Now configure APC using the command like so:
#./configure --enable-apc --enable-apc-mmap --with-apxs --with-php-config=/usr/bin/php-config
Step6: You need to compile it using the following commands:
#make
#make install
Step7: Restart Apache
#/etc/init.d/httpd restart
APC has been installed now. :-)
You can check using the following command:
#php -m | grep -i apc
Thank you.
Step1. Download the latest stable version of APC.
#wget http://pecl.php.net/get/APC-3.1.9.tgz
Step2. Untar the file
#tar -xvf APC-3.1.9.tgz
#cd APC-3.1.9
Step3. Run the following command:
#phpize
Step4: You then configure APC, telling it where the executable file 'php-config' is. If you don't know where this is, then do this:
#whereis php-config
Step5. The above command will show 'php-config' path. Now configure APC using the command like so:
#./configure --enable-apc --enable-apc-mmap --with-apxs --with-php-config=/usr/bin/php-config
Step6: You need to compile it using the following commands:
#make
#make install
Step7: Restart Apache
#/etc/init.d/httpd restart
APC has been installed now. :-)
You can check using the following command:
#php -m | grep -i apc
Thank you.
Interesting tthoughts
ReplyDelete