Configuring SNMP on Redhat Linux server
Question: How do I configure SNMP on my Redhat Linux server.
Solution:
(1) Edit the file /etc/snmp/snmpd.conf using a text editor such as vi, enter: # vi /etc/snmp/snmpd.conf
Change/Modify line(s) as follows:
Find the following Line:
com2sec notConfigUser default public
Replace with (make sure you replace 192.168.0.0/24 with your network/subnet) the following lines: com2sec local localhost public
com2sec mynetwork 192.168.0.0/24 public
Scroll down a bit and change :
Find Lines:
group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser
Replace with:
group MyRWGroup v1 local
group MyRWGroup v2c local
group MyRWGroup usm local
group MyROGroup v1 mynetwork
group MyROGroup v2c mynetwork
group MyROGroup usm mynetwork
Again scroll down a bit and locate the following line:
Find line:
view systemview included system
Replace with:
view all included .1 80
Again scroll down a bit and change the following line:
Find line:
access notConfigGroup "" any noauth exact systemview none none
Replace with:
access MyROGroup "" any noauth exact all none noneaccess MyRWGroup "" any noauth exact all all none
Scroll down a bit and change the following lines:
Find lines:
syslocation Unknown (edit /etc/snmp/snmpd.conf)
syscontact Root (configure /etc/snmp/snmp.local.conf)
Replace with (make sure you supply appropriate values): syslocation Linux (RH3_UP2), Home Linux Router.syscontact YourNameHere <you@example.com>
For your convenient attached herewith is a sample /etc/snmp/snmpd.conf file. Feel free to use this file, make sure you make a backup of your existing file.
Start your snmp server and test it:
(a) Make sure when linux comes up snmpd always starts after the system reboot:
# chkconfig snmpd on
(b) Start the snmpd service:
# service snmpd start
(c) Finally, test your snmp server:
New to ADSelfService Plus?