Installing htop on CentOS

When trying to

yum install htop

on a CentOS server you’ll probably get the following error:

...................Reading repository metadata in from local files
Excluding Packages in global exclude list
Finished
Parsing package install arguments
No Match for argument: htop
Nothing to do

Reason for this error is, htop is only available through RPM’s for redhat based systems. Here’s a workaround.

Create the file /etc/yum.repos.d/CentOS-Dag.repo and add the following:

[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
 
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
gpgkey=http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
enabled=1
includepkgs=htop*

Congrats! You can now easily install htop with ‘yum install htop’

Why use htop instead of top? Here’s a nice comparison: http://www.dotkam.com/2007/04/16/sexy-top-vs-more-human-htop/

Freelance webdeveloper & Entreprenerd Specialized in developing, scaling and optimizing of succesful web applications, community websites and small/corporate business websites using technologies such as PHP 5, Laravel, HTML5, jQuery, .. Trying to find optimal Google love for every website. I'm always interested and open for new business opportunities.