The installation of new version of SNMP is required only for Redhat Linux versions.
Download the latest version of SNMP using the following URL:
http://heanet.dl.sourceforge.net/sourceforge/net-snmp/
Extract the file using following command:
tar -zxvf ucd-snmp-4.2.6.tar.gz
To install SNMP, follow the steps given below:
Log in as root user.
Execute the command to set the path of the C compiler:
Export PATH=<gcc path>:$PATH
Execute the following four commands from the directory where you have extracted the ucd-snmp:
./configure --prefix=<directory_name>
--with-mib-modules="host" .
directory_name is the directory to install SNMP agent. Preferably
choose a directory under /root. The directories /usr and /local might
contain the files of an older version of SNMP therefore do not choose
these directories to ensure proper installation.
make
umask 022
make install
In case of rpm (redhat package manager)
package installation use the following command.
$ rpm -i <package name>
Stop the agent if it is already running using the command:
/etc/rc.d/init.d/snmpd stop
2 . Make the following changes in the /etc/rc.d/init.d/snmpd file
Replace the line
daemon /usr/sbin/snmpd $OPTIONS
with
daemon /root/ucd_agent/sbin/snmpd $OPTIONS
Replace the line
killproc /usr/sbin/snmpd
with
killproc /root/ucd_agent/sbin/snmpd
This is to choose the current installed version
while starting and stopping the SNMP agent.
3.Start the agent using the command /etc/rc.d/init.d/snmpd start.
On Linux versions 8
and above, the latest version of SNMP will already be available. You need
to just make the following changes in snmpd.conf file:
1. Insert the line
view allview included
.1.3.6
next to the line
# name incl/excl subtree mask(optional)
3.Change the line
access notConfigGroup
"" any noauth exact systemview none none
next to the line
# group context sec.modelsec.level prefix
read write
notif
as
access notConfigGroup
"" any
noauth
exact
allview
none none
4.Then restart the SNMP agent using the following
command:
/etc/rc.d/init.d/snmpd restart