Subscribe via feed.

Easily Install Snmp On Ubuntu

Posted by The Squad on November 11, 2009 – 4:42 pm

Want to get snmp up and running quick and dirty, then here it is.

sudo apt-get install snmpd

Answer yes

Configure:

Move existing /etc/snmp/snmpd.conf configuration file to /etc/snmp/snmpd.conf.org

sudo mv /etc/snmp/snmpd.conf /etc/snmpd/snmpd.conf.bak

Create a new /etc/snmp/snmpd.conf file:

sudo nano  /etc/snmp/snmpd.conf

Inside this file put

rocommunity  public

syslocation  “Main Datacenter”

syscontact  “Your contact information”

Change the default snmpd file by editing

Edit /etc/default/snmpd

# 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’

Now restart snmpd

sudo /etc/init.d/snmpd restart

We can now test this with snmpwalk

Go to your cacti box, or your snmpd monitoring server and type:

snmpwalk -v 1 -c public -O e 'hostname'

You should get some output letting you know it works!

Tags: , , ,
This post is under “Linux Commands, Tech” and has no respond so far.

Post a reply