You are here

Installing htop (on CentOS or any other distro)

Submitted by Druss on Fri, 2011-04-29 19:18

Unlike Top, its newer sibling - Htop is better in every way. It provides more detailed information, supports colours and is more configurable. Htop is available in the repositories of most distros. However, CentOS (and therefore, RHEL) is not one of them. While it it apparently available in the EPEL repositories, I could not find it for CentOS 4.9. In any event, what we have below are the (simple) steps to install it from the source packages:

  • Open a terminal / SSH into the server. The steps below assume root access. If you are not logged in as root, privileged commands will require a sudo prefix.
  • Visit Htop's Sourceforge page and download the source file for the latest stable version - 0.9 at the time of writing. If you're SSH-ed in, you can use wget to download the file with a command like:
    wget -c
  • Once downloaded, extract the file using the command:
    tar xvzf htop-0.9.tar.gz
    This should extract the files into a directory named htop-0.9.
  • Change directory: cd htop-0.9
  • Type ./configure which will check and prepare the configuration for your server. If your installation is missing any packages, it will throw up warnings or errors.
  • Type make which should build the program and ready it for installation.
  • Type make install which should install the built program.
  • ... and that's it. You can also type make uninstall from this directory if you want to remove the program.

Hope this helps :)