Aug 14, 2010

Starting Net-SNMP Service in Fedora Core

You noticed that the Net-SNMP already installed in your Fedora Linux.






But the service was not running.

[root@mailman snmp]# ps -ef | grep snmpd
root     3667     3369   0 19:40 pts/2     00:00:00 grep snmpd


See, no snmpd.pid found in the process list. Or type service snmpd status, you will see the result that snmpd is stopped.

[root@mailman snmp]# service snmpd status
snmpd is stopped

Now, how do you start that service? Type service snmpd start, and you will see [OK] message that means the snmpd service now started.


[root@mailman snmp]# service snmpd start
Starting snmpd:          [ OK ]

If you issue the ps –ef
grep snmpd command, you will see the snmpd.pid in the process list.

[root@mailman snmp]# ps -ef | grep snmpd
root   3667 3369 0 19:40  pts/2   00:00:00 grep snmpd
root  15207 1    0 Aug13  ?       00:00:45 /usr/sbin/snmpd -Lsd -Lf /dev/null -p /var/run/snmpd.pid

Good! But when you restart the computer, the SNMP service did not automatically run. You must issue the service snmpd start command manually to start that service. Now, how to make the SNMP service automatically started everytime you start Fedora?

Type below command:

[root@mailman snmp]# chkconfig --level 2345 snmpd on

Now check that the Run level 2,3,4,5 is on using below command:





Everytime you start your Fedora on those Run levels, the SNMP service will automatically on.

If you have questions about Linux Run level, you can find the answers here: http://en.wikipedia.org/wiki/Runlevel#Red_Hat_Linux_and_Fedora

No comments: