Ubuntu 10.04.3 LTS x32 fully patched.
I needed to install SNMP so my cacti installation could work with graphing. And I thought I had already installed SNMP on the server I was testing against.
Testing from cacti:
snmpwalk -v 1 -c public IPOFSERVER
Timeout: No Response from IPOFSERVER
OK, so let me see if the process is running:
ps aux | grep snmp
root 439193 0.0 0.0 3884 616 pts/0 S+ 09:59 0:00 grep snmp
Well, looks like I need to install it:
apt-get install snmpd
The installation auto-starts the snmpd service with the default configuration file. I verified it was working with ps aux again, and the snmpd service is running under the snmp user.
On the local machine I could now run snmpwalk:
snmpwalk -v 1 -c public localhost
Which retrieved the information I wanted. Unfortunately I still could not run snmpwalk from the cacti server. Doh!
Edit the snmpd.conf file if you want a different community or RO/RW rights:
nano /etc/snmp/snmpd.conf
Otherwise, just edit the default snmpd configuration:
nano /etc/default/snmpd
Change the following line:
SNMPDOPTS=’-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1′
To:
SNMPDOPTS=’-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid -c /etc/snmp/snmpd.conf’
Save and quit
Restart the snmpd service:
/etc/init.d/snmpd restart
Test again:
snmpwalk -v 1 -c public IPOFSERVER
Profit.