How to install Alternative PHP Cache [APC] on a Linux VPS/De

First steps in cPanel, creating emails, databases, etc

How to install Alternative PHP Cache [APC] on a Linux VPS/De

Postby Mark » Thu Dec 24, 2009 2:07 am

APC is a free, open, and robust framework for caching and optimizing PHP intermediate code. Here are the most simple steps :

# Login to the server as root

# Download APC




eg : wget http://pecl.php.net/get/APC-3.0.15.tgz
# Extract it and move into the directory


Code: Select all
tar -xzf APC-3.0.15.tgz


cd APC*
# Locate where php is


Code: Select all
which php

This should return something like: /usr/local/bin/php Remember the location of php.

# Create configuration files


Code: Select all
phpize
# Compile APC



Code: Select all
./configure --enable-apc --enable-apc-mmap --with-apxs --with-php-config=/usr/local/bin/php-config
make
make install
# Install APC into php.ini


You will have to first locate php.ini using the following command


Code: Select all
php -i | grep php.ini

This will usually return /usr/local/Zend/etc/php.ini on a server that has Zend optimizer installed. Now edit php.ini and add the APC extension.


Code: Select all
vi /usr/local/Zend/etc/php.ini

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


Code: Select all
extension=”/apc_location/apc.so”
# Restart Apache



Code: Select all
service httpd restart
Mark
 
Posts: 124
Joined: Fri Dec 11, 2009 2:18 pm

Re: How to install Alternative PHP Cache [APC] on a Linux VPS/De

Postby viky » Wed Jan 26, 2011 9:35 am

I cannot answer your question.
Any one give some suggestion about install Alternative PHP cache.
viky
 
Posts: 1
Joined: Wed Jan 26, 2011 9:32 am


Return to Basic cPanel usage tutorials

Who is online

Users browsing this forum: No registered users and 1 guest

cron