{"id":281,"date":"2013-01-10T18:33:00","date_gmt":"2013-01-10T18:33:00","guid":{"rendered":"https:\/\/shan.info\/new\/install-and-configure-snmp-on-rhel-or-centos\/"},"modified":"2013-01-10T18:33:00","modified_gmt":"2013-01-10T18:33:00","slug":"install-and-configure-snmp-on-rhel-or-centos","status":"publish","type":"post","link":"https:\/\/shan.info\/new\/install-and-configure-snmp-on-rhel-or-centos\/","title":{"rendered":"Install and configure SNMP on RHEL or CentOS"},"content":{"rendered":"<p>\n\t&nbsp;<\/p>\n<p style=\"margin: 0px; line-height: 18px; color: rgb(113, 113, 113); font-family: arial, verdana, sans-serif; font-size: 12px; text-align: justify;\">\n\tThis guide describe howto install and do a basic configure of SNMP on a RedHat Enterprise Linux or CentOS. Probably it will work on many other *nix systems.<\/p>\n<h2 style=\"margin-top: 0px; font-size: 16px; color: rgb(113, 113, 113); font-family: arial, verdana, sans-serif; text-align: justify;\">\n\t1. Installation<\/h2>\n<p style=\"margin: 0px; line-height: 18px; color: rgb(113, 113, 113); font-family: arial, verdana, sans-serif; font-size: 12px; text-align: justify;\">\n\tRun command yum install net-snmp-utils<\/p>\n<pre style=\"color: rgb(113, 113, 113); font-size: 12px; text-align: justify;\">[root@dull etc]# yum install net-snmp-utils\r\nLoading \"fastestmirror\" plugin\r\nLoading \"dellsysidplugin\" plugin\r\n...\r\n...\r\nDependencies Resolved\r\n\r\n=============================================================================\r\n Package                 Arch       Version          Repository        Size\r\n=============================================================================\r\nInstalling:\r\n net-snmp-utils          i386       1:5.3.1-24.el5_2.2  updates           182 k\r\nInstalling for dependencies:\r\n net-snmp                i386       1:5.3.1-24.el5_2.2  updates           698 k\r\n\r\nTransaction Summary\r\n=============================================================================\r\nInstall      2 Package(s)\r\nUpdate       0 Package(s)\r\nRemove       0 Package(s)\r\n\r\nTotal download size: 879 k\r\nIs this ok [y\/N]: y\r\n<\/pre>\n<p style=\"margin: 0px; line-height: 18px; color: rgb(113, 113, 113); font-family: arial, verdana, sans-serif; font-size: 12px; text-align: justify;\">\n\tAnswer y<\/p>\n<p style=\"margin: 0px; line-height: 18px; color: rgb(113, 113, 113); font-family: arial, verdana, sans-serif; font-size: 12px; text-align: justify;\">\n\tDownloading Packages:<\/p>\n<pre style=\"color: rgb(113, 113, 113); font-size: 12px; text-align: justify;\"><\/pre>\n<pre>(1\/2): net-snmp-utils-5.3 100% |=========================| 182 kB    00:02\r\n(2\/2): net-snmp-5.3.1-24. 100% |=========================| 698 kB    00:06\r\nRunning rpm_check_debug\r\nRunning Transaction Test\r\nFinished Transaction Test\r\nTransaction Test Succeeded\r\nRunning Transaction\r\n Installing: net-snmp                     ######################### [1\/2]\r\n  Installing: net-snmp-utils               ######################### [2\/2]\r\nInstalled: net-snmp-utils.i386 1:5.3.1-24.el5_2.2\r\nDependency Installed: net-snmp.i386 1:5.3.1-24.el5_2.2\r\nComplete!\r\n<\/pre>\n<p style=\"margin: 0px; line-height: 18px; color: rgb(113, 113, 113); font-family: arial, verdana, sans-serif; font-size: 12px; text-align: justify;\">\n\tNow it is installed<\/p>\n<p style=\"margin: 0px; line-height: 18px; color: rgb(113, 113, 113); font-family: arial, verdana, sans-serif; font-size: 12px; text-align: justify;\">\n\t&nbsp;<\/p>\n<p style=\"margin: 0px; line-height: 18px; color: rgb(113, 113, 113); font-family: arial, verdana, sans-serif; font-size: 12px; text-align: justify;\">\n\t&nbsp;<\/p>\n<h2 style=\"margin-top: 0px; font-size: 16px; color: rgb(113, 113, 113); font-family: arial, verdana, sans-serif; text-align: justify;\">\n\t2. Configure<\/h2>\n<p style=\"margin: 0px; line-height: 18px; color: rgb(113, 113, 113); font-family: arial, verdana, sans-serif; font-size: 12px; text-align: justify;\">\n\tI\u2019m careful so I do a backup of the snmpd config file.<\/p>\n<pre style=\"color: rgb(113, 113, 113); font-size: 12px; text-align: justify;\">[root@dull ~]# mv \/etc\/snmp\/snmpd.conf \/etc\/snmp\/snmpd.conf.org <\/pre>\n<p style=\"margin: 0px; line-height: 18px; color: rgb(113, 113, 113); font-family: arial, verdana, sans-serif; font-size: 12px; text-align: justify;\">\n\tCreate a new config file.<\/p>\n<pre style=\"color: rgb(113, 113, 113); font-size: 12px; text-align: justify;\">[root@dull ~]# vi \/etc\/snmp\/snmpd.conf<\/pre>\n<pre style=\"color: rgb(113, 113, 113); font-size: 12px; text-align: justify;\">rocommunity  public\r\nsyslocation  \"PDC, Peters DataCenter\"\r\nsyscontact  peter@it-slav.net<\/pre>\n<p style=\"margin: 0px; line-height: 18px; color: rgb(113, 113, 113); font-family: arial, verdana, sans-serif; font-size: 12px; text-align: justify;\">\n\tStart the snmpd service<\/p>\n<pre style=\"color: rgb(113, 113, 113); font-size: 12px; text-align: justify;\">[root@dull ~]# \/etc\/init.d\/snmpd start<\/pre>\n<p style=\"margin: 0px; line-height: 18px; color: rgb(113, 113, 113); font-family: arial, verdana, sans-serif; font-size: 12px; text-align: justify;\">\n\tDo a snmpwalk to make sure it is working<\/p>\n<pre style=\"color: rgb(113, 113, 113); font-size: 12px; text-align: justify;\">[root@dull ~]# snmpwalk -v 1 -c public -O e 127.0.0.1\r\nSNMPv2-MIB::sysDescr.0 = STRING: Linux dull 2.6.18-92.1.17.el5 #1 SMP Tue Nov 4 13:45:01 EST 2008 i686\r\nSNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10\r\nDISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (16748) 0:02:47.48\r\nSNMPv2-MIB::sysContact.0 = STRING: peter@it-slav.net\r\nSNMPv2-MIB::sysName.0 = STRING: dull\r\nSNMPv2-MIB::sysLocation.0 = STRING: \"PDC, Peters DataCentral\"\r\nSNMPv2-MIB::sysORLastChange.0 = Timeticks: (1) 0:00:00.01\r\n...<\/pre>\n<pre style=\"color: rgb(113, 113, 113); font-size: 12px; text-align: justify;\">...<\/pre>\n<p style=\"margin: 0px; line-height: 18px; color: rgb(113, 113, 113); font-family: arial, verdana, sans-serif; font-size: 12px; text-align: justify;\">\n\tYes, it is working<\/p>\n<p style=\"margin: 0px; line-height: 18px; color: rgb(113, 113, 113); font-family: arial, verdana, sans-serif; font-size: 12px; text-align: justify;\">\n\tAnd finally, make sure snmpd starts next time you restart your machine.<\/p>\n<pre style=\"color: rgb(113, 113, 113); font-size: 12px; text-align: justify;\">[root@dull ~]# chkconfig snmpd on\r\n<\/pre>\n<p style=\"margin: 0px; line-height: 18px; color: rgb(113, 113, 113); font-family: arial, verdana, sans-serif; font-size: 12px; text-align: justify;\">\n\t&nbsp;<\/p>\n<h2 style=\"margin-top: 0px; font-size: 16px; color: rgb(113, 113, 113); font-family: arial, verdana, sans-serif; text-align: justify;\">\n\t3. Monitor example<\/h2>\n<p style=\"margin: 0px; line-height: 18px; color: rgb(113, 113, 113); font-family: arial, verdana, sans-serif; font-size: 12px; text-align: justify;\">\n\tBelow is an example of how it looks using&nbsp;<a href=\"http:\/\/www.op5.com\/op5\/products\/network-monitor\" style=\"color: rgb(200, 0, 0);\">op5 Monitor<\/a>&nbsp;a Nagios based Enterprise Monitor solution.<\/p>\n<p style=\"margin: 0px; line-height: 18px; color: rgb(113, 113, 113); font-family: arial, verdana, sans-serif; font-size: 12px; text-align: justify;\">\n\t<a href=\"http:\/\/www.it-slav.net\/blogs\/wp-content\/uploads\/2009\/02\/optimussnmp-eth0.png\" style=\"color: rgb(200, 0, 0);\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"aligncenter size-full wp-image-1683\" height=\"192\" src=\"http:\/\/www.it-slav.net\/blogs\/wp-content\/uploads\/2009\/02\/optimussnmp-eth0.png\" style=\"border: 0px;\" title=\"optimussnmp-eth0\" width=\"602\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; This guide describe howto install and do a basic configure of SNMP on a RedHat Enterprise Linux or CentOS. Probably it will work on many other *nix systems. 1. Installation Run command yum install net-snmp-utils [root@dull etc]# yum install net-snmp-utils Loading &#8220;fastestmirror&#8221; plugin Loading &#8220;dellsysidplugin&#8221; plugin &#8230; &#8230; Dependencies Resolved ============================================================================= Package Arch Version [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[62],"tags":[],"class_list":["post-281","post","type-post","status-publish","format-standard","hentry","category-snmp"],"_links":{"self":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts\/281","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/comments?post=281"}],"version-history":[{"count":0,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts\/281\/revisions"}],"wp:attachment":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/media?parent=281"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/categories?post=281"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/tags?post=281"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}