Example—Installing Net-SNMP
Net-SNMP is an open source implementation of the Simple Network Management Protocol.
Net-SNMP provides an extensible agent for responding to SNMP queries for management information, and this functionality is important to the Media Discovery module Net-SNMP includes built-in support for a wide range of MIB information modules, specifically the Host Resource MIB. Net-SNMP is available for many Linux and Linux-like operating systems and also for Microsoft Windows, though functionality can vary depending on the operating system.
To install net-snmp:
1. Download and install Perl 5.6 or above, if you the package is not already installed.
2. Install net-snmp as outlined in the following example:
# /usr/local/bin/snmpconf -g basic_setup
*** Beginning basic system information setup ***
Do you want to configure the information returned in the system MIB group
(contact info, etc)? (default = y): no
Do you want to properly set the value of the sysServices.0 OID (if you don't know, just say no)? (default = y): no
*** BEGINNING ACCESS CONTROL SETUP ***
Do you want to configure the agent's access control? (default = y):
Do you want to allow SNMPv3 read-write user based access (default = y): no
Do you want to allow SNMPv3 read-only user based access (default = y): no
Do you want to allow SNMPv1/v2c read-write community access (default = y): no
Do you want to allow SNMPv1/v2c read-only community access (default = y): yes
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: public
The hostname or network address to accept this community name from [RETURN for all]:
The OID that this community should be restricted to [RETURN for norestriction]:
Finished Output: rocommunity public
Do another rocommunity line? (default = y): no
*** Beginning trap destination setup ***
Do you want to configure where and if the agent will send traps? (default= y): no
*** Beginning monitoring setup ***
Do you want to configure the agent's ability to monitor various aspects of your system? (default = y): no
The following files were created:
snmpd.conf
3. Move the snpd.conf file to one of the following locations:
• If you want this file used by everyone on the system, moved the file to /usr/local/share/snmp. Next time, use the -i option if you want the command to copy the files to that location automatically.
• If you want the file for your personal use only, copy the file to your HOME directory. Next time, use the -p option if you want the command to copy the file to that location automatically.
4. Ensure that user root starts the snmpd executable that is located in /usr/local/sbin/snmpd.