snmp安裝
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)
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26937943/viewspace-1814379/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- snmp的安裝方法
- Snmp學習總結(二)——WinXP安裝和配置SNMP
- nagios snmp 安裝記錄iOS
- Linux下SNMP的安裝配置Linux
- Linux平臺下snmp服務的安裝和配置Linux
- snmp安裝與簡單配置(centos7、ubuntu15.10)CentOSUbuntu
- Ubuntu上snmp安裝、配置、啟動及遠端測試完整過程Ubuntu
- SNMP協議協議
- SNMP 協議協議
- Snmp學習總結(七)——SNMP4J介紹
- SNMP 實戰1
- AIX上snmp操作AI
- AIX 6.1 snmp監控AI
- SNMP協議詳解協議
- codis安裝 (java 安裝 + zookeeper 安裝 + go 安裝 + codis 安裝JavaGo
- SNMP OID批量列舉工具
- [zt] 使用snmp 監控 Oracle 10g(10.2.0.4) 時oracle 10g snmp的配置Oracle 10g
- 安裝npm 解除安裝npm 安裝apidocNPMAPI
- mysql安裝 (yum 安裝)MySql
- MMM安裝、MHA安裝
- mysql安裝------RPM包安裝及解除安裝MySql
- oracle安裝:OUI安裝Oracle(圖形介面安裝)OracleUI
- SNMP系統資訊獲取工具onesixtyone
- Snmp學習總結系列——開篇
- SNMP TABLE ERROR : Requested table is empty or does not existError
- ffmpeg安裝之mac安裝Mac
- docker安裝及解除安裝Docker
- 02 安裝git、安裝TortoiseGitGit
- Ubuntu解除安裝和安裝Ubuntu
- Orace RAC安裝-DNS安裝DNS
- caffe安裝系列——安裝OpenCVOpenCV
- SPARK 安裝之scala 安裝Spark
- mac 安裝opencv homebrew安裝MacOpenCV
- Oracle 安裝與解除安裝Oracle
- solaris mysql 安裝 解除安裝MySql
- BiocManager安裝,devtools安裝dev
- 安裝HomeBrew提示已安裝並無法解除安裝
- SQL Server 2012 安裝——安裝 OR 解除安裝SQLServer