侧边栏壁纸
博主头像
★街角晚灯★博主等级

博观而约取 厚积而薄发

  • 累计撰写 466 篇文章
  • 累计创建 185 个标签
  • 累计收到 0 条评论

目 录CONTENT

文章目录

Ubuntu Server 安装SNMP组件

WinJay
2014-05-21 / 0 评论 / 0 点赞 / 134 阅读 / 3705 字 / 正在检测是否收录...
温馨提示:
文章发布较早,内容可能过时,阅读注意甄别。。。。

Ubuntu Server 安装SNMP组件 ,首先要安装软件包
root@Ouc:~# apt-get install snmpd
Reading package lists… Done
Building dependency tree

Reading state information… Done The following extra packages will be installed: libperl5.14 libsensors4 libsnmp-base libsnmp15 Suggested packages: lm-sensors snmp-mibs-downloader The following NEW packages will be installed: libperl5.14 libsensors4 libsnmp-base libsnmp15 snmpd 0 upgraded, 5 newly installed, 0 to remove and 167 not upgraded. Need to get 1655 kB of archives. After this operation, 4239 kB of additional disk space will be used. Do you want to continue [Y/n]? y Get:1 http://cn.archive.ubuntu.com/ubuntu/ precise/main libsensors4 amd64 1:3.3.1-2ubuntu1 [31.9 kB] Get:2 http://cn.archive.ubuntu.com/ubuntu/ precise-updates/main libperl5.14 amd64 5.14.2-6ubuntu2.3 [1254 B] Get:3 http://cn.archive.ubuntu.com/ubuntu/ precise-updates/main libsnmp-base all 5.4.3~dfsg-2.4ubuntu1.1 [213 kB] Get:4 http://cn.archive.ubuntu.com/ubuntu/ precise-updates/main libsnmp15 amd64 5.4.3~dfsg-2.4ubuntu1.1 [1333 kB] Get:5 http://cn.archive.ubuntu.com/ubuntu/ precise-updates/main snmpd amd64 5.4.3~dfsg-2.4ubuntu1.1 [76.1 kB] Fetched 1655 kB in 2s (697 kB/s) Preconfiguring packages … Selecting previously unselected package libsensors4. (Reading database … 50330 files and directories currently installed.) Unpacking libsensors4 (from …/libsensors4_1:3.3.1-2ubuntu1_amd64.deb) … Selecting previously unselected package libperl5.14. Unpacking libperl5.14 (from …/libperl5.14_5.14.2-6ubuntu2.3_amd64.deb) … Selecting previously unselected package libsnmp-base. Unpacking libsnmp-base (from …/libsnmp-base_5.4.3~dfsg-2.4ubuntu1.1_all.deb) … Selecting previously unselected package libsnmp15. Unpacking libsnmp15 (from …/libsnmp15_5.4.3~dfsg-2.4ubuntu1.1_amd64.deb) … Selecting previously unselected package snmpd. Unpacking snmpd (from …/snmpd_5.4.3~dfsg-2.4ubuntu1.1_amd64.deb) … Processing triggers for man-db … Processing triggers for ureadahead … Setting up libsensors4 (1:3.3.1-2ubuntu1) … Setting up libperl5.14 (5.14.2-6ubuntu2.3) … Setting up libsnmp-base (5.4.3~dfsg-2.4ubuntu1.1) … Setting up libsnmp15 (5.4.3~dfsg-2.4ubuntu1.1) … Setting up snmpd (5.4.3~dfsg-2.4ubuntu1.1) … update-rc.d: warning: snmpd stop runlevel arguments (1) do not match LSB Default-Stop values (0 1 6) * Starting network management services: Processing triggers for libc-bin … ldconfig deferred processing now taking place

2.编辑配置文件,只需修改三个地方即可
root@Ouc:~# nano /etc/snmp/snmpd.conf
#########################################################
#
# ACCESS CONTROL
## system + hrSystem groups only
view systemonly included .1.3.6.1.2.1.1
view systemonly included .1.3.6.1.2.1.25.1
view systemonly included .1 80 #新增此项
#view systemonly included .101.4.15.208 80 #rocommunity public localhost
# Default access to basic system info
rocommunity public default -V systemonly

root@Ouc:~# /etc/init.d/snmpd restart
* Restarting network management services:
root@Ouc:~# service snmpd status
* snmpd is running

Ubuntu-Snmp

0
  1. 支付宝打赏

    qrcode alipay
  2. 微信打赏

    qrcode weixin

评论区