Tag: snmpInstall SNMP on UbuntuMay 06, 2011 To install SNMP on Ubuntu, run the commands below (as root):
apt-get install -y snmpd
CONFIG="/etc/snmp/snmpd.conf"
mv $CONFIG $CONFIG.bak
echo rocommunity public > $CONFIG
echo syslocation "put location here" >> $CONFIG
echo syscontact youremail@yourdomain.com >> $CONFIG
CONFIG="/etc/default/snmpd"
mv $CONFIG $CONFIG.bak
cat $CONFIG.bak | grep -v SNMPDOPTS > $CONFIG
echo "SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid \
-c /etc/snmp/snmpd.conf'" >> $CONFIG
service snmpd restart
echo "Installed snmpd"
If you have a firewall, you will also need to allow UDP traffic on port 161. If you use iptables this can be accomplished with iptables -A INPUT -p udp -m state --state NEW -m udp --dport 161 -j ACCEPT You can test if SNMP is working by running snmpwalk from another machine: snmpwalk -v 1 -c public -O e hostname This blog posted is based on documentation at http://www.it-slav.net/blogs/2009/02/05/install-and-configure-snmp-on-ubuntu. Categories: Linux, Networking |
SearchCategories
TagsR acm apt awk bash benchwork bibtex c compiz dd-wrt dia dvd eeebuntu eeepc eps excel fedora firefox flash freebsd gnome hostname iptables java kde latex mac os x mail merge mediawiki mercurial mrtg nvidia pdf phidgets printer putty pxe python route scenery sed snmp ssh structures subnet subversion sudo ubuntu vegetarian vim visio windows word wrt54gl x11 yum Years |