Installing htop on a CentOS VPS

If you want to install ‘htop’ (a very good Linux process viewer) onto a server running CentOS, you may run into some errors.
 
Firstly, you need to make sure you have the DAG RPM Repository installed.
 
Create a new file:
vi /etc/yum.repos.d/dag.repo
 
containing:
 
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1
 
Then you need to add the GPG key for the repository. Run the following command:
 
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
 
Finally, install htop:
 
yum install htop
 
It should update the repository, download the software and install it. Once it’s done, you can run ‘htop’ via the command line. If you’re installing on multiple servers and don’t want to manually reconfigure it every time, you can upload a default settings file.
 
Create/edit the file /root/.htoprc
 
vi /root/.htoprc
 
Add/replace it with the following (this is an example htop configuration):
 
# Beware! This file is rewritten every time htop exits.
# The parser is also very primitive, and not human-friendly.
fields=0 48 17 2 46 47 49 1
sort_key=46
sort_direction=1
hide_threads=0
hide_kernel_threads=1
hide_userland_threads=0
shadow_other_users=0
highlight_base_name=1
highlight_megabytes=1
highlight_threads=0
tree_view=0
header_margin=0
detailed_cpu_time=0
color_scheme=0
delay=15
left_meters=CPU Memory Swap
left_meter_modes=1 1 1
right_meters=Tasks LoadAverage Uptime Hostname
right_meter_modes=2 2 2 2
 
Save the file and run htop again (it may delete this file, but it will import the settings).

Was this answer helpful?

 Print this Article

Also Read

Install and Run UnixBench on CentOS or Debian VPS

This tutorial will cover how to  install and run UnixBench on a CentOS Linux VPS or Debian...

Install Softaculous on CentOS cPanel/WHM VPS

Overview   The following guide will show you how to install Softaculous on a CentOS...

How to Install RapidLeech v42 on a Debian or Ubuntu VPS

This guide will walk you through the installation of RapidLeech v42 r358 on a VPS running Debian...

How to Install VNC with GNOME Desktop on a Debian VPS

NOTE: Bitronic Technologies come pre-configured for VNC access, just click Product...

Setting Up a Full Webmin Sever on a CentOS VPS

This tutorial will cover the basic setup for a fully functioning web server using Webmin on a...