yum install net-snmp net-snmp-utils
systemctl enable snmpd
We will start with the smallest config file possible which will enable read only access to all mibs available for a single community.
First move the shipped config file to another location
mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.orig
Now reate a new empty config file.
touch /etc/snmp/snmpd.conf
In the configuration vi we just created we only need 1 line. So Edit the config file
vi /etc/snmp/snmpd.conf
And insert the following
rocommunity cylkimecdook skipNFSInHostResources true
Snmp will do a huge amount of logging every time you poll, if you poll every 3 mins this can result in quite some log. We can reduce it like this.
vi /etc/sysconfig/snmpd
Add the following line
OPTIONS="-LS0-3d"
systemctl restart snmpd
You can test if SNMP is working by doing a local snmpwalk
snmpwalk -v 2c -c password -O e 127.0.0.1
You should get an output from SNMP with all the mibs available.