How To Install net-snmp on Rocky Linux 8

In this tutorial we learn how to install net-snmp on Rocky Linux 8. net-snmp is A collection of SNMP protocol tools and libraries

Introduction

In this tutorial we learn how to install net-snmp on Rocky Linux 8.

What is net-snmp

SNMP (Simple Network Management Protocol) is a protocol used for network management. The NET-SNMP project includes various SNMP tools an extensible agent, an SNMP library, tools for requesting or setting information from SNMP agents, tools for generating and handling SNMP traps, a version of the netstat command which uses SNMP, and a Tk/Perl mib browser. This package contains the snmpd and snmptrapd daemons, documentation, etc. You will probably also want to install the net-snmp-utils package, which contains NET-SNMP utilities.

We can use yum or dnf to install net-snmp on Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install net-snmp.

Install net-snmp on Rocky Linux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install net-snmp using dnf by running the following command:

sudo dnf -y install net-snmp

Install net-snmp on Rocky Linux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install net-snmp using yum by running the following command:

sudo yum -y install net-snmp

How To Uninstall net-snmp on Rocky Linux 8

To uninstall only the net-snmp package we can use the following command:

sudo dnf remove net-snmp

net-snmp Package Contents on Rocky Linux 8

/etc/snmp
/etc/snmp/snmpd.conf
/etc/snmp/snmptrapd.conf
/etc/sysconfig/snmpd
/etc/sysconfig/snmptrapd
/usr/bin/agentxtrap
/usr/bin/net-snmp-create-v3-user
/usr/bin/snmpconf
/usr/lib/.build-id
/usr/lib/.build-id/27
/usr/lib/.build-id/27/a6e68a4ce3e5348eaf507e51df21c7337bf6ef
/usr/lib/.build-id/49
/usr/lib/.build-id/49/17104477b6a83eece0f581099867917e71437d
/usr/lib/.build-id/8f
/usr/lib/.build-id/8f/d95eb0e442dadf9654def3466c5b4d22a8b3fd
/usr/lib/systemd/system/snmpd.service
/usr/lib/systemd/system/snmptrapd.service
/usr/lib/tmpfiles.d/net-snmp.conf
/usr/sbin/snmpd
/usr/sbin/snmptrapd
/usr/share/doc/net-snmp
/usr/share/doc/net-snmp/AGENT.txt
/usr/share/doc/net-snmp/COPYING
/usr/share/doc/net-snmp/ChangeLog.trimmed
/usr/share/doc/net-snmp/EXAMPLE.conf
/usr/share/doc/net-snmp/FAQ
/usr/share/doc/net-snmp/IETF-MIB-LICENSE.txt
/usr/share/doc/net-snmp/NEWS
/usr/share/doc/net-snmp/PORTING
/usr/share/doc/net-snmp/README
/usr/share/doc/net-snmp/README.agent-mibs
/usr/share/doc/net-snmp/README.agentx
/usr/share/doc/net-snmp/README.krb5
/usr/share/doc/net-snmp/README.mib2c
/usr/share/doc/net-snmp/README.snmpv3
/usr/share/doc/net-snmp/README.thread
/usr/share/doc/net-snmp/TODO
/usr/share/doc/net-snmp/ipf-mod.pl
/usr/share/doc/net-snmp/passtest
/usr/share/man/man1/agentxtrap.1.gz
/usr/share/man/man1/net-snmp-create-v3-user.1.gz
/usr/share/man/man1/snmpconf.1.gz
/usr/share/man/man5/snmp_config.5.gz
/usr/share/man/man5/snmpd.conf.5.gz
/usr/share/man/man5/snmpd.examples.5.gz
/usr/share/man/man5/snmpd.internal.5.gz
/usr/share/man/man5/snmptrapd.conf.5.gz
/usr/share/man/man5/variables.5.gz
/usr/share/man/man8/snmpd.8.gz
/usr/share/man/man8/snmptrapd.8.gz
/usr/share/snmp
/usr/share/snmp/snmpconf-data
/usr/share/snmp/snmpconf-data/snmp-data
/usr/share/snmp/snmpconf-data/snmp-data/authopts
/usr/share/snmp/snmpconf-data/snmp-data/debugging
/usr/share/snmp/snmpconf-data/snmp-data/mibs
/usr/share/snmp/snmpconf-data/snmp-data/output
/usr/share/snmp/snmpconf-data/snmp-data/snmpconf-config
/usr/share/snmp/snmpconf-data/snmpd-data
/usr/share/snmp/snmpconf-data/snmpd-data/acl
/usr/share/snmp/snmpconf-data/snmpd-data/basic_setup
/usr/share/snmp/snmpconf-data/snmpd-data/extending
/usr/share/snmp/snmpconf-data/snmpd-data/monitor
/usr/share/snmp/snmpconf-data/snmpd-data/operation
/usr/share/snmp/snmpconf-data/snmpd-data/snmpconf-config
/usr/share/snmp/snmpconf-data/snmpd-data/system
/usr/share/snmp/snmpconf-data/snmpd-data/trapsinks
/usr/share/snmp/snmpconf-data/snmptrapd-data
/usr/share/snmp/snmpconf-data/snmptrapd-data/authentication
/usr/share/snmp/snmpconf-data/snmptrapd-data/formatting
/usr/share/snmp/snmpconf-data/snmptrapd-data/logging
/usr/share/snmp/snmpconf-data/snmptrapd-data/runtime
/usr/share/snmp/snmpconf-data/snmptrapd-data/snmpconf-config
/usr/share/snmp/snmpconf-data/snmptrapd-data/traphandle
/var/run/net-snmp

References

Summary

In this tutorial we learn how to install net-snmp on Rocky Linux 8 using yum and dnf.