snmp安装
来源:互联网 发布:pe备份数据 编辑:程序博客网 时间:2024/04/27 14:45
linux系统snmp有两个包:
net-snmp (agent端)
net-snmp-utils (nms端)
如果监控端要主动接收被监控端信息,net-snmp也需要安装.
1.查看包是否安装
[root@ocp ~]# rpm -qa | grep snmp
net-snmp-libs-5.1.2-13.el4
[root@ocp ~]# mount /dev/cdrom /mnt
mount: block device /dev/cdrom is write-protected, mounting read-only
2.安装包
[root@ocp RPMS]# rpm -ivh net-snmp-5.1.2-13.el4.i386.rpm
warning: net-snmp-5.1.2-13.el4.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing... ########################################### [100%]
1:net-snmp ########################################### [100%]
[root@ocp RPMS]# rpm -ivh net-snmp-utils-5.1.2-13.el4.i386.rpm
warning: net-snmp-utils-5.1.2-13.el4.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing... ########################################### [100%]
1:net-snmp-utils ########################################### [100%]
3.启动服务
[root@ocp RPMS]# service snmpd start
Starting snmpd: [ OK ]
[root@ocp RPMS]# chkconfig --list snmpd
snmpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
[root@ocp RPMS]# chkconfig -level 35 snmpd on --开机自动启动[root@ocp RPMS]# snmpwalk -v 2c -c public localhost host
HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (4984763) 13:50:47.63
HOST-RESOURCES-MIB::hrSystemUptime.0 = No more variables left in this MIB View (It is past the end of the MIB tree)
4.查看snmp安装位置
[root@ocp RPMS]# rpm -ql net-snmp | less
/etc/logrotate.d/snmpd
/etc/rc.d/init.d/snmpd
/etc/rc.d/init.d/snmptrapd
/etc/snmp
/etc/snmp/snmpd.conf
/usr/bin/ucd5820stat
/usr/sbin/snmpd
/usr/sbin/snmptrapd
/usr/share/doc/net-snmp-5.1.2
/usr/share/doc/net-snmp-5.1.2/AGENT.txt
/usr/share/doc/net-snmp-5.1.2/COPYING
/usr/share/doc/net-snmp-5.1.2/ChangeLog.trimmed
/usr/share/doc/net-snmp-5.1.2/EXAMPLE.conf
/usr/share/doc/net-snmp-5.1.2/FAQ
5.
[root@ocp RPMS]# snmpwalk -v 2c -c public localhost host
HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (4984763) 13:50:47.63
HOST-RESOURCES-MIB::hrSystemUptime.0 = No more variables left in this MIB View (It is past the end of the MIB tree)
net-snmp (agent端)
net-snmp-utils (nms端)
如果监控端要主动接收被监控端信息,net-snmp也需要安装.
1.查看包是否安装
[root@ocp ~]# rpm -qa | grep snmp
net-snmp-libs-5.1.2-13.el4
[root@ocp ~]# mount /dev/cdrom /mnt
mount: block device /dev/cdrom is write-protected, mounting read-only
2.安装包
[root@ocp RPMS]# rpm -ivh net-snmp-5.1.2-13.el4.i386.rpm
warning: net-snmp-5.1.2-13.el4.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing... ########################################### [100%]
1:net-snmp ########################################### [100%]
[root@ocp RPMS]# rpm -ivh net-snmp-utils-5.1.2-13.el4.i386.rpm
warning: net-snmp-utils-5.1.2-13.el4.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing... ########################################### [100%]
1:net-snmp-utils ########################################### [100%]
3.启动服务
[root@ocp RPMS]# service snmpd start
Starting snmpd: [ OK ]
[root@ocp RPMS]# chkconfig --list snmpd
snmpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
[root@ocp RPMS]# chkconfig -level 35 snmpd on --开机自动启动[root@ocp RPMS]# snmpwalk -v 2c -c public localhost host
HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (4984763) 13:50:47.63
HOST-RESOURCES-MIB::hrSystemUptime.0 = No more variables left in this MIB View (It is past the end of the MIB tree)
4.查看snmp安装位置
[root@ocp RPMS]# rpm -ql net-snmp | less
/etc/logrotate.d/snmpd
/etc/rc.d/init.d/snmpd
/etc/rc.d/init.d/snmptrapd
/etc/snmp
/etc/snmp/snmpd.conf
/usr/bin/ucd5820stat
/usr/sbin/snmpd
/usr/sbin/snmptrapd
/usr/share/doc/net-snmp-5.1.2
/usr/share/doc/net-snmp-5.1.2/AGENT.txt
/usr/share/doc/net-snmp-5.1.2/COPYING
/usr/share/doc/net-snmp-5.1.2/ChangeLog.trimmed
/usr/share/doc/net-snmp-5.1.2/EXAMPLE.conf
/usr/share/doc/net-snmp-5.1.2/FAQ
5.
[root@ocp RPMS]# snmpwalk -v 2c -c public localhost host
HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (4984763) 13:50:47.63
HOST-RESOURCES-MIB::hrSystemUptime.0 = No more variables left in this MIB View (It is past the end of the MIB tree)
0 0
- SNMP安装
- snmp安装
- snmp安装
- snmp安装
- snmp--CentOS安装Net-SNMP小计
- Snmp学习总结(二)-安装Snmp
- Ubuntu8.04安装snmp
- net-snmp安装手记
- snmp 和 mrtg 安装
- NET-SNMP安装方法
- 安装net-snmp
- net-snmp安装笔记
- net-snmp安装配置
- 如何安装Net::SNMP
- bsm snmp 安装
- net-snmp安装配置
- net-snmp安装配置
- centos安装配置snmp
- JavaScript array
- Monkey官方文档,转载补充翻译
- Python为什么要self
- 汤姆大叔启示录——2015计划列表
- leetcode | Min Stack
- snmp安装
- 【web前端】sublime技巧总结
- 黑马程序员——Java基础---面向对象(对象的初始化、对象调用成员、单例设计模式)(4)
- tableView滑动出现删除按钮,不点击就返回崩溃
- 关于distcc安装和使用
- 吃豆子过桥
- Android Ctrl + 左键 不能直接打开xml问题
- poj 3237 Tree 树链剖分
- NSString - sizeWithFont