先介绍一下该工具的安装:
#wget下载[root@c7 tools]# wget http://jaist.dl.sourceforge.net/project/htop/htop/1.0.2/htop-1.0.2.tar.gz--2016-10-27 16:16:00-- http://jaist.dl.sourceforge.net/project/htop/htop/1.0.2/htop-1.0.2.tar.gz正在解析主机 jaist.dl.sourceforge.net (jaist.dl.sourceforge.net)... 150.65.7.130, 2001:df0:2ed:feed::feed正在连接 jaist.dl.sourceforge.net (jaist.dl.sourceforge.net)|150.65.7.130|:80... 已连接。已发出 HTTP 请求,正在等待回应... 200 OK长度:388499 (379K) [application/x-gzip]正在保存至: “htop-1.0.2.tar.gz”100%[==========================================================>] 388,499 119KB/s 用时 3.2s 2016-10-27 16:16:03 (119 KB/s) - 已保存 “htop-1.0.2.tar.gz” [388499/388499])[root@c7 tools]# ll总用量 380-rw-r--r--. 1 root root 388499 10月 27 16:05 htop-1.0.2.tar.gz[root@c7 tools]# tar xf htop-1.0.2.tar.gz #解压[root@c7 tools]# cd htop-1.0.2[root@c7 htop-1.0.2]# ./configure #下面的提示是因为缺少gccchecking for gcc... nochecking for cc... nochecking for cl.exe... noconfigure: error: in `/root/tools/htop-1.0.2':configure: error: no acceptable C compiler found in $PATHSee `config.log' for more details.[root@c7 htop-1.0.2]# yum install -y gcc #安装gcc已加载插件:fastestmirror...........[root@c7 htop-1.0.2]# ./configure #提示缺少组件,需要安装ncurses-devel...........configure: error: You may want to use --disable-unicode or install libncursesw.[root@c7 htop-1.0.2]# yum install -y ncurses-devel #安装ncurses-devel...........完毕![root@c7 htop-1.0.2]# ./configure [root@c7 htop-1.0.2]# make && make install #安装成功[root@c7 htop-1.0.2]# echo $?0
图示: