Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1246863
  • 博文数量: 125
  • 博客积分: 4372
  • 博客等级: 上校
  • 技术积分: 1055
  • 用 户 组: 普通用户
  • 注册时间: 2006-10-12 09:53
文章分类

全部博文(125)

文章存档

2019年(3)

2018年(2)

2017年(1)

2016年(2)

2015年(4)

2014年(11)

2013年(5)

2012年(4)

2011年(12)

2010年(10)

2009年(17)

2008年(17)

2007年(25)

2006年(12)

分类: 系统运维

2013-12-23 10:13:15

原文地址:Aix6.1开启snmp 作者:benxiong

AIX6.1 配置snmp方法如下:

1. #/usr/sbin/snmpv3_ssw -n

2. #vi /etc/snmpdv3.conf   (修改红色部分为如下内容)

  1. # @(#)88 1.8 src/tcpip/etc/snmpdv3.conf, snmp, tcpip61D, d2007_49A2 10/3/07 15:19:01
  2. # IBM_PROLOG_BEGIN_TAG
  3. # This is an automatically generated prolog.
  4. #
  5. # tcpip61D src/tcpip/etc/snmpdv3.conf 1.8
  6. #
  7. # Licensed Materials - Property of IBM
  8. #
  9. # Restricted Materials of IBM
  10. #
  11. # COPYRIGHT International Business Machines Corp. 2002,2007
  12. # All Rights Reserved
  13. #
  14. # US Government Users Restricted Rights - Use, duplication or
  15. # disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  16. #
  17. # IBM_PROLOG_END_TAG
  18. #----------------------------------------------------------------------------------------------------------------------------------------------------------
  19. # General syntax rules about the snmpdv3.conf file:
  20. # An entry must be contained on one line (i.e., the newline character will
  21. # be treated as the end of an entry)
  22. # All of the entry definitions require that all fields on the entry are
  23. # specified, either with a specific value or a dash (-) to denote the
  24. # default value.
  25. # If an error is detected processing an entry and no appropriate default
  26. # value can be assumed, the entry will be discarded.
  27. # Statements in the file are not order-dependent. However if more than one
  28. # DEFAULT_SECURITY statement is found, the last one in the file is the one
  29. # that is used.
  30. # Comments may be entered in the snmpdv3.conf file, with the following
  31. # restrictions:
  32. # Comments must begin with the pound sign (#) or asterisk (*).
  33. # Comments must begin in column 1; this allows the pound sign and asterisk
  34. # to be used in names of users, views, etc.
  35. #----------------------------------------------------------------------------------------------------------------------------------------------------------
  36. #----------------------------------------------------------------------------------------------------------------------------------------------------------
  37. # USM_USER entries
  38. # Defines a user for the User-based Security Model (USM).
  39. # Format is:
  40. # userName engineID authProto authKey privProto privKey keyType storageType
  41. #
  42. #----------------------------------------------------------------------------------------------------------------------------------------------------------
  43. #----------------------------------------------------------------------------------------------------------------------------------------------------------
  44. # VACM_GROUP entries
  45. # Defines a security group (made up of users or communities)
  46. # for the View-based Access Control Model (VACM).
  47. # Format is:
  48. # groupName securityModel securityName storageType
  49. #----------------------------------------------------------------------------------------------------------------------------------------------------------
  50. #----------------------------------------------------------------------------------------------------------------------------------------------------------
  51. # VACM_VIEW entries
  52. # Defines a particular set of MIB data, called a view, for the
  53. # View-based Access Control Model.
  54. # Format is:
  55. # viewName viewSubtree viewMask viewType storageType
  56. #----------------------------------------------------------------------------------------------------------------------------------------------------------
  57. #----------------------------------------------------------------------------------------------------------------------------------------------------------
  58. # VACM_ACCESS entries
  59. # Identifies the access permitted to different security groups
  60. # for the View-based Access Control Model.
  61. # Format is:
  62. # groupName contextPrefix contextMatch securityLevel securityModel readView writeView notifyView storageType
  63. #----------------------------------------------------------------------------------------------------------------------------------------------------------
  64. #----------------------------------------------------------------------------------------------------------------------------------------------------------
  65. # NOTIFY entries
  66. # Identifies management targets to receive notifications.
  67. # Format is:
  68. # notifyName tag type storageType
  69. #----------------------------------------------------------------------------------------------------------------------------------------------------------
  70. #----------------------------------------------------------------------------------------------------------------------------------------------------------
  71. # TARGET_ADDRESS
  72. # Defines a management application's address and parameters
  73. # to be used in sending notifications.
  74. # Format is:
  75. # targetAddrName tDomain tAddress tagList targetParams timeout retryCount storageType
  76. #----------------------------------------------------------------------------------------------------------------------------------------------------------
  77. #----------------------------------------------------------------------------------------------------------------------------------------------------------
  78. # TARGET_PARAMETERS
  79. # Defines the message processing and security parameters
  80. # to be used in sending notifications to a particular management target.
  81. # Format is:
  82. # paramsName mpModel securityModel securityName securityLevel storageType
  83. #----------------------------------------------------------------------------------------------------------------------------------------------------------
  84. #----------------------------------------------------------------------------------------------------------------------------------------------------------
  85. # COMMUNITY
  86. # Defines a community for community-based security.
  87. # Format is:
  88. # communityName securityName securityLevel netAddr netMask storageType
  89. #----------------------------------------------------------------------------------------------------------------------------------------------------------
  90. #----------------------------------------------------------------------------------------------------------------------------------------------------------
  91. # DEFAULT_SECURITY
  92. # Identifies the default security posture to be configured for the SNMP agent;
  93. # additional security definitions defined by the use of the preceding eight entry
  94. # definition types augment any default security configurations defined
  95. # as a result of the DEFAULT_SECURITY statement.
  96. # Format is:
  97. # securityPosture password privacy
  98. #----------------------------------------------------------------------------------------------------------------------------------------------------------
  99. #----------------------------------------------------------------------------------------------------------------------------------------------------------
  100. # logging file= enabled|disabled
  101. # logging size= level=
  102. #
  103. # where specifies the complete path and filename of the
  104. # log file, enabled turns logging on, disabled turns logging off,
  105. # specifies the maximum size in bytes of the specified logfile, and
  106. # specifies the logging level of 0, 1, 2, 3, or 4.
  107. # The size default is 100000, and the level default is 0.
  108. # There can be no white spaces around the "=" in the file, size and level fields.
  109. # There are no restrictions on the order in which the fields are entered in the
  110. # logging entries. A logging entry can contain single or multiple fields.
  111. #----------------------------------------------------------------------------------------------------------------------------------------------------------
  112. #----------------------------------------------------------------------------------------------------------------------------------------------------------
  113. # smux
  114. #
  115. # where is the unique object identifer in dotted
  116. # decimal notation of the SMUX peer client. specifies the
  117. # password that snmpd requires from the SMUX peer client to authenticate
  118. # the SMUX association.
    is either the hostname, or an IPv4 address
  119. # in dotted notation of the host, or an IPv6 address on which the SMUX peer
  120. # client is executing.
  121. # specifies the network mask for IPv4 address, or a prefix length for
  122. # IPv6 address. If no password is specified, there is no authentication for the
  123. # SMUX association. The default address and netmask are 127.0.0.1 and 255.255.255.255.
  124. # If neither the address nor netmask are specified, the SMUX association
  125. # is limited to the local host. Fields to the right of
  126. # are optional, with the limitation that no fields
  127. # to the left of a specified field are omitted.
  128. #----------------------------------------------------------------------------------------------------------------------------------------------------------
  129. #----------------------------------------------------------------------------------------------------------------------------------------------------------
  130. VACM_GROUP group1 SNMPv1 public -
  131. VACM_VIEW defaultView internet - included -
  132. VACM_VIEW defaultView 1.3.6.1.4.1.2.2.1.1.1.0 - included -
  133. VACM_VIEW defaultView 1.3.6.1.4.1.2.6.191.1.6 - included -
  134. # exclude snmpv3 related MIBs from the default view
  135. VACM_VIEW defaultView snmpModules - excluded -
  136. VACM_VIEW defaultView 1.3.6.1.6.3.1.1.4 - included -
  137. VACM_VIEW defaultView 1.3.6.1.6.3.1.1.5 - included -
  138. # exclude aixmibd managed MIBs from the default view
  139. VACM_VIEW defaultView 1.3.6.1.4.1.2.6.191 - included -
  140. VACM_ACCESS group1 - - noAuthNoPriv SNMPv1 defaultView - defaultView -
  141. NOTIFY notify1 traptag trap -
  142. TARGET_ADDRESS Target1 UDP 127.0.0.1 traptag trapparms1 - - -
  143. TARGET_PARAMETERS trapparms1 SNMPv1 SNMPv1 public noAuthNoPriv -
  144. COMMUNITY public public noAuthNoPriv 0.0.0.0 0.0.0.0 -
  145. DEFAULT_SECURITY no-access - -
  146. logging file=/usr/tmp/snmpdv3.log enabled
  147. logging size=100000 level=0
  148. smux 1.3.6.1.4.1.2.3.1.2.1.2 gated_password # gated
  149. VACM_GROUP director_group SNMPv2c public -
  150. VACM_ACCESS director_group - - noAuthNoPriv SNMPv2c defaultView - defaultView -

3. 停止snmpd及相关进程

# stopsrc -s aixmibd; stopsrc -s hostmibd; stopsrc -s snmpmibd; stopsrc -s snmpd

 

4. 启动snmpd及相关进程

#startsrc -s aixmibd -a "-c public"; startsrc -s hostmibd -a "-c public"
#startsrc -s snmpmibd -a "-c public"; startsrc -s snmpd

5. 配置开机启动

snmpd及相关进程开机启动是通过/et/rc.tcpip.

snmpd /etc/rc.tcpip
start /usr/sbin/snmpd "$src_running"
mib /etc/rc.tcpip  (在如下内容后面增加团体字)
# Start up the hostmibd daemon
start /usr/sbin/hostmibd "$src_running" "-c public"
# Start up the snmpmibd daemon
start /usr/sbin/snmpmibd "$src_running" "-c public"
# Start up the aixmibd daemon
start /usr/sbin/aixmibd "$src_running" "-c public"

阅读(2128) | 评论(0) | 转发(0) |
0

上一篇:U盘安装RHEL5.5

下一篇:TCP连接状态说明

给主人留下些什么吧!~~