CentOS7.3下安装接口流量工具-ifstat

前端之家收集整理的这篇文章主要介绍了CentOS7.3下安装接口流量工具-ifstat前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

CentOS版本:7.3

[root@localhostifstat-1.1]#cat/etc/redhat-release
CentOSLinuxrelease7.3.1611(Core)
[root@localhostifstat-1.1]#

下载ifstat软件包:

wget

解压ifstat-1.1.tar.gz

[root@localhost~]#tar-zxvfifstat-1.1.tar.gz

进入ifstat-1.1文件夹:

cdifstat-1.1

检测安装环境:

[root@localhostifstat-1.1]#./configure
creatingcache./config.cache
checkingforaBSDcompatibleinstall.../usr/bin/install-c
checkingforgcc...no
checkingforcc...no
configure:error:noacceptableccfoundin$PATH
[root@localhostifstat-1.1]#

显示没有安装gcc和cc。

通过yum仓库安装gcc和cc:

[root@localhostifstat-1.1]#yum-yinstallgcccc

Installed:
gcc.x86_640:4.8.5-11.el7

DependencyInstalled:
cpp.x86_640:4.8.5-11.el7glibc-devel.x86_640:2.17-157.el7_3.4glibc-headers.x86_640:2.17-157.el7_3.4kernel-headers.x86_640:3.10.0-514.21.2.el7libmpc.x86_640:1.0.1-3.el7

DependencyUpdated:
glibc.x86_640:2.17-157.el7_3.4glibc-common.x86_640:2.17-157.el7_3.4

Complete!
[root@localhostifstat-1.1]#

重新检测安装环境:

[root@localhostifstat-1.1]#./configure
creating./config.status
creatingMakefile
creatingconfig.h
[root@localhostifstat-1.1]#

编译:

[root@localhostifstat-1.1]#make
gcc-I.-g-O2-DHAVE_CONFIG_H-cifstat.c-oifstat.o
gcc-I.-g-O2-DHAVE_CONFIG_H-cdrivers.c-odrivers.o
gcc-I.-g-O2-DHAVE_CONFIG_H-cdata.c-odata.o
gccifstat.odrivers.odata.o-oifstat
[root@localhostifstat-1.1]#

安装:

[root@localhostifstat-1.1]#makeinstall
/usr/bin/install-c-d-m755/usr/local/bin
/usr/bin/install-c-s-m755ifstat/usr/local/bin/ifstat
/usr/bin/install-c-d-m755/usr/local/man/man1
/usr/bin/install-c-m644ifstat.1/usr/local/man/man1/ifstat.1
[root@localhostifstat-1.1]#

此时ifstat安装完毕。

看看效果吧!

[root@localhostifstat-1.1]#ifstat
ens33ens37virbr0
KB/sinKB/soutKB/sinKB/soutKB/sinKB/sout
0.000.000.060.230.000.00
0.000.000.060.170.000.00
0.000.000.060.170.000.00
0.000.000.060.170.000.00
0.000.000.060.170.000.00
0.000.000.060.170.000.00
0.000.000.060.170.000.00
0.000.000.060.160.000.00
0.000.000.060.160.000.00
0.000.000.060.160.000.00
0.000.000.060.160.000.00

猜你在找的CentOS相关文章