Skip to content

Building htop

linuxonz edited this page Jan 25, 2024 · 32 revisions

Building htop

Following versions of htop are available in respective distributions at the time of the creation of these build instructions:

  • RHEL (8.6, 8.8, 8.9) have 3.2.1 available in the EPEL
  • RHEL (9.0, 9.2, 9.3) have 3.2.2
  • SLES 12 SP5 has 2.0.2-9.1
  • SLES 15 SP5 has 3.2.2
  • Ubuntu 20.04 has 2.2.0
  • Ubuntu 22.04 has 3.0.5
  • Ubuntu 23.10 has 3.2.2

The instructions provided below specify the steps to build htop v3.3.0 on Linux on IBM Z for following distributions:

  • RHEL (7.8, 7.9, 8.6, 8.8, 8.9, 9.0, 9.2, 9.3)
  • SLES (12 SP5, 15 SP5)
  • Ubuntu (20.04, 22.04, 23.10)

General Notes:

  • When following the steps below please use a standard permission user unless otherwise specified.

  • A directory /<source_root>/ will be referred to in these instructions, this is a temporary writable directory anywhere you'd like to place it.

Step 1: Build using script

If you want to build htop using manual steps, go to STEP 2.

Use the following commands to build htop using the build script. Please make sure you have wget installed.

wget -q https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/Htop/3.3.0/build_htop.sh

# Build htop
bash build_htop.sh

If the build completes successfully, go to STEP 3. In case of error, check logs for more details or go to STEP 2 to follow manual build steps.

Step 2. Build and Install

export SOURCE_ROOT=/<source_root>/

2.1) Install dependencies

  • RHEL (7.8, 7.9, 8.6, 8.8, 8.9, 9.0, 9.2, 9.3)

     sudo yum install -y ncurses-devel automake autoconf gcc git make
  • SLES 12 SP5

     sudo zypper install -y ncurses ncurses-devel-5.9-72.1 gcc make wget tar awk git autoconf libtool xz gzip
  • SLES 15 SP5

     sudo zypper install -y ncurses ncurses-devel gcc make wget tar awk git autoconf libtool xz gzip
  • Ubuntu (20.04, 22.04, 23.10)

     sudo apt-get install -y libncursesw5-dev autotools-dev autoconf build-essential git

2.2) Download and unpack the htop 3.3.0 source code

    cd $SOURCE_ROOT
    git clone -b 3.3.0 https://github.com/htop-dev/htop.git
    cd htop

2.3) Configure and build htop-3.3.0

    ./autogen.sh
    ./configure
    make

2.4) Install htop

    sudo make install

Step 3. Launch htop to monitor system

    htop

Note: For a list of supported key commands see the manual page man htop on ubuntu.

References:

Clone this wiki locally