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
- ./configure –enable-apc –enable-apc-mmap –with-apxs2=/usr/sbin/apxs –with-php-config=/usr/bin/php-config
- 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.