1. Home
  2. Configuring
  3. OpMon
  4. Configuration
  5. How to enable SNMP Community on Linux?

How to enable SNMP Community on Linux?

There are 4 configuration groups to SNMP, in this example we will use the Traditional Access Control mode, recommended to situations where there isn’t  any pre configuration or specific need.

SNMP Installation on CentOS Operating System

yum install -y net-snmp*

SNMP Installation on Ubuntu/Debian Operating System

apt-get update 
apt-get install snmpd*

Configuring the SNMP

After finishing installation according to the proper operating system, the next step is to set up SNMP configurations. In order to do so, follow the nexts steps.

The following command will change SNMP original configuration file name.

mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf_original

Create the file /etc/snmp/snmp.conf and include the following line:

rocommunity public

Save and exite file.

Restart the SNMP service with the following command:

/etc/init.d/snmpd restart

After restarting SNMP service, perform a local test to verify that SNMP is running:

snmpwalk -v 1 -c public localhost sysname


Updated on June 9, 2017

Was this article helpful?