我用如下方法安装mrtg
网络流量监视[默认5分钟采集一次]
切换到超级用户:
sudo -sH
安装软件:
apt-get install apache2
apt-get install mrtg
apt-get install snmpd
编辑snmpd:
vim /etc/snmp/snmpd.conf
查找到类似的行,修改为如下所示:(仅仅修改屏蔽或放开)
# sec.name source community
# com2sec paranoid default public # kommentieren
com2sec readonly default public # <- auskommentieren
#com2sec readwrite default private
重启snmpd服务:
/etc/init.d/snmpd restart
重新生成mrtg的配置文件:
cfgmaker public@localhost > /etc/mrtg.cfg
(注意)如果仅仅监视一个IP地址采用如下命令:
cfgmaker [email protected] >> /etc/mrtg.cfg
生成mrtg的主页:
indexmaker /etc/mrtg.cfg > /var/www/mrtg/index.html
访问:
http://localhost/mrtg/
在重新生成配置文件时出现如下错误(cfgmaker public@localhost > /etc/mrtg.cfg ):
root@ubuntu:~# cfgmaker public@localhost > /etc/mrtg.cfg
SNMP Error:
no response received
SNMPv1_Session (remote host: "localhost" [127.0.0.1].161)
community: "public"
request ID: 636641467
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /usr/share/perl5/SNMP_util.pm line 627
SNMPWALK Problem for 1.3.6.1.2.1.1 on public@localhost::::::v4only
at /usr/bin/cfgmaker line 921
WARNING: Skipping public@localhost: as no info could be retrieved
[问题] 请教:安装mrtg时报错
编译打包和其他
前往
- 公告/注意事项
- ↳ 新闻和通知
- ↳ 软件推荐
- 系统安装
- ↳ 教学和常见问答
- ↳ 系统安装和升级
- ↳ 启动和引导
- ↳ 网卡无线拨号
- ↳ 硬件与内核
- ↳ 笔记本及便携设备
- ↳ Ubuntu衍生版
- ↳ 其他类Unix OS发行版
- ↳ Debian发行版
- 配置美化
- ↳ 中文显示和输入法
- ↳ 个人配置文件存放点
- ↳ 软件文档翻译
- ↳ 窗口管理器及美化
- ↳ 桌面展示
- 软件使用
- ↳ 办公、图像、机械电子设计等
- ↳ Vim和Emacs
- ↳ 开源模板库
- ↳ 互联网相关软件
- ↳ 影音多媒体
- ↳ 游戏和模拟器
- ↳ 虚拟机和虚拟化
- ↳ Wine及其分支
- ↳ 其它类软件
- 服务器管理
- ↳ 服务器运维
- ↳ 云计算和容器(K8S/KVM/Docker/WSL等)
- ↳ Ubuntu VPS
- 程序设计与开发
- ↳ Shell脚本
- ↳ 软件/网站开发
- ↳ 内核及嵌入式开发
- ↳ Ubuntu编译和打包
- ↳ 开源小工具
- ↳ 挑战任务
- 感想与交流
- ↳ 深度PK版
- ↳ Ubuntu故事和感慨
- ↳ 同城交流
- ↳ 校园社团
- ↳ 港澳台校区
- ↳ 国外校区
- 站务区
- ↳ 论坛管理
- ↳ Ubuntu中文网上商店