CentOS 6 – Install APC

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.

 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]:

It enables the PHP extension

  echo "extension = apc.so"> / etc / php.d / apc.ini

And Apache is restarted.

  service httpd restart

You can check that you have successfully installed APC via phpinfo ().

Also, do not hesitate to use the PHP APC administration.
Here, we copy in our HTTP directory.

  cp / usr / share / pear / apc.php / var / www / apc.php

2 Comments

  1. Joseph Williams says:

    Quick and easy. thank you

  2. Brian Mark says:

    Why not just yum install php-pecl-apc and call it good? That integrates it better IMO.

Leave a Comment