LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I enable snmp in centos? (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-enable-snmp-in-centos-945624/)

lhan17 05-17-2012 10:22 PM

How do I enable snmp in centos?
 
Hi, I have a centos server that I want to monitor with solarwinds. Now, my solarwinds guy told me to enter the community string, let's say "abcdefg" in the centos box. I have two questions.

1. How do I check if snmp is installed/running on centos?
2. In the case that snmp is already installed, how do I enter the community string?

Thanks

grim76 05-17-2012 11:21 PM

You will want to do the following as root:

Code:

yum install net-snmp
Then you will want to edit /etc/snmp/snmpd.conf to configure the service.

Then you will need to:

Code:

chkconfig snmpd on
So the service will start on boot.

And lastly:

Code:

service snmpd start

hermy7 05-17-2012 11:33 PM

1. How do I check if snmp is installed/running on centos?

# ps ax | grep snmpd
3924 ? Sl 0:00 /usr/sbin/snmpd -Lsd -Lf /dev/null -p /var/run/snmpd.pid -a
when it show as the following it's mean your snmp running

2. In the case that snmp is already installed, how do I enter the community string?

you can edit the community string on /etc/snmp/snmpd.conf

The community string is located on top and by default it use public as community string but you can edit

# sec.name source community
com2sec notConfigUser default public

lhan17 05-18-2012 12:16 AM

Thanks guys. Got it all sorted now. Thanks for the help

grim76 05-18-2012 10:37 AM

If these suggestions solved your question make sure to mark the thread solved.

lhan17 05-20-2012 01:53 AM

@grim76 - Thanks for letting me know


All times are GMT -5. The time now is 04:06 AM.