install theme

How to install and configure SNMP into Ubuntu 12.04 LTS

Change to a root shell.

sudo -s

Install the SNMP Daemon.

apt-get install snmpd

Make a backup of the config file by moving it.

mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.orig

Edit a new file with source name.

vi /etc/snmp/snmpd.conf

Add the following text changing it to suit your details.

rocommunity public

syslocation “Country;City;Building;Rack no;physical;host name”

syscontact sysadmin@yourfqdn.tld

Make a change to the /etc/default/snmpd file

vi /etc/default/snmpd

look for and disable the line below by inserting # at the front of the line

#SNMPDOPTS=’-Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid’

Insert this line of text.

SNMPDOPTS=’-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid -c /etc/snmp/snmpd.conf’

simply restart the service:

service snmpd restart

You are good to go, you can test with snmpwalk using this command:

snmpwalk -v2c -c PUBLIC  localhost

Link to VI cheat sheet

http://www.lagmonster.org/docs/vi.html

Posted 4 years ago
TOP