• Increase font size
  • Default font size
  • Decrease font size

How do I configure an SNMP server on Linux

 First, install the required packages:

* net-snmp (this provides the snmp server)

* net-snmp-utils (this provides tools like snmp-walk)

 

To configure an SNMP server, community strings need to be defined. This is done in the following configuration file:

 

 /etc/snmp/snmpd.conf  

 

The version of the configuration file that comes with SNMP is quite complicated. A simpler version will suffice for the setup discussed in this article.

 

Before proceeding further, make a backup of the old configuration file. It is highly recommended to do this any time that a configuration file is changed. Use the following commands:

 

 # cd /etc/snmp/ # mv snmpd.conf snmpd.conf.old  

 

Follow these steps:

 

  • Enter the following line in the new configuration file to set the Read Only community string to testuser:

 rocommunity testuser 127.0.0.1  

 

  • Now, configure the SNMP services on each reboot with the following chkconfig command:

 # chkconfig snmpd on  

 

  • Restart SNMP to load the new configuration file:

 # service snmpd restart  

If the service does not start up correctly, check the configuration file for errors.  
  
  Test whether SNMP can read the system and interface information from the localhost with the following two commands.

 snmpwalk -v 1 -c testuser localhost system  snmpwalk -v 1 -c testuser localhost interface  

If these return information, then SNMP is set up correctly. If not, then make sure your firewall allows access and that there's no other security policy in place that prevents access (tcpwrappers/selinux). If those are OK, check the configuration file for errors.

Read more :http://kbase.redhat.com/faq/docs/DOC-8797

Tags:


 

Add comment


Security code
Refresh

Category

Login Form