|
[1]
http://www.google.com.hk/search?q=snmpd++site:linuxsir.org&hl=en&safe=active&prmd=ivns&ei=gQfBTarnKYjKvQOhvZDABA&start=80&sa=N
http://www.google.com.hk/search?q=snmpd++%E9%87%8D%E5%90%AF&btnG=Search&hl=en&safe=active&sa=2
http://www.google.com.hk/search?hl=en&source=hp&q=cacti+snmpd+%E9%85%8D%E7%BD%AE&aq=f&oq=&aqi=
[2]
http://www.linuxsir.org/bbs/thread312965.html
[3]
http://space.itpub.net/7201003/viewspace-592442
linux 下snmp 的配置
上一篇 / 下一篇 2009-05-02 19:43:53 / 个人分类:linux
查看( 306 ) / 评论( 0 ) / 评分( 0 / 0 )
1.下载net-snmp-5.3.pre4.tar.gz包.
编译,安装
[iyunv@haha net-snmp-5.2.1]# ./configure --prefix=/usr/local/net-snmp-5.2.1
[iyunv@haha net-snmp-5.2.1]#make
[iyunv@haha net-snmp-5.2.1]#make install
2.创建放配置文件的目录
[iyunv@haha net-snmp-5.2.1]# mkdir /etc/snmp
3.拷贝配置文件
将解压出来的包中的EXAMPLE.conf拷贝到刚创建的目/etc/snmp中,并命名为snmpd.conf
[iyunv@haha net-snmp-5.2.1]# cp -R EXAMPLE.conf /etc/snmp/snmpd.conf
4.修改配置文件
[iyunv@haha net-snmp-5.2.1]# vi /etc/snmp/snmpd.conf
找到如下行,将其改为你想要的字符串,和网络
# sec.name source community
com2sec local localhost COMMUNITY
com2sec mynetwork NETWORK/24 COMMUNITY
例如
com2sec local localhost COMMUNITY
com2sec mynetwork 192.168.1.0/24 abcpublic
注意要用192.168.1.0/24 MS不能用192.168.1.1/24.另外改后要重启snmp才能生效.
5.开启snmp
[iyunv@haha net-snmp-5.2.1]# /usr/local/net-snmp-5.2.1/sbin/snmpd -Lsd -Lf /dev/null -p /var/run/snmpd -a -c /etc/snmp/snmpd.conf
6.重启.
[iyunv@haha net-snmp-5.2.1]# killall -9 snmpd
root@haha net-snmp-5.2.1]# /usr/local/net-snmp-5.2.1/sbin/snmpd -Lsd -Lf /dev/null -p /var/run/snmpd -a -c /etc/snmp/snmpd.conf
1、确保本机已经安装了snmp服务
[iyunv@idc ~]# rpm -qa |grepsnmp
net-snmp-libs-5.1.2-11.EL4.7
net-snmp-5.1.2-11.EL4.7
如果没有,那么放入linux安装盘找到snmp的rpm包进行安装,或者到网上搜索适合自己linux发行版本的rpm包进行安装
如果提示有依赖关系,那么通过yum install net-snmp-5.3.1…….rpm来安装。
2、snmpd.conf文件配置
按照如下方式修改snmpd.conf文件
A、修改默认的community string
com2sec notConfigUser default public
将public修改为你才知道的字符串
B、把下面的#号去掉(是干什么用的还没找到答案)
#view mib2 included .iso.org.dod.internet.mgmt.mib-2 fc
C、下面列出的是可以访问的oid,比如.1.3.6.1.2.1.1表示可以访问sys组的信息
# Make at least snmpwalk -v 1 localhost -c public system fast again.
# name incl/excl subtree mask(optional)
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.25.1.1
view systemview included .1.3.6.1.2.1.2
view systemview included .1.3.6.1.2.1.4
D、把下面的语句
access notConfigGroup "" any noauth exact systemview none none
改成:
access notConfigGroup "" any noauth exact mib2 none none
是为了禁止对mib2的访问
3、重启snmpd服务
#/etc/rc.d/init.d/snmpd restart
或#service snmpd restart
完成snmpd的配置
4、确保linux的iptables防火墙对我们的流量监控服务器开放了udp 161端口的访问权限
可使用iptables –L –n 查看当前iptables规则
可编辑/etc/sysconfig/iptables文件来修改iptables规则。
[转自hongliangpan]
[4]
http://blogold.chinaunix.net/u/4764/showart_2013803.html
snmpd NAME
snmpd - daemon to respond to SNMP request packets.
# 注释 :snmpd 命令是响应 SNMP 请求的守护进程
SYNOPSIS
snmpd [OPTIONS] [LISTENING ADDRESSES]
# 注释 :语法格式是 snmpd 后面加上选项或者监听地址
# 补充 :Redhat 9 默认的启动命令是 :snmpd -s -l /dev/null -P /var/run/snmpd -a
# -)使用 syslog 记录日志
# -)输出信息送到 /dev/null
# -)pid 文件是 /var/run/snmpd
# -)记录 snmp 请求的地址
DESCRIPTION
snmpd is an SNMP agent which binds to a port and awaits requests from
SNMP management software. Upon receiving a request, it processes the
request(s), collects the requested information and/or performs the
requested operation(s) and returns the information to the sender.
# 注释 :snmpd 是一个 SNMP 代理,绑定到某个端口上,并且等待来自 SNMP 管理软件或者工作站的请求。
# 一旦收到请求后,就处理请求,收集相关信息,或者完成某个动作,然后返回信息给发送者
OPTIONS
-a Log the source addresses of incoming requests.
# 注释 :-a 记录 incoming 请求的源地址
-A Append to the log file rather than truncating it.
# 注释 :-A 表示对日志进行追加操作,而不是清空操作
-c FILE Read FILE as a configuration file.
# 注释 :-c <FILE> 表示读取某个文件以作为配置文件
-C Do not read any configuration files except the one optionally
specified by the -c option.
# 注释 :-C 表示不要读取任何配置文件除了 -C 列出的那个
-d Dump (in hexadecimal) the sent and received SNMP packets.
# 注释 :-d 选项表示导出发送和接收的 SNMP packets
-D[TOKEN[,...]]
Turn on debugging output for the given TOKEN(s). Without any
tokens specified, it defaults to printing all the tokens (which
is equivalent to the keyword "ALL"). You might want to try ALL
for extremely verbose output. Note: You can not put a space
between the -D flag and the listed TOKENs.
-f Do not fork() from the calling shell.
# 注释 :-f 选项表示不执行 fork 操作,也就是不以守护进程方式运行,而是在前台运行
-g GID Change to the numerical group ID GID after opening listening
sockets.
# 注释 :-g <GID> 表示在打开监听 socket 后将组id改为指定的 gid
-h, --help
Display a brief usage message and then exit.
# 注释 ;-h 显示帮助信息
-H Display a list of configuration file directives understood by
the agent and then exit.
# 注释 :-H 选项显示所有 snmpd 知道的配置文件指令然后退出
-I [-]INITLIST
This option specifies which modules you do (or do not) want to
be initialized when the agent starts up. If the comma-sepa-
rated INITLIST is preceded with a '-', it is the list of mod-
ules that you do not want to be started. Otherwise, INITLIST
is the list of modules to be started.
# 注释 :-I [-] <list> 是用于指定 snmpd 在启动时加载或者不加载那些模块。
# 如果 <list> 前面是一个减号,则认为是禁止 snmpd 加载指定模块
# <list> 是一个用逗号分隔的列表
To get a list of compiled modules, run the agent with the argu-
ments -Dmib_init -H (assumes you have debugging support com-
piled in).
# 注释 :那么如何知道 snmpd 有那些模块呢?可以执行 snmpd -Dmib_init -H
-l [FILE]
Log all output from the agent (including stdout and stderr) to
FILE. If no filename is given, log to a default file set at
compile time (normally /var/log/snmpd.log).
# 注释 :-l [file] 选项将snmpd 产生的所有输出(包括标准输出和标准错误)都记录到指定的文件中。
# 假如没有给出文件名,记录到默认的文件 /var/log/snmpd.log 中
# 补充 :在 Redhat 9 中,-l 指向的是 /dev/null ,所以不会保存任何信息
-L Do not open a log file; print all messages to stderr instead.
# 注释 :-L 选项表示不记录日志,所有的输出都写到 stderr
-P FILE Save the process ID of the daemon in FILE.
# 注释 :-P <file> 表示 snmpd 的 pid 文件。
# 默认为 /var/run/snmpd
-q Print simpler output for easier automated parsing.
# 注释 :-q 选项打印简单的输出,以便于其他程序处理日志
-r Do not require root access to run the daemon. Specifically, do
not exit if files only accessible to root (such as /dev/kmem
etc.) cannot be opened.
# 注释 :-r 选项表示不强制以 root 身份启动守护进程。特别是当某些文件只有 root 才能访问的时候不要退出。
-s Use syslog for logging.
# 注释 :-s 选项表示使用 syslog 来记录日志
-S d|0-7
Specifies the syslog facility to use when logging to syslog.
'd' means LOG_DAEMON and 0 through 7 mean LOG_LOCAL0 through
LOG_LOCAL7. LOG_DAEMON is the default.
# 注释 :-S <daemon>|<0-7> 表示使用什么 facility 来记录日志。默认是 LOG_DAEMON 。
# 也就是记录为 snmpd
-u UID Change to the user ID UID (which can be given in numerical or
textual form) after opening listening sockets.
# 注释 :-u <uid> 表示在打开监听 sockets 之后切换 uid 为指定值
# <uid> 部分可以为用户名或者 uid
# 问题 :执行 snmpd -u bob ,看 snmpd 进程是否为 bob 所有
-v, --version
Print version information for the agent and then exit.
# 注释 :-v 选项打印 snmpd 命令的版本并退出
-V Symbolically dump SNMP transactions.
# 注释 :-V 选项“象征性”地导出 SNMP 事务
-x ADDRESS
Listens for AgentX connections on the specified address rather
than the default '/var/agentx/master'. The address can either
be a Unix domain socket path, or the address of a network
interface. The format is the same as the format of listening
addresses described below.
# 注释 :-x <address> 选项表示监听 AgentX 的地址。
# <address> 可以是 socket 文件的路径,也可以是 ip 地址
# 问题 :什么是 AgentX ?
-X Run as an AgentX subagent rather than as an SNMP master agent.
# 注释 :-X 选项表示运行一个 AgentX 子代理,而不是是一个 SNMP 主代理
LISTENING ADDRESSES
By default, snmpd listens for incoming SNMP requests only on UDP port
161. However, it is possible to modify this behaviour by specifying
one or more listening addresses as arguments to snmpd. A listening
address takes the form:
# 注释 :默认情况下,SNMP 的监听地址为 UDP 161 端口。
# 但也可以修改为一个或者多个其他的地址,格式如下 ;
[<transport-specifier>:]<transport-address>
At its simplest, a listening address may consist only of a port number,
in which case snmpd listens on that UDP port on all IPv4 interfaces.
Otherwise, the <transport-address> part of the specification is parsed
according to the following table:
# 注释 :最简单的就是一个端口。这种情况下,snmp 在所有的 ipv4 接口的指定的 udp 端口上监听
# 如果要指定特定的地址,可以按照以下格式
# 注释 :其中的 transport-specifier 是指 tcp 还是 udp
# tranport-address 就是 “主机名:端口” 或者 “ip:端口”的格式了
# 如果是 unix sockets 格式的,则 transport-specific 为 unix ,后面的 transport-address 为 socket 文件的路径
# 注释 :注意,udp或者tcp或者unix后面要接一个 ':' 而后才是 “主机名:端口”或者 “ip:端口”
# 也就是 snmpd [udp|tcp|unix]:[hostname | ip]:[port]
# 各个部分都是可选的,默认就是 0.0.0.0:161 udp,如果某部分忽略不写,则使用默认值
# 例如只在 127.0.0.1 上监听而已,可以执行 snmpd udp:127.0.0.1 或者 snmpd udp:127.0.0.1:161
<transport-specifier> <transport-address> format
udp hostname[:port] or IPv4-address[:port]
tcp hostname[:port] or IPv4-address[:port]
unix pathname
ipx [network]:node[/port]
aal5pvc or pvc [interface.][VPI.]VCI
udp6 or udpv6 or udpipv6 hostname[:port] or IPv6-address[:port]
tcp6 or tcpv6 or tcpipv6 hostname[:port] or IPv6-address[:port]
Note that <transport-specifier> strings are case-insensitive so that,
for example, "tcp" and "TCP" are equivalent. Here are some examples,
along with their interpretation:
# 注释 :要注意,这里的传输协议部分和主机名是不区分大小写的,所以 udp 和 UDP 是相同的
127.0.0.1:161 listen on UDP port 161, but only on the loop-
back interface. This prevents snmpd being
queried remotely (which is a bit pointless).
The ":161" is redundant here since that is the
default SNMP port in any case.
TCP:1161 listen on TCP port 1161 on all IPv4 interfaces.
ipx:/40000 listen on IPX port 40000 on all IPX interfaces.
unix:/tmp/local-agent listen on the Unix domain socket /tmp/local-
agent.
/tmp/local-agent identical to the previous specification, since
the Unix domain is the default transport iff
the first character of the <transport-address>
is a '/'.
PVC:161 listen on the AAL5 permanent virtual circuit
with VPI=0 and VCI=161 (decimal) on the first
ATM adapter in the machine.
udp6:10161 listen on port 10161 on all IPv6 interfaces.
Note that not all the transport domains listed above will always be
available; for instance, hosts with no IPv6 support will not be able to
use udp6 transport addresses, and attempts to do so will result in the
error "Error opening specified endpoint". Likewise, since AAL5 PVC
support is only currently available on Linux, it will fail with the
same error on other platforms.
CONFIGURATION FILES
snmpd checks for the existence of and parses the following files:
/snmp/snmp.conf
Common configuration for the agent and applications. See
snmp.conf(5) for details.
# 注释 :/etc/snmp/snmp.conf 是 Agent 和 应用程序的公用配置
/snmp/snmpd.conf
/snmp/snmpd.local.conf
Agent-specific configuration. See snmpd.conf(5) for details.
These files are optional and may be used to configure access con-
trol, trap generation, subagent protocols and much else besides.
# 注释 :/etc/snmpd.conf 和 /etc/snmpd.local.conf 是配置 snmpd 的文件。
# 可以用于配置访问控制,trap 消息的产生,子代理等等
In addition to these two configuration files in /snmp, the agent
will read any files with the names snmpd.conf and
snmpd.local.conf in a colon separated path specified in the SNMP-
CONFPATH environment variable.
# 注释 :除此之外,snmpd 还会通过 $SNMP-CONFPATH 变量读取所有名称为 snmpd.conf 或者 snmpd.local.conf 的文件
/usr/share/snmp/mibs/
The agent will also load all files in this directory as MIBs. It
will not, however, load any file that begins with a '.' or
descend into subdirectories.
# 注释 :/usr/share/snmp/mibs 是 snmp 存放 MIBs 文件的位置。
# 不过 snmpd 不会加在那些以 '.' 开头的文件,也不会读取子目录下的文件
SEE ALSO
(in recommended reading order)
snmp.conf(5), snmpd.conf(5)
4th Berkeley Distribution 7 Feb 2002 SNMPD(8)
[5]
http://blog.sunyixing.com/?p=112
rrdtool, net-snmp, cacti监控系统配置[original]
Posted by Thomas on April 7, 2010
Leave a comment (0)
Go to commentsVersionDateDescription
1.02010-4-9Initial Draft
1.12010-4-15Update: net-snmp installation, pa installation
转载请说明出处 http://blog.sunyixing.com/?p=112
一、系统组件:
cacti: http://www.cacti.net/
rrdtool: http://oss.oetiker.ch/rrdtool/
php: http://www.php.net/
mysql: http://www.mysql.com/
netsnmp: http://net-snmp.sourceforge.net/
WEBSERVER: lighttpd or apache or nginx,这里选用lighttpd,开启fastcgi
二、安装(CENTOS系统)
1. mysql安装及配置(略)
2. lighttpd安装及配置(略)设服务目录为/var/www
3. php 安装及配置
修改php.ini:
safe_mode = Off
max_execution_time = 180
3. rrdtool 安装
wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.3.tar.gz
tar zxvf rrdtool-1.4.3.tar.gz
安装过程以及相关库的安装参考解压目录中的 doc/rrdbuild.txt
4. net-snmp安装
如果系统比较老(4.x),可能需要安装beecrypt库和elf库,如果已经有就不用了,直接安装net-snmp即可。
cd /tmp/build
wget http://downloads.sourceforge.net/project/beecrypt/beecrypt/4.2.1/beecrypt-4.2.1.tar.gz?use_mirror=cdnetworks-kr-1
tar zxvf beecrypt-4.2.1.tar.gz
cd beecrypt-4.2.1
./configure && make && make install
ln -s /usr/local/lib/libbeecrypt.la /usr/lib/
yum install -y elfutils-libelf-devel
cd ..
wget http://sourceforge.net/projects/net-snmp/files/net-snmp/5.5/net-snmp-5.5.tar.gz/download
tar zxvf net-snmp-5.5.tar.gz
cd net-snmp-5.5
echo "\n2\n\n\n"|./configure --prefix=/opt/snmp --enable-mfd-rewrites && make && make install
本来预编译过程中会有交互的过程,在这里通过echo管道来直接传递,这样的效果就是除默认snmp协议类型设置为2以外其他直接回车
编辑 /opt/snmp/snmpd.conf 内容如下
rocommunity monitor
rwcommunity monitoradmin
agentaddress 161
view mib2 included .iso.org.dod.internet.mgmt.mib-2 fc
access notConfigGroup "" any noauth exact mib2 none none
view all included .1 80
killall snmpd
/opt/snmp/sbin/snmpd -c /opt/snmp/snmpd.conf
/opt/snmp/bin/snmpwalk -v2c -c monitor localhost hrStorageTable
若有输出则工作正常
5. cacti安装
wget http://www.cacti.net/downloads/cacti-0.8.7e.tar.gz
tar zxvf cacti-0.8.7e.tar.gz
mv cacti-0.8.7e /var/www/monitor
mysql添加数据库monitor
create database monitor;
grant all on monitor.* to cacti@localhost identified by 'cacti';
导入表结构
cd /var/www/monitor
mysql monitor < cacti.sql
配置mysql连接信息,编辑 include/config.php,内容如下
$database_type = "mysql";
$database_default = "monitor";
$database_hostname = "localhost";
$database_username = "cacti";
$database_password = "cacti";
$database_port = "3306";
安装spine
cacti的监控是通过php程序 poller.php 调用cmd.php 来定时轮询受监控主机的,spine则是轮询的C实现,更加高效。但是调用还是通过poller.php调用,这样在配置crontab的时候不需要作额外的修改
cd /tmp/build
wget http://www.cacti.net/downloads/spine/cacti-spine-0.8.7e.tar.gz
tar zxvf cacti-spine-0.8.7e.tar.gz
cd cacti-spine-0.8.7e
./configure --prefix=/opt/spine && make && make install
6. cacti 全局配置
访问 http://yourip/monitor
初始用户名密码都是admin
Console -> Settings
设置:
a. general选项卡
RRDTool Utility Version 为 RRDTool 1.3.x
SNMP Version 为 Version 2
SNMP Community 为 monitor
SNMP Timeout 为 5000
b. Path选项卡
在各项中填入正确的安装路径,RRDTool Default Font Path可以不填
选中 Structured RRA Path (/host_id/local_data_id.rrd)单选框
c. Poller选项卡
Poller type 为 spine
Maximum Concurrent Poller Processes 为 10
Maximum Threads per Process 为 10
Number of PHP Script Servers 为 10
Script and Script Server Timeout Value 为 30
The Maximum SNMP OID’s Per SNMP Get Request 为 30
7. crontab设置
*/5 * * * * /usr/local/bin/php /var/www/monitor/poller.php > /dev/null 2>&1
至此cacti应该能够正常工作了,日志可以通过
Console -> System Utilities -> View Cacti Log File 查看,日志精度可通过
Console -> Poller Logging Level 调整
三. 添加受监控主机信息
首先建立自己的监控模板,此次我们主要监控外挂的存储分区、网络流量以及Load Average信息。
Console -> Host Templates -> Add
输入 mytemplate, 点击create
在Associated Graph Templates添加以下几项
ucd/net – Available Disk Space
Interface – Traffic (bits/sec)
ucd/net – Load Average
在Associated Data Queries添加以下几项
SNMP – Get Mounted Partitions
SNMP – Interface Statistics
点击save
下面开始受监控机信息的录入,首先在受监控机上按照上述安装步骤安装net-snmp并启动snmpd。
设置cacti:
Console -> Devices -> Add
Hostname :主机ip
Description 自定义,但一般同Hostname一样设置为ip
Host Template 设置为 mytemplate
其他选项的默认值应该与之前在Settings里的全局设定相同,一般不需要修改了,点击Create
在刷出来的页面中(可能要等很久,根据网络情况而定,不要取消)选择Data Source List -> Add
Selected Data Template 选择 Host MIB – Available Disk Space -> create
Index Type 选择 New Graphs
Host 选择当前要配置的主机IP
这时应该能看到以下的主机信息,选中我们要监控的磁盘,Load Average,以及相应的网络接口,注意如果网卡是千兆的,则需要在下面的Select a graph type中选中In/Out Bits (64-bit Counters)。
点击create完成受监控机的信息录入
如果要将这台主机的监控数据展示出来,需要将其添加到Graph Tree中:
Console -> Graph Tree, 可以自己建一个Tree,也可以直接添加到Default Tree中,这里添加到Default Tree,点击Default Tree -> Add,
Tree Item Type 选择 Host
Host 选择刚刚添加的主机,点击Create
随着监控数据的录入,监控的曲线图就可以展示出来了,查看监控图就是通过graphs选项卡进入相应的Graphs Tree来查看,最终的样子也就是如此
其他更详细的配置都可以通过cacti来定制,也可以自己编写脚本来查自己需要的数据,也可以通过插件来实现,插件的安装首先需要安装对应版本的Plugin Architecture,也就是PA,0.8.7e对应的版本为2.6,安装方式有两种,一种是通过diff文件打patch,另一种是简单的文件替换。因为笔者在调试cacti的时候对代码做了一些改动所以打patch的方式并不合适,在这里采用直接覆盖原文件的方法。安装过程如下:
cd /var/www/monitor
wget http://mirror.cactiusers.org/downloads/plugins/cacti-plugin-0.8.7e-PA-v2.6.zip
unzip cacti-plugin-0.8.7e-PA-v2.6.zip
cd cacti-plugin-arch/files-0.8.7e
\cp * -rf /var/www/monitor/
mysql monitor < ../pa.sql
vi /var/www/monitor/include/global.php
将$config['url_path']变量修改为cacti安装目录相对于document root的路径
$config['url_path'] = ‘/monitor/’
以上完成了对PA的安装,下面要在系统设置中开启管理员对plugin的管理权限,设置路径
Console -> User Management -> admin -> 勾选 Plugin Management -> save
[6]
http://www.linuxsir.org/bbs/thread196674.html
标题: 终于在LFS上成功安装mrtg监视linuxserver流量(附过程)
LFS做什么也要自己动手,自然不如RH那样方便,但折腾也是个学习的过程,起码要多看很多资料才能明白,乐趣也在其中。LFS上能做成的经验应该也适用于其它发行版,LFS是最纯粹的LINUX嘛,呵呵。
搞mrtg试验了半天,终于成功了,写出安装的过程:
1、首先,确认机器上有GCC、Perl、gd、libpng和zlib,缺一不可!并且你的机器上有apache服务,这是自然的了。
2、到http://www.net-snmp.net/download.html下载net-snmp的最新版本,我下载的是net-snmp-5.2.1.tar.gz,解压后开始编译:
./configure --prefix=/usr/local/snmp
在这个configure过程中它会问你信箱和系统信息,直接回车即可!
然后make && make install 完成安装。
3、新版的net-snmp不提供snmp.conf(或snmpd.conf)这个文件,为什么呢?可以看这里的说明:http://www.net-snmp.net/docs/FAQ.htm..._in_snmp_conf_ ,咱们可以自己动手创建这个文件,用这个命令:/usr/local/snmp/bin/snmpconf,回答它的一些问题就可以创建一个snmp.conf,如果你嫌麻烦,可以直接用我这个:
PHP 代码:
######
com2sec notConfigUser default public #定义community名称为 public,映射到安全名 notConfigUser。
group notConfigGroup v1 notConfigUser #定义安全用户名notConfigUser映射到notConfigGroup组。
group notConfigGroup v2c notConfigUser
group notConfigGroup v3 notConfigUser
#定义** 看的snmp的范围:
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.25.1.1
view all included .1
#给notConfigGroup组所定义view名 all 以只读权限:
access notConfigGroup "" any noauth exact all none none
view mib2 included .iso.org.dod.internet.mgmt.mib-2 fc
access notConfigGroup "" any noauth exact mib2 none none
rocommunity mrtg # 这一句一定要有!
这个snmp.conf(或snmpd.conf)文件参考自 http://chinaunix.net/jh/4/243757.html ,最后一句 recommunity mrtg 是我参考其它文章加上去的。
写好了snmp.conf(或snmpd.conf),把它复制到/usr/local/snmp/share/snmp/目录下,就可以起作用了,以root身分运行/usr/local/snmp/sbin/snmpd ,应该可以成功。
4、安装mrtg:
下载最新的mrtg-2.11.1.tar.gz,解压编译:
./configure--prefix=/usr/local/mrtg-2 --with-gd=/usr/include --with-gd-lib=/usr/lib --with-gd-inc=/usr/include --with-png=/usr/include --with-zlib=/usr/include && make && make install
接着:
mkdir /usr/local/apache/htdocs/mrtg
(请注意,这里与你的WWW主页的放置地点有关,请按照你的系统来设定,另外,由于我们需要设定网络流量、CPU使用率,因此在mrtg中,再建立两个子目录,比较容易管理。)
mkdir /usr/local/apache/htdocs/mrtg/net
cp images/* /usr/local/apache/htdocs/mrtg/net
到现在我们就已经正确地安装了MRTG系统。
5、设定MRTG的方法如下:
cd /usr/local/mrtg-2/bin &&
. /cfgmaker --output=/usr/local/apache/htdocs/mrtg/net/index.cfg \ mrtg@10.0.0.99
(注意:10.0.0.99是我的机器地址,你可以用域名,也可以用地址)
下面要改动一下index.cfg的内容:
vi /usr/local/apache/htdocs/mrtg/net/index.cfg
把下面两项前面的#去掉,并且修改WorkDir项为你自己机器的实际情况:
WorkDir:/usr/local/apache/htdocs/mrtg/net/
Options[_]:growright,bits
有的文章说还要加上一个Language:GB2312,不过好象容易出问题,不加也罢。
开始测试 ./mrtg /usr/local/apache/htdocs/mrtg/net/index.cfg
做三次!前两次一定会出问题,第三次会正常,如果还有问题,就要检查index.cfg了!修改执行直到没错误。
制作首页自动地输出一个index.html的文件中:
./indexmaker --output=/usr/local/apache/htdocs/mrtg/index.html --title=yourhostname /usr/local/apache/htdocs/mrtg/net/index.cfg
(说明,有的文章说--output选项中要把index.html文件放在mrtg/net/目录下,但我试了一下,不能正常显示,所以我把index.html放在了mrtg下)
试试看:用浏览器访问 http://localhost/mrtg/ ,能看到了。
使用手工运行mrtg并不能定时产生适当的统计信息,因此最好还是定时自动运行mrtg来生成统计信息,默认为五分钟运行一次。作为root身份crontab -e进入编辑状态,添加内容如下:
*/5 * * * * /usr/local/mrtg-2/bin/mrtg /usr/local/apache/htdocs/mrtg/net/index.cfg
如果想加上检测CPU负载量,网上有很多资料可以参考,呵呵。
以上内容是我结合chinaunix中的文档和赛迪网仇立环的文章做的,如有错误,希望大家指正。
此帖于 05-05-06 12:13 被 万里北国 编辑.
[7]
http://www.linuxsir.org/bbs/thread307398.html
标题: cacti-流量监控软件--安装and流量生成
这几天公司需要更换流量监控系统,花了半天的时间搞定了,我把我的过程写下来,希望大家给点建议.以下是安装和流量生成过程.希望能对正在搞cacti的朋友一点帮助.
1:系统版本 centos3.7
2:环境:
[iyunv@localhost root]# mysql -V
mysql Ver 11.18 Distrib 3.23.58, for redhat-linux-gnu (i386)
[iyunv@localhost root]# httpd -v
Server version: Apache/2.0.46
Server built: Mar 31 2006 15:15:47
[iyunv@localhost root]# php -v
PHP 4.3.2 (cgi), Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
# rrdtool-1.0.50.tar.gz
# cacti-0.8.6j.tar.gz
3:所需软件
mysql apache php rrdtool net-snmp cacti
4:配置详情
5:生成流量图
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
本文我们采用centos3.7来配置cacti 为了不浪费时间,mysql apache php 完全采用rpm来安装,这就省下了很多的编译过程,关键是节约了时间,他们的版本已经在上边列出.
前面注意一个地方就是在mysql中添加cacti的数据库.
设置mysql
mysql –uroot –p
create database cactidb;
grant all on cactidb.* to root;
grant all on cactidb.* to root@localhost;
grant all on cactidb.* to cactiuser;
grant all on cactidb.* to cactiuser@localhost;
set password for cactiuser@localhost=password('lanmang');
exit
其实这个只需要参考 less cacti/docs/INSTALL就可以搞定了.
下面我们主要说说后边的安装.
rrdtool主要是用来画图的,也就是描绘出漂亮的流量图,我比较建议安装rrdtool1.0的,他自带gd库,这就免去了好多的麻烦.
tar –zxvf rrdtool-1.0.50.tar.gz
./configure –prefix=/usr/local/rrdtool
Make
Make install
大约需要量0分钟的编译过程,这个时候我们去找找或者是下载一下:net-snmp
我准备在光盘取但是发觉还差好几个.
于是去了centos的官方的镜象站点:http://mirror.centos.org/ 速度不错哟!
所需要的包:
net-snmp-5.1.2-11.i386.rpm
net-snmp-devel-5.1.2-11.i386.rpm
net-snmp-libs-5.1.2-11.i386.rpm
net-snmp-perl-5.1.2-11.i386.rpm
net-snmp-utils-5.1.2-11.i386.rpm
安装net-snmp主要是用net-snmp中的两个命令――snmpwalk和snmpget进行数据的采集,然后与rrdtool相结合来绘出图来.
在安装net-snmp-devel-5.1.2-11.i386.rpm还需要安装另外一个相关的包.也许你的系统不需要安装.
elfutils-libelf-devel-0.94.1-2.i386.rpm
elfutils-libelf-0.94.1-2.i386.rpm
elfutils-devel-0.94.1-2.i386.rpm
elfutils-0.94.1-2.i386.rpm
安装以上的包后,最后就来安装cacti了.
安装cacti 到官方下载最新的版本,地址:www.cacti.net
tar –zxvf cacti-0.8.6j.tar.gz
cp -rf cacti-0.8.6j /var/www/html下(由于我是rpm来安装的apache,如果是编译的apche,一般都在/usr/local/apache//htdocs/)
cd cacto-0.8.6j
cat cacti.sql |/usr/local/mysql/bin/mysql cactidb -uroot -p
这个地方需要先添加用户cactiuser
groupadd cacti
useradd -c"cacti account" -d /dev/null -g cacti -s /sbin/nologin cactiuser
chown –R cactiuser rra/ log/
vi /var/www/html/cacti/include/config.php
配置以下代码:
$database_type = “mysql”;
$database_default = “cactidb”;
$database_hostname = “localhost”;
$database_username = “cactiuser”;
$database_password = “lanmang”;
vi /etc/crontab
添加:*/5 * * * * cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&1
页面设置 在浏览器上输入: http://IP/cacti
进入cacti的初始设置页面:初始帐号 admin admin
在这里我们要输入一些原始的信息:主要是对rrdtool net-snmp的binary路径的对照
注意路径的正确性
安装完成
***********************************************************
未完待续下面是详细的生成流量图的过程
上面已经安装完cacti 就只剩下最后的工序了,生成流量图.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1:本地服务器的流量的检测.
2:远程监控单台服务器.
3:对交换机的流量监控.
4:通过cacti生成流量图.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
(1)如果要对本机的监控就需要修改snmpd.conf snmp设置默认设置不允许取这些数据。
vi /etc/snmp/snmpd.conf
找到:
# sec.name source community
com2sec notConfigUser default public
将"comunity"字段改为你要设置的密码.比如"lanmang".---------F1
将“default”改为“安装了cacti机器的IP”
# Finally, grant the group read-only access to the systemview view.
# group context sec.model sec.level prefix read write notif
#access notConfigGroup "" any noauth exact roview rwview none
将read改为all
## incl/excl subtree mask
#view all included .1 80
去掉红色的#
重新启动snmpd
Service snmpd restart
Chkconfig –-level 3 snmpd on (让snmpd运行在rc3.d)
(2)添加单台的机器就需要让该机器安装上snmp协议.
A:添加windows机器,首先需要在该机器上安装上snmp协议,方法应该大家都知道吧,就是添加删除程序中,在网络管理协议中勾选安装即可.
安装好后具体的设置方法:
由于windows 2003的Snmp默认是不允许直接访问的。需要进行一些参数的配置。
安装完Snmp以后在Windows 的服务里的Snmp Service可以看到安全选项。
选择上 发送身份验证陷阱 ,添加 团体为 public ,权限为 只读 。
在下方选择 接受来自这些主机的snmp 数据包,添加上snmp browser 的IP地址。
B:添加unix机器,前面已经说过了,安装net-snmp软件包的嘛,如果是linux的就应该在/etc/snmp/snmpd.conf 也就是上边的------F1
(3)添加交换机,这里需要配置三层交换机,或者是路由器,这个地方我是个菜,我就不在这里月亮坝里耍大刀了.只要配置好可以网络管理好就行了.
********************
(4)最后就是简单的流量图的生成,其实很简单了,当你通过http://ip/cacti进入cacti的管理界面后,上面明确的说明:fellow the table
附件:1.jpg
++++++++++++++++
a.创建设备
b:为设备创建流量
c:查看流量图.
+++++++++++++++++
(a):console----Devices----add,输入该主机描述,ip地址,点击create创建完成
(b):创建完后,最上面的有:*Create Graphs for this Host 单击, 继续--Graph Templates---Graph Templates name 选中你所需要的功能,save.
然后把主机添加默认树:
console----Graph TreesGrap----Default Tree----add----Tree Item Type (host)----tetle(主机ip),然后就完成了。
(c):最后就等一会,等待recovering---重生.
流量截图:
附件:
2.jpg
3.jpg
上传的缩略图
[8]
http://www.linuxsir.org/bbs/lastpostinthread227796.html
标题: 你还在用mrtg吗?--使用cacti监测系统性能(ZT)
CU原贴地址:
http://bbs.chinaunix.net/viewthread....ilter%3Ddigest
欢迎转载 ,但有任何修改請?硇鸥嬷,不得作为商业用途
作者: JoeCen[joecen{at}21cn{dot}com]
转载时请保持该通告
前言:
在CU的论坛上经常看到有人问MRTG的问题,还有很多的关于MRTG的精彩文章。MRTG的确是非常好的东东,但我认为它毕竟已经是一套很旧的软件了,其作者在多年前就已经开发了RRDTool代替该软件,现在已经发展得很成熟。既然有更好的选择,为什么我们还要用MRTG呢?
第一部分,介绍:
2004年我刚进某公司工作,当时我使用MRTG建立了一套系统,专门监测我们服务器和其它网络设备的流量。
后来我想将其它的系统性能比如CPU负载、系统负载,网络连接数等一起监测起来。我在网上查找了很多的资料,也实现了这些功能,但总觉得实现的太费劲,管理起来太麻烦了。比如我有几百个被监测点,分布在不同的机房,而且我需要将这些服务器和网络设备分类,这样的话我就要将这些被监测点放在不同的mrtg配置文件中,运行多个crontab,而且自己还写了一些html页面对其进行管理。
后来有幸看到了abelyang兄写的大作“rrdtool 教學”,里面列举了rrdtool的种种优点,于是我下定决心要将MRTG更换为rrdtool。
MRTG的优点:简单、易上手,基本安装完了之后只要更改一下配置文件即可。
缺点:
1、使用文本式的数据库,数据不能重复使用;
2、只能按日、周、月、年来查看数据;
3、只能画两个DS(一条线、一个块);
4、每取一次数据即需要绘图一次,浪费系统资源;
5、无管理功能;
rrdtool的优点:
1、使用rrd存储格式,数据能重复使用,比如我可以将一个rrd文件中的数据与另一个rrd文件中的数据相加。
2、可以定义任意时间段画图,即你可以画出一张半年以来的数据的图,也可以画出一张半小时以来的图。
3、能画任意个DS。
4、CDEF让你能任意摆弄数据。
缺点:
1、rrdtool的作用只是存储数据和画图,它没有mrtg中集成的数据采集功能;
2、在命令行的使用非常复杂,参数极多。
3、无管理功能。
简单的说,rrdtool就是一个强大的绘图的引擎。
由于其非常复杂的命令,对用户非常不友好,我一度想自己用php写一套系统。幸运的是,半年前我找到了cacti(www.cacti.net)。对该工具我只有一个字形容:“great!”。
cacti其实是一套php程序,它运用snmpget采集数据,使用rrdtool绘图。它的界面非常漂亮,能让你根本无需明白rrdtool的参数能轻易的绘出漂亮的图形。更难能可贵的是,它提供了强大的数据管理和用户管理功能,一张图是属于一个host的,每一个host又可以挂载到一个树状的结构上。用户的管理上,作为一个开源软件,它居然做到为指定一个用户能查看的“树”、host、甚至每一张图,还可以与LDAP结合进行用户的验证!我不由得佩服作者考虑的周到!Cacti还提供自己增加模板的功能,让你添加自己的snmp_query和script!可以说,cacti将rrdtool的所有“缺点”都补足了!
最近在公司的内部培训中,我为Cacti画了两张图,里面是cacti的架构和cacti的工作流程,现在也一并发上来。
Cacti的架构
Cacti的工作流程
上传的缩略图
__________________
第二部分:Cacti的安装
该安装文档是我参照www.cacti.net上的官方文档进行安装后,总结出来的。平台是Linux或FreeBSD。
1、安装mysql
下载源码:
http://www.signal42.com/mirrors/mysq...-4.0.23.tar.gz
for linux:
http://www.signal42.com/mirrors/mysq...ux-i686.tar.gz
for freebsd47:
http://www.signal42.com/mirrors/mysq....7-i386.tar.gz
上面的链接已经失效,请到
http://dev.mysql.com/downloads/mysql/4.1.html
或
http://www.mysql.com
下载mysql数据库
安装:
代码:
shell>; groupadd mysql
shell>; useradd -g mysql mysql
shell>; cd /usr/local
shell>; gunzip < /PATH/TO/MYSQL-VERSION-OS.tar.gz | tar xvf -
shell>; ln -s FULL-PATH-TO-MYSQL-VERSION-OS mysql
shell>; cd mysql
shell>; scripts/mysql_install_db --user=mysql
shell>; chown -R root .
shell>; chown -R mysql data
shell>; chgrp -R mysql .
shell>; bin/mysqld_safe --user=mysql &
./bin/mysqladmin -u root password "yourpasswd"
基于安全的原因,为root用户设置密码才能让root用户登陆mysql,不然会有2002错误出现
建立启动脚本:
代码:
cp ./support-files/mysql.server /etc/init.d/mysql
ln -s ../init.d/mysql S85mysql
ln -s ../init.d/mysql K85mysql
2、安装apache
下载:
http://apache.freelamp.com/httpd/httpd-2.0.54.tar.bz2
安装:
代码:
./configure --prefix=/www --enable-so
make && make install
建立启动脚本
代码:
cp /www/bin/apachectl /etc/init.d/httpd
cd /etc/rc3.d
ln -s ../init.d/httpd S85httpd
ln -s ../init.d/httpd K85httpd
启动
/www/bin/apachectl start
3、安装php
下载:
http://us4.php.net/get/php-4.3.10.ta...php.net/mirror
安装:
代码:
/configure --prefix=/www/php --with-apxs2=/www/bin/apxs --with-config-file-path=/www/php --enable-sockets --with-mysql=/usr/local/mysql --with-zlib-dir=/usr/include --with-gd
make && make install
cp php.ini-dist /www/php/php.ini
vi /www/conf/httpd.conf
加入:
###############for php and cacti###################
AddType application/x-tar .tgz
AddType application/x-httpd-php .php
AddType image/x-icon .ico
DirectoryIndex index.php index.html index.html.var
#######################over########################
../bin/apachectl restart
4、设置mysql
代码:
# mysql -u root -prootroot
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10 to server version: 4.0.23-standard
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>; create database cactidb;
Query OK, 1 row affected (0.00 sec)
mysql>; grant all on cactidb.* to root;
Query OK, 0 rows affected (0.01 sec)
mysql>; grant all on cactidb.* to root@localhost;
Query OK, 0 rows affected (0.01 sec)
mysql>; grant all on cactidb.* to cactiuser;
Query OK, 0 rows affected (0.00 sec)
mysql>; grant all on cactidb.* to cactiuser@localhost;
Query OK, 0 rows affected (0.01 sec)
mysql>; set password for cactiuser@localhost=password('cactipw');
Query OK, 0 rows affected (0.00 sec)
mysql>; exit
5、安装rrdtool
下载:
http://people.ee.ethz.ch/~oetiker/we...-1.0.50.tar.gz
然后
./configure
make && make install 即可
与mrtg相比,rrdtool自带了gd库,所以不用先安装gd库.(不过由于rrdtool自带的gd库不支持中文,所以rrdtool画出来的图也不能有中文,否则会出现乱码).
注意:rrdtool1.2的版本由于已经不再自带外部的lib库(如cgilib,zlib等),所以需要从http: //people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/libs/下载这些库来安装。建议还是使用 1.0的版本,比较方便。
6、安装net-snmp
几乎所有的网络设备和操作系统默认都安装了snmp服务。
unix系统安装的都是net-snmp或ucd-snmp(其实两个都是同一组人写的)。
如果没有安装snmp,可以到net-snmp.sourceforge.org上下载源码编译安装。
我这里说的安装SNMP服务并不是要求安装SNMPD,其实是Cacti需要用到net-snmp中的两个命令――snmpwalk和snmpget进行数据的采集。
我们可以直接在系统中运行snmpwalk和snmpget看是否有该命令,如果有则不用安装了。
7、安装cacti
注意:写该文档时cacti的最高版本时0.8.6c,现在的最高版本是0.8.6f。由于0.8.6f以下的版本有SQL注入漏洞,请大家下载0.8.6f或以上的版本进行安装。
下载:
http://www.cacti.net/downloads/cacti-0.8.6c.tar.gz
安装:
代码:
cp cacti-0.8.6c.tar.gz /www/htdocs
tar xzvf cacti-0.8.6c.tar.gz
mv cacti-0.8.6c cacti
cd cacti
导入表:
/usr/local/mysql/bin/mysql –u root –prootroot cactidb < cacti.sql
chown –R cactiuser rra/ log/
设置配置文件:
vi /www/htdocs/cacti/include/config.php
$database_type = “mysql”;
$database_default = “cactidb”;
$database_hostname = “localhost”;
$database_username = “cactiuser”;
$database_password = “cactipw”;
核对以上几项是否正确
Crontab –u cactiuser –e
为cactiuser用户加入
*/5 * * * * /www/php/bin/php /www/htdocs/cacti/poller.php >; /dev/null 2>;&1
(不要使用root用户运行上面的命令,否则要再运行一次chown –R cactiuser rra/ log/)
8、页面设置:
在浏览器上输入:
http://IP/cacti
进入cacti的初始设置页面:
在这里我们要输入一些原始的信息:
NEXT -》
输入一些信息,如rrdtool、php、snmpwalk、snmpget的位置,使用ucd-snmp还是net-snmp等 -》
输入原始的用户和密码:admin/admin -》
更改admin用户的密码 -》
点击 Save
安装完成!!!
现在可以在浏览器中进入Cacti的世界了!
此帖于 05-10-31 11:09 被 hongfeng 编辑.
-----
开始考虑到大家都用过MRTG,应该对snmp有所了解,所有没有将snmp的配置写上来。现在发现有些朋友发贴说不能取到CPU和系统负载的数据,其原因应该是snmp设置默认没有允许取这些数据造成的。下面是我对linux和 FreeBSD下的net-snmp的一些简单的配置。
一、Linux(RedHat)的配置
打开默认的/etc/snmp/snmpd.conf文件,更改如下配置:
1、查找以下字段:
代码:
# sec.name source community
com2sec notConfigUser default public
将"comunity"字段改为你要设置的密码.比如"public".
将“default”改为你想哪台机器可以看到你的snmp信息,如10.10.10.10。
2、查找以下字段:
代码:
####
# Finally, grant the group read-only access to the systemview view.
# group context sec.model sec.level prefix read write notif
access notConfigGroup "" any noauth exact all none none
将"read"字段改为all.
代码:
#access notConfigGroup "" any noauth exact systemview none none
3、查找以下字段:
代码:
## incl/excl subtree mask
#view all included .1 80
将该行前面的"#"去掉.
保存关闭.
4、运行/etc/init.d/snmpd start命令运行snmpd.
最后运行netstat -ln查看161端口是否打开了.
二、FreeBSD
如果使用port安装net-snmp,默认的配置文件应该是在/usr/local/share/snmp/snmpd.conf(没有默认的文件)。
可以建立一个简单的配置文件,如:
代码:
syslocation YourDefineName
syscontact YourEmailAddress
sysservices 77
rocommunity public (请更改)
load 12 12 12
然后运行snmpd,netstat 看是否打开了161端口。
上述用法只针对默认的安装,如果你是自定义的安装请依照你的安装目录来设置。
Cacti虽然只是一套开源软件,但我觉得它比起其它的商业管理软件来说真的是毫不逊色,而MRTG根本就无法与其相比,希望大家能好好使用。
真心希望在论坛上看到讨论得最多的是Cacti和RRDTool而不只是MRTG。
参考:
http://bbs.chinaunix.net/forum/v ... p;highlight=RRDTOOL
http://www.cacti.net/downloads/docs/...tall_unix.html
cacti的使用文档:
http://www.cacti.net/downloads/docs/html/
Cacti FAQ:
http://www.cacti.net/downloads/docs/html/faq.html
代码:
从之前的贴子可以看出,大家最关心的有两个问题:
1、是如何在cacti中实现rrdtool的合并数据的功能;
2、是如何自定义脚本,建立自己的监测内容。
其实如果你了解rrdtool的话,这两个问题不难解决。
由于本贴实在是太长了,所有我新开了一贴专门讲这些问题。
http://bbs.chinaunix.net/forum/viewtopic.php?show_type=&p=4257111
[9]
http://www.linuxsir.org/bbs/thread232026.html
标题: Cacti如何监控其他机器(关于SNMP的疑问)
如果要管理稍微有点规模的网络,监控是必须的。mrtg,包括现在比较好的Cacti。都是通过snmp获取数据的。
我现在有一点疑问,如何获取另一台Linux上snmp的cpu,disk的信息(在这台linux上snmp已经运行,通过教本可以获取信息)比如
more loadavg.pl
#!/usr/bin/perl
#get load avg for 5;15;30 min
$avg = `uptime`;
$avg =~ s/.*://;
if ($ARGV[0] eq "5") {
$avg = `echo "$avg" | awk '{print $1 }'`;
}
if ($ARGV[0] eq "15") {
$avg = `echo "$avg" | awk '{print $2 }'`;
}
if ($ARGV[0] eq "30") {
$avg = `echo "$avg" | awk '{print $3 }'`;
}
chomp $avg;
$avg =~ s/,//;
$avg =~ s/n//;
print $avg;
这样的教本 perl loadavg.pl 可以获得 0.00 0.05, 0.08 这样的信息, 但是如果通过snmp把这个信息传给debian这台监控的机器,是否只要debian 连通linux上的snmp,就可以获得信息,
如果有使用Cacti经验的指导下。
=========
rrd 准确来说是 日志+画图引擎。
Cacti 是把RRD收集到的资料画图。
RRD是收集资料,也带有画图功能。
cat /etc/snmp/snmpd.conf
syslocation "xxxxxxx"
syscontact xxxxx@yyy
rocommunity public
然后在cacti中添加主机,类型为ucd/net snmp host
hostname 为该机的IP地址,SNMP Community设置为public(与你的配置文件中相同),版本为2
剩下的你就应该知道如何做了?(如果你用过cacti的话。)
如果你对cacti一无所知的话,就比较麻烦了。
[10]
http://www.linuxsir.org/bbs/showthread.php?t=77246
你rpm -ivh snmpd 看看,如果安装了,就没有依赖问题,如果没有满足依赖,下面会报错,提示缺少哪些文件和包,然后先在光盘里面找,或者上rpmfind这个网站搜索也可以!
[11] |
|