# Linux 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/](http://heanet.dl.sourceforge.net/sourceforge/net-snmp/ucd-snmp-4.2.6.tar.gz) Extract the file using following command: ```bash tar -zxvf ucd-snmp-4.2.6.tar.gz ``` To install SNMP, follow the steps given below: 1. Log in as root user. 2. Execute the command to set the path of the C compiler: 3. Export PATH=:$PATH 4. Execute the following four commands from the directory where you have extracted the ucd-snmp: - ```bash ./configure --prefix= --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. - ```bash make ``` - ```bash umask 022 ``` - ```bash make install ``` In case of rpm (redhat package manager) package installation use the following command. ```bash rpm -i ``` ## Configuring the Agent in Linux versions prior to 8 1. Stop the agent if it is already running using the command: ```bash /etc/rc.d/init.d/snmpd stop ``` 2. Make the following changes in the `/etc/rc.d/init.d/snmpd` file: - Replace the line: ```bash daemon /usr/sbin/snmpd $OPTIONS ``` with: ```bash daemon /root/ucd_agent/sbin/snmpd $OPTIONS ``` - Replace the line: ```bash killproc /usr/sbin/snmpd ``` with: ```bash killproc /root/ucd_agent/sbin/snmpd ``` This is to choose the currently installed version while starting and stopping the SNMP agent. 3. Start the agent using the command: ```bash /etc/rc.d/init.d/snmpd start ``` ## Configuring the Agent in Linux versions 8 and Above 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: ```bash view allview included .1.3.6 ``` next to the line: ```bash # name incl/excl subtree mask(optional) ``` 2. Change the line: ```bash access notConfigGroup "" any noauth exact systemview none none ``` next to the line: ```bash # group context sec.model sec.level prefix read write notif ``` as: ```bash access notConfigGroup "" any noauth exact allview none none ``` 3. Then restart the SNMP agent using the following command: ```bash /etc/rc.d/init.d/snmpd restart ```