Skip to content

How to install and configure SNMP on Ubuntu

sudo apt-get install snmpd
sudo apt-get install snmp
sudo mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bak

Create a blank /etc/snmp/snmpd.conf file with the following:

rocommunity public

Modify /etc/default/snmpd

Change from:

# snmpd options (use syslog, close stdin/out/err).
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1'

To:

# snmpd options (use syslog, close stdin/out/err).
#SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1'
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid -c /etc/snmp/snmpd.conf'
Restart the SNMP daemon.

Restart snmp service

sudo /etc/init.d/snmpd restart
Published inLinuxOther

Comments are closed.