---
title: "linux el 5 上安装 snmp 5.4.1过程"
author: "bayaci"
date: "2007-09-20T14:24:00Z"
tags: [".net", "Linux", "PHP", "Security", "Windows"]
slug: "linux-el-5-snmp-5-4-1"
draft: false
lastmod: "2007-09-20T14:24:00Z"
id: 593738
url: "https://peter9.iteye.com/blog/593738"
---

下载地址

[http://sourceforge.net/project/showfiles.php?group\_id=12694&package\_id=11571&release\_id=528095](http://sourceforge.net/project/showfiles.php?group_id=12694&package_id=11571&release_id=528095)

我这里喜欢用windows的目录映射到linux下面，再用linux的文件方式安装windows下面的文件。

&gt;mount -t cifs -o username=administrator //192.168.1.1/Downloads/ /winshare/

&gt;password:

这样我们在linux下面的winshare目录看到downloads目录文件。

&gt;tar -zxvf /winshare/net-snmp-5.4.1.tar.gz

&gt;cd ./net-snmp-5.4.1

&gt;./configure

&gt;make

&gt;make install

如果安装成功可以执行下面语句

&gt;find / -name "snmpd.conf"

找到模版文件，再用cp把文件放到一个地方

com2sec local localhost public  
com2sec mynetwork 192.168.1.0/24 public

\####  
\# Second, map the security names into group names:

\# sec.model sec.name  
group MyRWGroup v1 local  
group MyRWGroup v2c local  
group MyRWGroup usm local  
group MyRWGroup usm initial  
group MyROGroup v1 mynetwork  
group MyROGroup v2c mynetwork  
group MyROGroup usm mynetwork

把红色部分改为

com2sec mynetwork 192.168.1.70 public

保存文件

&gt;/usr/local/sbin/snmpd -c /16/snmp/snmpd.conf

这样应该是执行snmp了

如果不确定，可以使用  
&gt;ps aux|grep snmpd

查看

\[root@localhost 16]# ps aux|grep snmpd  
root 23392 0.0 0.1 9932 3716 ? S 17:28 0:00 /usr/local/sbin/snmpd -c /16/snmp/snmpd.conf  
root 23878 0.0 0.0 4992 680 pts/0 S+ 22:18 0:00 grep snmpd

如果关闭执行

&gt;kill -9 23392

客户端可以使用SolarWinds Engineers Edition，检测liunx系统的各项参数

![bandwitdh](http://p.blog.csdn.net/images/p_blog_csdn_net/bayaci/bandwith.JPG)