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
  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值