Ubuntu Linux, ubuntu desktop, Linux operating system, ubuntu guide

Snmp server setup and configuration on Rhel5 (step by step)

by on Mar.13, 2010, under RHEL5

First Download and Install following packages

net-snmp-5.3

net-snmp-utils

#rpm -vih net-snmp-5.3.1-24.el5_2.2.x86_64.rpm

#rpm -ivh net-snmp-utils-5.3.1-24.el5_2.2.x86_64.rpm

# cd /etc/snmp/
# cp -rp snmpd.conf snmpd.conf.bak

open the the snmpd.conf and add below entry at the end of the line
to set the Read Only community string to testuser

rocommunity testuser 127.0.0.1

Now, configure the SNMP services on each reboot
with the following chkconfig  command:

# chkconfig snmpd on

Restart SNMP to load the new configuration file:

# service snmpd restart

Test the localhost with the following two commands.

#snmpwalk -v 1 -c testuser localhost system
#snmpwalk -v 1 -c testuser localhost interface

after that i have checked the server , the port of
snmp and snmptrap 161,162 are running using nmap and netstat.

#nmap localhost
#netstat -an|grep 161|grep LISTEN

But the port is not listed there. After that I have added
following entry in /etc/snmp/snmpd.conf

agentaddress tcp:161

and restart the snmpd for listen the net-snmp port

netstat -an|grep 161|grep LISTEN
tcp        0      0 0.0.0.0:161    0.0.0.0:*         LISTEN

nmap localhost

Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2010-03-13 14:59 IST
Interesting ports on localhost.localdomain (127.0.0.1):
Not shown: 1671 closed ports
PORT    STATE SERVICE
22/tcp  open  ssh
25/tcp  open  smtp
80/tcp  open  http
111/tcp open  rpcbind
161/tcp open  snmp
199/tcp open  smux
443/tcp open  https
631/tcp open  ipp
808/tcp open  ccproxy-http


2 Comments for this entry

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!