1. 安装包下载
http://net-snmp.sourceforge.com 版本 5.1.1
安装主机
Freebsd4.5
IP : 192.168.0.70
Domain Name : freebsd.nanjing-fnst.com
其他: openssl需要
2. 安装net-snmp
#tar -zxvf net-snmp-5.1.1.tar.gz
3. patches 补丁
[1] agent/mibgroup/mibII/tcpTable.c
720行
#if0/* replaced by zhangfl 2004.02.26 - start - */
nnew->state = StateMap[((struct xinpcb *) xig)->xt_tp.t_state];
if (nnew->state == 5 /* established */ ||
nnew->state == 8 /*closeWait*/ )
tcp_estab++;
memcpy(&(nnew->pcb), &(((struct xinpcb *) xig)->xt_inp),
sizeof(struct inpcb));
#else
#if defined(__FreeBSD__)
memcpy(&(nnew->pcb), &(((struct xinpcb *) xig)->xi_inp),
sizeof(struct inpcb));
#else
nnew->state = StateMap[((struct xinpcb *) xig)->xt_tp.t_state];
if (nnew->state == 5 /* established */ ||
nnew->state == 8 /*closeWait*/ )
tcp_estab++;
memcpy(&(nnew->pcb), &(((struct xinpcb *) xig)->xt_inp),
sizeof(struct inpcb));
#endif
#endif/* replaced by zhangfl 2004.02.26 - end - */
[2] agent/mibgroup/mibII/udpTable.c
#if1/* added by zhangfl 2004.02.26 -start- */
#if defined(__FreeBSD__)
#undefINP_NEXT_SYMBOL
#define INP_NEXT_SYMBOL inp_next
#endif
#endif/* added by zhangfl 2004.02.26 - end - */
udpTable_next_entry()
{
...
#if0/* replaced by zhangfl 2004.02.26 - start - */
*loop_context = (void*)entry->INP_NEXT_SYMBOL;
#else
*loop_context = LIST_NEXT(entry, inp_list);
#endif/* replaced by zhangfl 2004.02.26 - end - */
...
}
udpTable_free()
{
...
#if0/* replaced by zhangfl 2004.02.26 - start - */
udp_head = udp_head->INP_NEXT_SYMBOL;
#else
udp_head = LIST_NEXT(udp_head, inp_list);
#endif/* replaced by zhangfl 2004.02.26 - end - */
...
}
udpTable_load()
{
...
#if0/* replaced by zhangfl 2004.02.26 - start - */
memcpy(nnew, ((struct xinpcb *) xig)->xi_inp, sizeof(struct inpcb));
nnew->next = udp_head;/* XXX - ?? Check 'next' pointer */
#else
memcpy(nnew, &(((struct xinpcb *) xig)->xi_inp),
sizeof(struct inpcb));
LIST_NEXT(nnew, inp_list) = udp_head;
#endif/* replaced by zhangfl 2004.02.26 - end - */
...
}
#cd net-snmp-5.1.1
#./configure --enable-ipv6 --with-perl-modules --with-mib-modules="suizu"
*** Default SNMP Version:
Starting with Net-SNMP 5.0, you can choose the default version of
the SNMP protocol to use when no version is given explicitly on the
command line, or via an 'snmp.conf' file.In the past this was set to
SNMPv1, but you can use this to switch to SNMPv3 if desired.SNMPv3
will provide a more secure management environment (and thus you're
encouraged to switch to SNMPv3), but may break existing scripts that
rely on the old behaviour.(Though such scripts will probably need to
be changed to use the '-c' community flag anyway, as the SNMPv1
command line usage has changed as well.).
At this prompt you can select "1", "2" (for SNMPv2c), or "3" as
the default version for the command tools (snmpget, ...) to use.This
can always be overridden at runtime using the -v flag to the tools, or
by using the "defVersion" token in your snmp.conf file.
Providing the --with-default-snmp-version="x" parameter to ./configure
will avoid this prompt.
Default version of SNMP to use (3): 回车
*** System Contact Information:
Describes who should be contacted about the host the agent is
running on.This information is available in the MIB-II tree.This
can also be over-ridden using the "syscontact" syntax in the agent's
configuration files.
Providing the --with-sys-contact="contact" parameter to ./configure
will avoid this prompt.
System Contact Information (root@nanjing-fnst.com): root@freebsd.nanjing-fnst.com 回车
*** System Location:
Describes the location of the system.This information is
available in the MIB-II tree.this can also be over-ridden using the
"syslocation" syntax in the agent's configuration files.
Providing the --with-sys-location="location" parameter to ./configure
will avoid this prompt.
System Location (Unknown):回车
*** Logfile location:
Enter the default location for the snmpd agent to dump
information & errors to.If not defined (enter the keyword "none"
at the prompt below) the agent will use stdout and stderr instead.
(Note: This value can be over-ridden using command line options.)
Providing the --with-logfile="path" parameter to ./configure
will avoid this prompt.
Location to write logfile (/var/log/snmpd.log):回车
*** snmpd persistent storage location:
Enter a directory for the SNMP library to store persistent
data in the form of a configuration file.This default location is
different than the old default location (which was for ucd-snmp).If
you stay with the new path, I'll ask you in a second if you wish to
copy your files over to the new location (once only).If you pick
some other path than the default, you'll have to copy them yourself.
There is nothing wrong with picking the old path (/var/ucd-snmp) if
you'd rather.
Providing the --with-persistent-directory="path" parameter to
./configure will avoid this prompt.
Location to write persistent information (/var/net-snmp):回车
#make
#make install
4. 如果需要安装SNMP.pm perl模块
#cd net-snmp/perl
#perl Makefile.PL -NET-SNMP-CONFIG="sh ../../net-snmp-config" -NET-SNMP-IN-SOURCE=true
#make
#make test
#make install
分享到:
相关推荐
freebsd+nginx+php+mysql+zend系统优化防止ddos +傻瓜式ports安装
描述如何在同一系统上使用Linux和FreeBSD。
基于FreeBSD+rrdtool+cacti的流量监控系统 ----配置说明
freebsd-device-drivers_code
FreeBSD-12.2-RELEASE-amd64-dvd.iso 操作系统 网盘下载地址 确保资源可用
本文介绍使用FreeBSD+Postfix+Cyrus-sasl+Courier-imap+Webmail+spamassassin+Clamav+mailscanner+maildrop来架构一个具有多域名,webmail、防病毒、防垃圾邮件、web管理界面的邮件系统。 Jacky, $Revision: 5.1...
邮件服务器安装 postfix+vm-pop3d+openwebmail clamav+amavisd-new+spam 安装笔记v.1.0.1
FreeBSD系统安装手册,便于查询解决查询烦恼。
基于FreeBSD+Snort的轻量级检测系统(IDS) 安装部署文档
FreeBSD-使用手册,word版本方便大家阅读。
Jpcap已在微软视窗(98/2000/XP/Vista)测试,Linux操作系统(Fedora的,的Mandriva,Ubuntu的),Mac OS X的(达尔文),FreeBSD和Solaris操作系统。 Jpcap可以捕获以太网的IPv4,IPv6的ARP协议/ RARP时,TCP,UDP...
FreeBSD6.1安装手册
众所周知,FreeBSD 提供了软件的 ports 安装方式,可以很方便的定制安装所需要的应用软件.当我们装好系统之后,当然首先想到是配置 web 服务器,FreeBSD 默认标准安装并没有安装 apache,mysql 和 php,所以就要亲自动手...
资源分类:Python库 所属语言:Python 资源全名:stock-0.2.freebsd-10.0-RELEASE-amd64.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
unix-FreeBSD-9.0安装详解
FreeBSD+Nginx环境搭建教程.pdf
+-------------------------+ ShopNC【B2B2C】电商系统 +-------------------------+ ShopNC【B2B2C】电商系统是目前世界最领先的电商运营平台,特有的供应商入驻、买卖家分离、 佣金结算、售后服务体系等功能更...
本文实例讲述了Zend Framework框架中实现Ajax的方法。分享给大家供大家参考,具体如下: 开发平台:Windows XP SP2 测试平台:FreeBSD 7.0 开发工具:Netbeans 6.1 ...| +----+-------+-------------------
FREEBSD系统,关于网络的各种命令 原理介绍。对网络的学习和理解很有帮助。FREEBSD的确是一个好的学习网络的平台