Installing APC on Media Temple DV
This screenshot can pretty much tell the whole story.

I am using wp-supercache on my blogs but it seems that it is not enough. Media Temple has a suggested optimization guide according to David which I followed thoroughly, but at the end of the day all I have are still the same yellow, black and red icon faults. haaaayyy buhhhhaayy
After a few weeks of struggling on how to make the server up without memory failures and without rebooting the VPS of course. I finally get it done through the help of APC.
What is APC?
APC (Alternative PHP Cache) is a free and open opcode cache for PHP. It was conceived of to provide a free, open, and robust framework for caching and optimizing PHP intermediate code.
How to install APC on Media Temple’s DV Base?
1. Make sure you have root access and developer tools installed. Go to Media Temple’s Admin page of your account and click on “Root Access and Developer Tools”.
2. SSH to your serer via Putty. Get it here.
3. Type these commands one at a time.
- cd /usr/local/src
- wget http://pecl.php.net/get/APC-3.0.19.tgz
- gunzip -c APC-3.0.19.tgz | tar xf -
- cd APC-3.0.19
- /usr/bin/phpize
- ./configure –enable-apc –enable-apc-mmap –with-apxs2=/usr/sbin/apxs –with-php-config=/usr/bin/php-config
- make
- make install
4. Edit Php.ini
- vi +/extension_dir /etc/php.ini
- press i
- press enter to start a new line
- type extension = “apc.so”
- press esc and then type :wq to exit and save (if you mess up type :q! to quit without saving)
- service httpd stop
- service httpd start
Now just check the phpinfo.php if APC is running. I was able to reduce the server load dramatically by using this application. APC is highly recommended for VPS users.
*This is the same guide I followed courtesy of Tim Linden, but I think he missed the part /usr/bin/phpize on his tutorial.




about 9 months ago
Yean tim is missing the /usr/bin/phpize line, but after I type in ./configure –enable-apc –enable-apc-mmap –with-apxs2=/usr/sbin/apxs –with-php-config=/usr/bin/php-config then it gives me this error?
configure: WARNING: you should use –build, –host, –target
configure: WARNING: you should use –build, –host, –target
configure: error: invalid variable name: .with-apxs2
about 9 months ago
did you typed it all in one line?
about 9 months ago
thanks for the response, But I was an idiot. I assume having root access in turn gave me the “developers tool.”
I installed APC last night, and I can't see any improvement, I wonder if i installed it wrong. I actually had to use another line to configure it from another tutorial I found:
./configure –enable-apc –enable-apc-mmap –with-apxs –with-php-config=/usr/bin/php-config
I am really confused with DV I only had it for a week or 2 and all it does is crash on me constantly.
about 5 months ago
I have the same problem. I used your code:
./configure –enable-apc –enable-apc-mmap –with-apxs –with-php-config=/usr/bin/php-config
and I have these errors
configure: WARNING: you should use –build, –host, –target
configure: WARNING: invalid host type: –enable-apc
configure: WARNING: you should use –build, –host, –target
configure: WARNING: invalid host type: –enable-apc-mmap
configure: WARNING: you should use –build, –host, –target
configure: WARNING: invalid host type: –with-apxs
configure: error: invalid variable name: –with-php-config
I login as root and installed the developers tool. can somebody point out what my problem is?
about 5 months ago
I was getting errors when entering the ./configure…… line — this was because for some reason when i was pasting the text from notepad it would change some of the “-”’s to “.” — took me a while to notice. After i changed them back to “-” it worked