How to install EPEL and apachetop on Centos 5 and Centos 6

- by

I wanted to use apachetop to monitor one of my servers in real time. Much like top, apachetop reads the acces_log file in /var/logs/httpd/ and displays the results as apache processes happen.

Rather than installing apachetop from source, I thought a simple command like

yum install apachetop

should to the trick… but it doesn’t work by default. Now what?

Well an install via yum will only work if it is configured to look in the right repositories. Apachetop however is not part of the standard repos, hence we need to add what’s known as the EPEL package to yum (it stands for Extra Packages for Enterprise Linux).

In this article I’ll show you how to do it and how to run apachetop.


First you need to know which version of Centos you’re running (currently CentOS 5.x or 6.x). You can find out using this command:

cat /etc/*release

You’ll also need to know if you’re running the 32-bit or 64-bit version of the OS. Find out by checking your kernel version via

uname -mrs

Check the last two digits of the output: i386 would mean 32-bit, x86_64 would mean 64-bit.

With all that info at hand, let’s install EPEL. There are several mirrors out there, some of them are working and some of them are not.

The official ones maintained by The Fedora Project are not working anymore, you can find them in the link below. But thanks to Blueapple’s Livejournal the following ones should do the trick!

Issue the following command while being logged on as root:

CentOS 5 / 32-bit

rpm -Uvh

CentOS 5 / 64-bit

rpm -Uvh

CentOS 6 / 32-bit

rpm -Uvh

CentOS 6 / 64-bit

rpm -Uvh

Once installed, yum will be able to look in EPEL and find other packages, such as the one we’re after. Let’s go and install apachetop now:

yum install apachetop


How to use apachetop

You invoke it by just typing


or if you’d like to specify a file other than /var/log/httpd/access_log (which is the default) with

apachetop -f /path/to/file

You can quit back to the command prompt as usual with CTRL-C.

Have fun and enjoy πŸ˜‰

Further Reading

If you enjoy my content, please consider supporting me on Ko-fi. In return you can browse this whole site without any pesky ads! More details here.

1 thought on “How to install EPEL and apachetop on Centos 5 and Centos 6”

Leave a Comment!

This site uses Akismet to reduce spam. Learn how your comment data is processed.