您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 质量控制/管理 > 如何在各系统平台配置SNMP
在各系统平台配置SNMP一、Windows20081.打开服务器管理,选择功能选项,单击添加功能。2.勾选SNMP服务,单击“下一步”,自动安装3.在“管理工具”-“服务“,双击SNMPService,开始配置SNMP4.在“安全“栏,选择添加社区5.设置“社区名称”和“团体权限”6.添加主机7.输入IP地址8.配置完成,点击“确认”退出二、红旗Linux红旗linux系统,自带net-snmp,默认操作系统已安装net-snmp。#rpm-qa|grepnet-snmp//检查有无安装net-snmpnet-snmp-libs-5.1.2-18.2net-snmp-devel-5.1.2-18.2net-snmp-perl-5.1.2-18.2net-snmp-5.1.2-18.2net-snmp-utils-5.1.2-18.21.编辑net-snmp配置文件#vi/etc/snmp/snmpd.conf//添加以下绿色字体内容…#First,mapthecommunitynamepublicintoasecurityname#sec.namesourcecommunity#设置允许某个IP,通过public进行访问com2secmynetwork10.44.129.148public#####Second,mapthesecuritynameintoagroupname:#groupNamesecurityModelsecurityName…2.保存后,重启NET-SNMP服务#Servicesnmpdstop//停止snmpd服务#Servicesnmpdstart//启动snmpd服务三、HP-UXHP-UX默认已安装SNMP。1.编辑配置文件#ls–l/etc/snmpd*//系统默认创建了配置文件的链接到/etc/目录下Snmpd.conf--/etc/SnmpAgent.d/snmpd.conf#vi/etc/snmpd.conf//修改绿色字体部分如下:....get-community-name:publicIP:10.44.129.148#set-community-name:#entercommunityname#contact:#entercontactpersonforagent#location:#enterlocationofagent#max-trap-dest:#entermaxno.oftrap-destentriestobemaintained.#trap-dest:#entertrapdestination2.启动SNMP服务#snmpdStartSNMPMasterNetworkManagementdaemonSNMPResearchSNMPAgentResidentModuleVersion14.2.1.7Copyright1989,1990,1991,1992,1993,1994,1995,1996,1997SNMPResearch,Inc.StartSNMPHP-UNIXNetworkManagementsubAgentStartSNMPMIB-2NetworkManagementsubAgentStartSNMPTrapDestNetworkManagementsubAgentStartSNMPPCIFDDINetworkManagementsubAgent四、AIXAIX5.3默认已安装SNMP1.编辑配置文件#vi/etc/snmpd.conf//添加以下绿色字体部分…communitymynetwork10.44.129.148255.255.255.255readwrite…2.更改SNMP版本,系统默认版本为v3,需要更改为v1#/usr/sbin/snmpv3_ssw-1Stopdaemon:snmpmibdIn/etc/rc.tcpipfile,commentoutthelinethatcontains:snmpmibdIn/etc/rc.tcpipfile,removethecommentfromthelinethatcontains:dpid2Makethesymboliclinkfrom/usr/sbin/snmpdto/usr/sbin/snmpdv1Makethesymboliclinkfrom/usr/sbin/clsnmpto/usr/sbin/clsnmpneStartdaemon:dpid23.重启SNMP服务#stopsrc-ssnmpd0513-044ThesnmpdSubsystemwasrequestedtostop.#startsrc-ssnmpd0513-059ThesnmpdSubsystemhasbeenstarted.SubsystemPIDis200736.五、RedHatLinux1.安装net-snmp软件上传软件到系统,如上传到/tmp目录#cd/tmp#tar–zxvfnet-snmp-5.5.tar.gz//解压软件,自动解压生成/tmp/net-snmp-5.5目录#cd/tmp/net-snmp/net-snmp-5.5#./configure--prefix/opt/net-snmp//根据系统环境及某些自定义工程脚步生产Makefile,--prefix指定安装目录,需创建...***DefaultSNMPVersion:StartingwithNet-SNMP5.0,youcanchoosethedefaultversionoftheSNMPprotocoltousewhennoversionisgivenexplicitlyonthecommandline,orviaan'snmp.conf'file.InthepastthiswassettoSNMPv1,butyoucanusethistoswitchtoSNMPv3ifdesired.SNMPv3willprovideamoresecuremanagementenvironment(andthusyou'reencouragedtoswitchtoSNMPv3),butmaybreakexistingscriptsthatrelyontheoldbehaviour.(Thoughsuchscriptswillprobablyneedtobechangedtousethe'-c'communityflaganyway,astheSNMPv1commandlineusagehaschangedaswell.).Atthispromptyoucanselect1,2(forSNMPv2c),or3asthedefaultversionforthecommandtools(snmpget,...)touse.Thiscanalwaysbeoverriddenatruntimeusingthe-vflagtothetools,orbyusingthedefVersiontokeninyoursnmp.conffile.Providingthe--with-default-snmp-version=xparameterto./configurewillavoidthisprompt.DefaultversionofSNMPtouse(3):2//设置默认版本v2***SystemContactInformation:Describeswhoshouldbecontactedaboutthehosttheagentisrunningon.ThisinformationisavailableintheMIB-IItree.Thiscanalsobeover-riddenusingthesyscontactsyntaxintheagent'sconfigurationfiles.Providingthe--with-sys-contact=contactparameterto./configurewillavoidthisprompt.SystemContactInformation(root@):root@redhat.com//输入邮箱地址***SystemLocation:Describesthelocationofthesystem.ThisinformationisavailableintheMIB-IItree.thiscanalsobeover-riddenusingthesyslocationsyntaxintheagent'sconfigurationfiles.Providingthe--with-sys-location=locationparameterto./configurewillavoidthisprompt.SystemLocation(Unknown):Guangzhou//设置设备地址***Logfilelocation:Enterthedefaultlocationforthesnmpdagenttodumpinformation&errorsto.Ifnotdefined(enterthekeywordnoneatthepromptbelow)theagentwillusestdoutandstderrinstead.(Note:Thisvaluecanbeover-riddenusingcommandlineoptions.)Providingthe--with-logfile=pathparameterto./configurewillavoidthisprompt.Locationtowritelogfile(/var/log/snmpd.log)://回车,设置默认日志文件***snmpdpersistentstoragelocation:EnteradirectoryfortheSNMPlibrarytostorepersistentdataintheformofaconfigurationfile.Thisdefaultlocationisdifferentthantheolddefaultlocation(whichwasforucd-snmp).Ifyoustaywiththenewpath,I'llaskyouinasecondifyouwishtocopyyourfilesovertothenewlocation(onceonly).Ifyoupicksomeotherpaththanthedefault,you'llhavetocopythemyourself.Thereisnothingwrongwithpickingtheoldpath(/var/ucd-snmp)ifyou'drather.Providingthe--with-persistent-directory=pathparameterto./configurewillavoidthisprompt.Locationtowritepersistentinformation(/var/net-snmp)://回车,设置数据存储目录,…..---------------------------------------------------------Net-SNMPconfigurationsummary:---------------------------------------------------------SNMPVersionsSupported:12c3Buildingfor:linuxNet-SNMPVersion:5.5Networktransportsupport:CallbackUnixAliasTCPUDPSNMPv3SecurityModules:usmAgentMIBcode:default_modules=snmpv3mibsmibIIucd_snmpnotificationnotifi
本文标题:如何在各系统平台配置SNMP
链接地址:https://www.777doc.com/doc-3852547 .html