centos7编译安装htop

由于CentOS7.0自带了htop ,服务器上还是 CentOS6.5,所以需要自己手动来安装

网上资料整理如下:

1.检查是否安装GCC

命令终端输入

[root@centos7 ~]#  gcc -v
使用内建 specs。
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
目标:x86_64-redhat-linux
配置为:../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
线程模型:posix
gcc 版本 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC) 

  如果没有安装gcc,按如下来安装

yum install -y gcc

安装后,需要安装一个编译Linux内核的库

yum install -y ncurses-devel

2.下载HTOP

wget http://sourceforge.net/projects/htop/files/latest/download

下载后查看文件名输入
'ls'
查看到的文件名可能是download

3.解压并编译安装

tar -zxf download

cd htop-1.0.2

./configure && make && make install

  

4.验证安装是否成功

执行htop即可

猜你喜欢

转载自www.cnblogs.com/liuyuanq/p/10054729.html
今日推荐