- 论坛徽章:
- 0
|
关于运行SNMP的问题
下面是我安装SNMP的过程,各位看看那里有问题:
1、安装ucd-snmp-4.2.6
# pkg_add http://ftp.it.net.au/OpenBSD/3.6/packages/i386/ucd-snmp-4.2.6.tgz
2、配置ucd-snmp-4.2.6
# snmpconf -g basic_setup
将会出现一个询问菜单,按如下步骤进行回答:
Do you want to configure the information returned in the system MIB group (contact info, etc)? (default = y): y
The location of the system: HeBei,China
The contact information: llzqq@126.com
Do you want to properly set the value of the sysServices.0 OID (if you don't know, just say no)? (default = y): y
does this host offer physical services (eg, like a repeater) [answer 0 or 1]: 1
does this host offer datalink/subnetwork services (eg, like a bridge): 0
does this host offer internet services (eg, supports IP): 1
does this host offer end-to-end services (eg, supports TCP): 1
does this host offer application services (eg, supports SMTP): 1
Do you want to configure the agent's access control? (default = y): y
Do you want to allow SNMPv3 read-write user based access (default = y): n
Do you want to allow SNMPv3 read-only user based access (default = y): n
Do you want to allow SNMPv1/v2c read-write community access (default = y): n
Do you want to allow SNMPv1/v2c read-only community access (default = y): y
The community name to add read-only access for: bsd
The hostname or network address to accept this community name from [RETURN for all]: localhost
The OID that this community should be restricted to [RETURN for no-restriction]: (RETURN)
Do you want to configure where and if the agent will send traps? (default = y): n
将会生成具有如下内容的snmpd.conf:
rocommunity bsd 192.168.0.1
sysservices 77
syscontact llzqq@126.com
syslocation hebei,china
注意:请删除无用的说明部分!之后执行下列命令:
# cp snmpd.conf /usr/local/share/snmp/
# cp snmpd.conf /etc/snmpd.conf
启动snmpd
# vi /etc/rc.local
if [ -x /usr/local/sbin/snmpd ]; then
/usr/local/sbin/snmpd -c /etc/snmpd.conf && echo -n ' snmpd'
fi |
|