Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Is there a tutorial on how to install APC (Alternative PHP Cache on Debian 5.0).

share|improve this question

2 Answers 2

The best solution for installing APC on Debian systems is to use the dot.deb packages. The official Debian APC package is still using version 3.0.19-2 which is very outdated.

Using the dot.deb package will also allow you to use the latest version of PHP.

Instructions:

For the main Dotdeb repository, depending on your distribution (lenny/oldstable or squeeze/stable), add these two lines to your /etc/apt/sources.list file (choosing a mirror near you) :

Squeeze :

deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all

Lenny :

deb http://packages.dotdeb.org oldstable all
deb-src http://packages.dotdeb.org oldstable all

(Optional) If you’re running Debian 5.0 “Lenny” and you want PHP 5.3 instead of the default PHP 5.2, add these two additionnal lines too :

deb http://php53.dotdeb.org oldstable all
deb-src http://php53.dotdeb.org oldstable all

You don’t need this if you’re running Debian 6.0 “Squeeze” : PHP 5.3 is the default branch

Then fetch the appropriate GnuPG key

wget http://www.dotdeb.org/dotdeb.gpg

cat dotdeb.gpg | sudo apt-key add -

Run

apt-get update

You should now be able to use the Dotdeb packages with apt-get (or dselect, or aptitude as well…)

To install APC:

apt-get install php5-apc
share|improve this answer
    
I am using Squeeze and after following all your steps w/o a problem, the last step gives me this output, think you can help me? pastebin.com/raw.php?i=7PFALCAs –  Joseph Szymborski May 15 '13 at 23:28

Try installing it via aptitude: aptitude install php-apc Afterwars you can configure it in /etc/php5/conf.d/apc.ini Have a look at php-apc for configuration options.

Otherwise you could use "pecl" to install it via pecl install apc. Prequisite is to have the php5-dev module installed.

share|improve this answer
    
Hej shakalandy,i have tryed more time with aptitude install php-apc and pecl install apc but i get resultat " Commant Not Found " what should i do? Tnx –  DK-System Apr 11 '11 at 10:57
    
@DK-System if you don't have aptitude then use apt-get install php-apc. –  DerfK Apr 11 '11 at 11:12
    
Tnx it's works. –  DK-System Apr 11 '11 at 12:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.