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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Linux平臺下snmp服務的安裝和配置Linux
- SNMP Trap 除錯除錯
- Window10:開啟snmp
- How To Turn SNMP On/Off ? [ID 472530.1]
- 【Linux】Linux開啟snmp及查詢Linux
- Python 開發環境搭建(5):SNMPPython開發環境
- win10系統無法解除安裝簡單網路管理協議(SNMP)提示0x800736B3怎麼辦Win10協議
- 安裝npm 解除安裝npm 安裝apidocNPMAPI
- snmp弱口令引起的資訊洩漏
- BiocManager安裝,devtools安裝dev
- 簡單網路管理協議SNMP(史上最全)協議
- JDK安裝和解除安裝JDK
- Linux安裝解除安裝MySQLLinuxMySql
- ffmpeg安裝之mac安裝Mac
- linux 安裝yum 安裝phpLinuxPHP
- Ubuntu解除安裝和安裝Ubuntu
- 02 安裝git、安裝TortoiseGitGit
- cocoapods安裝/解除安裝/使用
- docker安裝及解除安裝Docker
- [ 安裝 ] Zeppelin安裝步驟!
- win10安裝版怎麼安裝_安裝版win10安裝教程Win10
- ElasticSearch的安裝和使用,Postman的安裝,Kibana的安裝,EShead外掛的安裝ElasticsearchPostman
- 【推薦 - glibc安裝】MySQL - 安裝MySql
- linux下安裝snap安裝工具Linux
- kratos安裝及依賴安裝
- debian安裝和解除安裝vmware
- Linux 解除安裝openjdk 安裝oraclejdkLinuxJDKOracle
- JDK的安裝與解除安裝JDK
- [雲原生]Docker - 安裝&解除安裝Docker
- linux 解除安裝jdk和安裝LinuxJDK
- Ubuntu安裝和解除安裝mongodbUbuntuMongoDB
- Mac Redis安裝與解除安裝MacRedis
- 安裝了IDLE後安裝tensorflow
- window下安裝並使用nvm(含解除安裝node、解除安裝nvm、全域性安裝npm)NPM
- 安裝
- air安裝win10怎麼解除安裝_air安裝win10如何解除安裝AIWin10
- CentOS7安裝php、安裝MySqlCentOSPHPMySql
- Pycharm 2024安裝包下載與安裝PyCharm
- 【推薦 - 原始碼安裝】nginx - 安裝原始碼Nginx