Installing Apc On Ubuntu 10.4 (lucid)

I’m working on a new site using Drupal on a LAMP environment. One of the things I want to install is APC - Alternative PHP Cache - for opcode caching. When I did it with Wopular, I’ve noticed the effects immediately. Because the site crashed so often before using APC, I had to have a script to automatically reboot the server, fixed db errors, and reload the site whenever server resources are used up. It works, but sometimes I would end up with a corrupt database and had to spend hours to days fixing it or restoring it from a backup. After installing APC on Wopular, the site stopped crashing, and my CPU usage went down to 30-40%. It was a major improvement. Wopular can go on for months without crashing since then.

With Ubuntu 10.4, it’s gotten a lot easier to install. All you need to run are these two commands:

sudo apt-get install php-apc
sudo /etc/init.d/apache2 restart

That’s it. You’re done.

To see it working, you have find the apc.php file in your server, copy it to your site’s root directory, and open it with your browser.

REFERENCE:

Install APC on Ubuntu 10.04 Lucid
http://me.jacobwg.com/160-install-apc-on-ubuntu-10-04-lucid

Where is apc.php?
http://serverfault.com/questions/165792/where-is-apc-php
(The second answer gave me what I wanted. I couldn’t get anything by using the find command.)

Sections:  note from the editor   
Topics:  alternative php cache   apc   caching   coding   cpu   lucid   opcode caching   servers   site outage   ubuntu   ubuntu 10.4   wopular   
SENH'S LATEST BLOG ENTRIES
  • "Storm The Gates" Mobile Game
    My friends just launched a mobile game called "Storm the Gates"! It's available on both Android and iOS. I'm not much of a gamer, so I didn't know what to do when I started it. But my 9-year-old son turned it on and knew exactly what to do. More
  • "Ip Man 3" Has New Release Date in China and Posters to Prove It
    Over at MoviesWithButter.com, I’ve written two articles regarding “Ip Man 3,” the film that’s holding its own in Asian territories against “Star Wars: The Force Awakens.” If you’re not familiar with Asian cinema,”Ip Man” one of the most popular franchises in that area of the world. More
  • Live-Blogged The Golden Globes at MWB
    Yesterday, I live-blogged The Golden Globes -- for various reasons. First, it gets traffic. Second, I might as well do something useful while watching TV. Lastly, I was looking forward to seeing Ricky Gervais host the event again. Nothing against Tina Fey and Amy Poehler, but he’s my favorite. A google search revealed that the last time I did this for this award show was More
  • Kings vs. Mavs: Ominous Stats, News for Sacramento Before Game
    The preview on NBA.com and the injury report from SactownRoyalty.com don’t look good for the Sacramento Kings going into tonight’s game against the playoff-bound Dallas Mavericks. More
  • What?! Kings Beat Thunder, 116-104
    (Image from the Sacramento Bee. Click here to view more images from the game.) What a win. It was a wild one, especially in the first half. We [Sacramento Kings] were down by 17 in the first quarter. In frustration, I was about to turn off the TV, but the teaml called a timeout. More
SENH'S RELATED BLOG ENTRIES
  • Finally, Got Rid of That Pesky Count Query
    While updating Wopular, I noticed that from time to time, the site would locked up for a couple minutes. Most of the time, I would just wait it out. I finally looked into the slow query log for mysql and found the troublesome query. More
  • Drupal Boost & APC
    I was testing a couple of caching software to stablize the site. Wopular used to crash 3-8 times a day. I had thought the main culprit was mysql because whenever resources become low, there is a logjam of queries waiting to be processed. More
  • Finally Upgraded Sites to Use New Hardware from Linode Cloud: SSDs, Double RAM, Faster CPUs
    Around April, my VPS provider Linode announced that they’ve just finished a major $45M upgrade to their hardware and network, which means free upgrades for their existing users. The new hardware uses SSD RAID drives and faster CPUs. I hadn’t bothered because Wopular and Movies With Butter have been relatively stable. More
  • Downtime & How to Make a Repair Job on MySQL Go Faster
    The site crashed yesterday morning at around 9am, although it’s hardly noticable until a couple hours later. I didn’t notice it until I started picking stories to feature on the homepage. Whenever i tried to feature an article, it would stop the site from loading up. From that, I knew that the MySQL database must be checking for corrupt tables. More
  • Another Network Outage ... Argh ...
    I spent the whole day dealing with servers. The facility where Wopular and MoviesWithButter are hosted were having some network issues. I was able to get MWB up and running within an hour or so. Wopular was a whole different story. More

 

Comment On This Story