Linux安装网络监控

先安装epel源:


0.安装yum优先级插件


yum install yum-priorities
1.epel简介: https://fedoraproject.org/wiki/EPEL/zh-cn
rpm -Uvh http://mirrors.ustc.edu.cn/fedora/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
以上URL请按实际情况修改

2.查看是否安装成功
rpm -q epel-release
 3.导入key:
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
4.修改/etc/yum.repos.d/epel.repo文件

在[epel]最后添加一条属性 priority=11

vi /etc/yum.repos.d/epel.repo
意思是yum先去官方源查,官方没有再去epel的源找


5.重建缓存
yum makecache
装了个epel的扩展后,执行yum就开始报错:
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
解决办法:编辑/etc/yum.repos.d/epel.repo,把基础的恢复,镜像的地址注释掉
#baseurl
mirrorlist
改成
baseurl
#mirrorlist

用yum安装nethogs:

[root@Discuz yum.repos.d]# yum -y install nethogs
已加载插件:fastestmirror, priorities
设置安装进程
Loading mirror speeds from cached hostfile
解决依赖关系
--> 执行事务检查
---> Package nethogs.i686 0:0.8.0-1.el6 will be 安装
--> 完成依赖关系计算

依赖关系解决
=====================================================================================================================================
 软件包                          架构                         版本                                仓库                          大小
=====================================================================================================================================
正在安装:
 nethogs                         i686                         0.8.0-1.el6                         epel                          28 k


事务概要
=====================================================================================================================================
Install       1 Package(s)


总下载量:28 k
Installed size: 50 k
下载软件包:
nethogs-0.8.0-1.el6.i686.rpm                                                                                                                                                    |  28 kB     00:00     
运行 rpm_check_debug 
执行事务测试
事务测试成功
执行事务
Warning: RPMDB altered outside of yum.
** Found 2 pre-existing rpmdb problem(s), 'yum check' output follows:
abrt-addon-ccpp-1.1.13-4.el6.i686 has missing requires of yum-utils
rhn-check-1.0.0-38.el6.noarch has missing requires of yum-rhn-plugin >= ('0', '0.5.3', '30')
  正在安装   : nethogs-0.8.0-1.el6.i686                                                                                                                                                            1/1 
  Verifying  : nethogs-0.8.0-1.el6.i686                                                                                                                                                            1/1 


已安装:
  nethogs.i686 0:0.8.0-1.el6                                                                                                                                                                           


完毕!
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值