Install PHP APC on a CentOS6 server environment.
After you install and configure your environment properly under CentOS LAMP 6 you want to install APC.
What you need before starting:
– PEAR
– 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
Restart Apache
# /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
Categories
Archives
- July 2017 (1)
- May 2015 (1)
- November 2013 (2)
- August 2013 (1)
- September 2012 (3)
- June 2012 (1)
- May 2012 (4)
Tags Cloud
Android 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