We will be installing 3 packages to get SNMP up and running on Linux.

apt install snmpd snmp libsnmp-dev

OR

yum -y install net-snmp net-snmp-utils (if you are running yum)

Copy the default snmpd config file for backup purposes ( if you want to )

cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bak

Empty the file out by doing the below

cat /dev/null > /etc/snmp/snmpd.conf

Stop the running service of snmpd by issuing the command

systemctl stop snmpd

Create your read only user account for SNMP V3. Replace “SUPERPASSWORD” and “USERNAME” with your required information

net-snmp-create-v3-user -ro -A SUPERPASSWORD -a SHA -X SUPERPASSWORD -x AES USERNAME

Now make the service start on bootup

systemctl enable snmpd

Start the service!

systemctl start snmpd