After you install and configure your environment properly under CentOS LAMP 6 you want to install APC.
What you need before starting:
– Development of interfaces PHP, Apache & PCRE
– A C & Make tool.
If your server doesn’t have these libraries already installed use the following command to do so.
# yum install php-pear php-devel httpd-devel pcre-devel gcc make
Last, run the compilation of the APC extension.
# pecl install apc
The following questions will be asked, personally I used the defaults.
Enable internal debugging in APC [no]: Enable per request file info about files Used From The APC cache [no]: Enable spin locks (EXPERIMENTAL) [no]: Enable memory protection (EXPERIMENTAL) [no]: Enable pthread mutexes (default) [yes]: Enable pthread read / write locks (EXPERIMENTAL) [no]:
To enable the PHP extension you should edit the php.ini configuration file and add this to the end of the file:
extension = apc.so
# /etc/ini.d/httpd restart
You can check you have successfully installed APC via phpinfo().
Go to your HTTP directory
# cd /var/www/html/
Create and edit the file
# nano info.php
Paste the following lines:
<?php phpinfo(); ?>
Hit Control+X, nano will ask if you want to save the changes hit Y and hit Enter
Browse to your HTTP directory and run the file http://localhost/info.php
Also, do not hesitate to use the PHP APC administration. Here, we copy in your HTTP directory.
# cp /usr/local/lib/php/apc.php /var/www/html/apc.php
You can access this file using your browser at http://localhost/apc.php
Tags CloudAndroid APC APC Cache bash Blackberry CentOS clamscan co cpanel databases HTML 5 install memcache iPhone linux load balanced servers memcache Memcached memcahed sessions MySQL PHP php sessions Server Cache shell ssh sticky notes available text formats sticky notes commands Sticky Notes format viruses webOS website antivirus website infections