centos7下安装缺少的命令依赖包

猫头哥在使用centos7的时候,安装了最小化版本,结果不支持netstat命令,报错如下
netstat command not found on CentOS 7 and RHEL 7 (Red Hat Enterprise Linux 7)

解决办法
yum provides */netstat

输出如下

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.opencas.cn
* epel: mirrors.opencas.cn
* extras: mirrors.opencas.cn
* updates: mirrors.opencas.cn
ctdb-tests-2.5.1-1.el6.x86_64 : CTDB clustered database test suite
Repo : base
Matched from:
Filename : /usr/share/ctdb-tests/eventscripts/stubs/netstat


net-tools-1.60-110.el6_2.x86_64 : Basic networking tools
Repo : base
Matched from:
Filename : /bin/netstat


check-mk-multisite-1.2.6p9-1.el6.noarch : The check-mk's Multisite
Repo : epel
Matched from:
Filename : /usr/share/check_mk/web/plugins/netstat


check-mk-agent-1.2.6p9-1.el6.x86_64 : The check-mk's Agent
Repo : epel
Matched from:
Filename : /usr/share/check-mk-agent/available-plugins/netstat


munin-node-2.0.25-2.el6.noarch : Network-wide graphing framework (node)
Repo : epel
Matched from:
Filename : /usr/share/munin/plugins/netstat


check-mk-docs-1.2.6p9-1.el6.noarch : The check-mk's documentation
Repo : epel
Matched from:
Filename : /usr/share/doc/check_mk/checks/netstat


check-mk-1.2.6p9-1.el6.x86_64 : A new general purpose Nagios-plugin for retrieving data
Repo : epel
Matched from:
Filename : /usr/share/check_mk/checks/netstat


net-tools-1.60-110.el6_2.x86_64 : Basic networking tools
Repo : installed
Matched from:
Filename : /bin/netstat

分析一下输出结果,我们常用的命令都放在bin目录下,同时根据安装包的名字,我们使用的肯定是网络工具,不可能包含check相关。所以选择安装如下:
yum install net-tools

参考文章
http://www.sharadchhetri.com/2014/09/27/netstat-command-found-centos-7-rhel-7-red-hat-enterprise-linux-7/
http://www.cncentos.com/forum.php?mod=viewthread&tid=361

你可能感兴趣的:(centos7下安装缺少的命令依赖包)