Methods to install APC (PHP Cache)

Started by Sudhakar, Nov 08, 2009, 11:57 PM

Previous topic - Next topic

Sudhakar

What is APC?
APC is a free, open, and robust framework for caching and optimizing PHP intermediate code.
Install instructions

1. Login to the server as root

2. Download APC


w get http://pecl.php.net/get/APC-3.0.14.tgz

3. Extract and move into the directory

gzip -d APC-3.0.14.tgz
tar -xf APC-3.0.14.tar
cd APC-3.0.14


4. Locate where php is

which php

This should return something like: /usr/local/bin/php
We have to remember the location of php

5. Create configuration files

phpize

6. Compile APC

./configure –enable-apc –enable-apc-mmap –with-apxs –with-php-config=/usr/local/bin/php-config
make
make install
The "make install" commnand will return the location of the apc.so extention please note the location. You will need this later.

7. Install APC into php.ini

You will have to first locate php using the locate command

locate php

This will usualy return /usr/local/Zend/etc/php.ini on a server that has Zend optimizer installed.

Now we will edit php.ini and add the APC extension.

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


Scroll down to the buttom and add the fallowing before the lines about the zend optimizer (They start with [Zend])

extension="/apc_location/apc.so"

8. Restart Apache

If you done everything it's time to restart Apache

service httpd restart

Hope this helps !  :yes

Source : Thanks to the Unidentified Author.[/b][/color]  :educated

pradeep prem

it as easy to install APC cache from this website

it as given many codes to install

thanks for share