Recovered from the older tannerjc.net wiki snapshot dated January 23, 2016.

Simple SNMPv2 read only community configuration

[john@farina ~]$ su -
Password:
[root@farina ~]# service snmpd status
snmpd is stopped
[root@farina ~]# vi /etc/snmp/snmp
snmpd.conf      snmptrapd.conf
[root@farina ~]# vi /etc/snmp/snmpd.conf
[root@farina ~]# cd /etc/snmp/
[root@farina snmp]# cp snmpd.conf snmpd.conf.backup
[root@farina snmp]# snmpconf

The following installed configuration files were found:

   1:  ./snmpd.conf
   2:  ./snmptrapd.conf
   3:  /etc/snmp/snmpd.conf
   4:  /etc/snmp/snmptrapd.conf

Would you like me to read them in?  Their content will be merged with the
output files created by this session.

Valid answer examples: all, none,3,1,2,5

Read in which (default = all): 3

I can create the following types of configuration files for you.
Select the file type you wish to create:
(you can create more than one as you run this program)

   1:  snmpd.conf
   2:  snmptrapd.conf
   3:  snmp.conf

Other options: quit

Select File: 1

The configuration information which can be put into snmpd.conf is divided
into sections.  Select a configuration section for snmpd.conf
that you wish to create:

   1:  System Information Setup
   2:  Agent Operating Mode
   3:  Access Control Setup
   4:  Extending the Agent
   5:  Trap Destinations
   6:  Monitor Various Aspects of the Running Host

Other options: finished

Select section: 3

Section: Access Control Setup
Description:
  This section defines who is allowed to talk to your running
  snmp agent.

Select from:

   1:  a SNMPv3 read-write user
   2:  a SNMPv3 read-only user
   3:  a SNMPv1/SNMPv2c read-only access community name
   4:  a SNMPv1/SNMPv2c read-write access community name

Other options: finished, list

Select section: 3

Configuring: rocommunity
Description:
  a SNMPv1/SNMPv2c read-only access community name
    arguments:  community [default|hostname|network/bits] [oid]

The community name to add read-only access for: farina.dj.edm
The hostname or network address to accept this community name from [RETURN for all]: 192.168.2.0/24
The OID that this community should be restricted to [RETURN for no-restriction]:

Finished Output: rocommunity  farina.dj.edm 192.168.2.0/24

Section: Access Control Setup
Description:
  This section defines who is allowed to talk to your running
  snmp agent.

Select from:

   1:  a SNMPv3 read-write user
   2:  a SNMPv3 read-only user
   3:  a SNMPv1/SNMPv2c read-only access community name
   4:  a SNMPv1/SNMPv2c read-write access community name

Other options: finished, list

Select section: finished

The configuration information which can be put into snmpd.conf is divided
into sections.  Select a configuration section for snmpd.conf
that you wish to create:

   1:  System Information Setup
   2:  Agent Operating Mode
   3:  Access Control Setup
   4:  Extending the Agent
   5:  Trap Destinations
   6:  Monitor Various Aspects of the Running Host

Other options: finished

Select section: finished

I can create the following types of configuration files for you.
Select the file type you wish to create:
(you can create more than one as you run this program)

   1:  snmpd.conf
   2:  snmptrapd.conf
   3:  snmp.conf

Other options: quit

Select File: quit

Error: An snmpd.conf file already exists in this directory.

'overwrite', 'skip', 'rename' or 'append'? : overwrite

The following files were created:

  snmpd.conf

These files should be moved to /usr/share/snmp if you
want them used by everyone on the system.  In the future, if you add
the -i option to the command line I'll copy them there automatically for you.

Or, if you want them for your personal use only, copy them to
/root/.snmp .  In the future, if you add the -p option to the
command line I'll copy them there automatically for you.

[root@farina snmp]#
[root@farina snmp]# rpm -qa | grep snmp
net-snmp-libs-5.5-21.fc14.x86_64
net-snmp-5.5-21.fc14.x86_64
[root@farina snmp]# service snmpd start
Starting snmpd:                                            [  OK  ]
[root@farina snmp]#