IT Help Desk > Network

Enabling SNMP On Cent OS / RHEL

(1/1)

mahbub-web:
Enabling SNMP On Cent OS / RHEL
Setting up SNMP (Simple Network Management Protocol) on a CentOS machine is a very quick and easy process.
First we will install SNMP itself by running the following command:


--- Code: ---yum install net-snmp
--- End code ---

Once you have SNMP installed we will want to install the configuration utility for SNMP. The configuration utility allows you to easily configure SNMP for both the community string, SNMP version and basic security.


--- Code: ---yum install net-snmp-utils
--- End code ---

Once you have the configuration tool installed you will be ready to run it:


--- Code: ---snmpconf -g basic_setup
--- End code ---

As you run through the configuration utility it will present you with many options; depending on how you have your monitoring setup you will need to choose the options that work for you.

Once done, you will need to copy your newly made configuration file to the correct directory. In most cases you will need to move it from “/root/snmpd.conf” to “/etc/snmp/snmpd.conf” – You will need to overwrite the existing conf file in the /etc/snmp/ directory.

Command to do the above:


--- Code: ---mv /root/snmpd.conf /etc/snmp/
--- End code ---

Once you have moved your configuration file over you will be ready to restart SNMP.


--- Code: ---service snmpd restart
--- End code ---

The last thing you may want to do (optional) is to have SNMP start with the server at boot time. If you do not run the following command you will need to manually start SNMP after a reboot.


--- Code: ---chkconfig snmpd on
--- End code ---

At this point you should be set to go, however if you are running a firewall on the server you will need to open port 161 for UDP & TCP traffic to allow SNMP to be accessed from your remote monitor.

ref: http://www.servernoobs.com/enabling-snmp-on-centos-rhel/

Navigation

[0] Message Index

Go to full version