Objective:
To identify a quick way to get SNMP up and running on a newly
install Debian Squeeze server. After making a few updates to the
/etc/apt/sources.list file I decided to just download the files
required and install them using dpkg since apt-get install just
seemed to yield no packages available or they have been obsoleted.
Perhaps some day when I have a bit more time I'll go back and figure
out why apt-get was having issues since I usually like to use that
tool to install; however, my goal was to stay focused on the task at
hand which was to get SNMP running and not be distracted. This document assumes the reader understands basic Linux system administration command syntax and functions in addition to the ability to use online search engines to locate packages used by Debian. If you downloaded the OS and have installed it then you most likely meet the minimum and nothing below should seem foreign.
Process:
Step 1.) Obtain the following SNMP related files from the Debian website (yielded via online search):
Note-
There may be newer files, these were the files I used at the time of
install.
- libperl5.10_5.10.1-17/squeeze2_i386.deb
- libsnmp-base_5.4.3~dfsg-2_all.deb
- libsnmp15_5.4.3~dfsg-2_i386.deb
- snmp_5.4.1~dfsg-12_i386.deb
- snmpd_5.4.1~dfsg-12_i386.deb
- smistrip_0.4.8+dfsg2-3_all.deb (needed to read MIB file contents & prereq. To install downloader file)
- snmp-mibs-downloader_1.1_all.deb
Step
2.) Install the
packages.
dpkg
-i <filename>
File
name <filename> install order below:
- libperl5.10_5.10.1-17/squeeze2_i386.deb
- libsnmp-base_5.4.3~dfsg-2_all.deb
- libsnmp15_5.4.3~dfsg-2_i386.deb
- snmp_5.4.1~dfsg-12_i386.deb
- snmpd_5.4.1~dfsg-12_i386.deb
- smistrip_0.4.8+dfsg2-3_all.deb
- snmp-mibs-downloader_1.1_all.deb
Step
3.) Check to see if snmp is running.
Grep
for the snmpd process (ps -ef |grep snmpd)
If
all went well and you didn't see any errors it should be running.
Step
4.) Customize the configuration.
*
Edit /etc/snmp/snmpd.conf and put in your secure community strings
*
Edit /etc/snmp/snmp.conf and comment out the last line that contains
“mibs :”. (since the downloader
file
is installed, otherwise an error is received about being past the end
of MIB tree when walking).
*
Edit /etc/default/snmpd and locate the line with 127.0.0.1 in it and
replace with 0.0.0.0 or the ip address of
the server.
Step
5.) Get a clean restart.
Restart
the server.
Step
6.) Do a quick mib walk to confirm things are working proper.
Command
syntax example: snmpwalk -c <community_string> <v1/v2c/v3>
<ipaddress or localhost>
<Community_string>
- whatever you unique string is- DO NOT use public.
<v1/v2c/v3>
- whatever you have configured in your snmpd.conf file.
<ipaddress
or localhost> - Either should work
Note: Since your environment is not the same as mine there is no guarantee the above procedure be successful; however, if it does and it saves time and frustration then I have achieved the goal when posting this information.
There are always multiple ways and options for doing things- Find the one that works best for you.
No comments:
Post a Comment