snmp mib oib

您所在的位置:网站首页 mib描述的是 snmp mib oib

snmp mib oib

#snmp mib oib| 来源: 网络整理| 查看: 265

linux安装snmp服务

linux安装snmp服务

Today we will look SNMP in Linux operating systems. Simple network management protocol named SNMP is designed for getting info and setting configuration in it entities. These entities may be switch, router, PC, cabinet, printer etc. SNMP was very popular in 2000s. today it is popular too but used for information gathering. Especially monitoring which will be examined later is made today with snmp. Snmp has an index database which named Management Information Base (MIB) used for data classification. Vendors generally publish their MIBs. For example Cisco MIB can be found http://www.cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml . The system that gathers snmp info generally named Network management station. The systems that provides info or apply settings about yourself named Managed device. Agent is a tool that runs on Managed Device and responsible for snmp.

今天,我们将在Linux操作系统中查看SNMP。 名为SNMP的简单网络管理协议旨在获取信息并在其实体中设置配置。 这些实体可能是交换机,路由器,PC,机柜,打印机等。SNMP在2000年代非常流行。 今天,它也很流行,但用于信息收集。 今天特别是通过snmp进行监视,稍后将进行检查。 Snmp有一个索引数据库,该数据库称为用于数据分类的管理信息库(MIB)。 供应商通常会发布其MIB。 例如,可以在http://www.cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml中找到Cisco MIB。 收集snmp信息的系统通常称为网络管理站。 提供信息或应用有关您自己的设置的系统称为“受管设备”。 代理是一种在受管设备上运行并负责snmp的工具。

安装SNMP Ubuntu,Debian,Mint (Install SNMP Ubuntu, Debian, Mint)

We can install SNMP service to the deb based distributions like below. The package name is snmpd.

我们可以将SNMP服务安装到如下所示的基于deb的发行版中。 软件包名称为snmpd 。

$ sudo apt install snmpd snmp -y Install SNMP Ubuntu, Debian, Mint Install SNMP Ubuntu, Debian, Mint 安装SNMP Ubuntu,Debian,Mint 安装SNMP Fedora,CentOS,RedHat (Install SNMP Fedora, CentOS, RedHat)

Firstly we install snmp daemon, library and tool with this command in Fedora, CentOS, RHEL .

首先,我们在Fedora,CentOS,RHEL中使用此命令安装snmp守护程序,库和工具。

$ sudo yum install net-snmp-utils.x86_64 net-snmp.x86_64 列出Snmpd服务状态 (List Snmpd Service Status)

After installing SNMP package we can check status of the service or daemon. We will use systemctl command against service called snmpd.

安装SNMP软件包后,我们可以检查服务或守护程序的状态。 我们将对名为snmpd服务使用systemctl命令。

$ systemctl status snmpd List Snmpd Service Status List Snmpd Service Status 列出Snmpd服务状态 SNMP服务配置文件snmpd.conf(SNMP Service Configuration File snmpd.conf)

SNMP service configuration file is located at /etc/snmp. It is named snmpd.conf . It holds all detailed information about the service like sysContact , sysLocation , public and private passwords. We can also create users and restrict the user and OIB access etc. In order to change this configuration we need root privileges.

SNMP服务配置文件位于/etc/snmp 。 它名为snmpd.conf 。 它包含有关该服务的所有详细信息,例如sysContact , sysLocation ,公用和专用密码。 我们还可以创建用户并限制用户和OIB访问等。为了更改此配置,我们需要root特权。

LEARN MORE  How To Install and Use SNMP On Linux Tutorial with Examples? 了解更多信息如何在Linux教程上安装和使用SNMP并附带示例? SNMP Service Configuration File snmpd.conf SNMP Service Configuration File snmpd.conf SNMP服务配置文件snmpd.conf 配置远程连接 (Configure For Remote Connection)

Security is important aspect for todat IT environment. In order to make SNMP default installation the service only listen local connections via 127.0.0.1 or localhost . Because default installation will have passwords like public and private. A remote attacker can access to the snmp service. Before enabling remote access change public and private password.

安全性是Todat IT环境的重要方面。 为了使SNMP默认安装,该服务仅通过127.0.0.1或localhost侦听本地连接。 因为默认安装将具有诸如public和private类的密码。 远程攻击者可以访问snmp服务。 在启用远程访问之前,请更改public和private密码。

Find following line

查找以下行

agentAddress udp:127.0.0.1:161

change to listen all interfaces

更改以监听所有接口

agentAddress udp:161,udp6:[::1]:161 更改sysContact和sysLocation (Change sysContact and sysLocation)

We can also change the contact and location information via sysContact and sysLocation attributes. We will find the in snmpd.conf file and set whatever we want.

我们还可以通过sysContact和sysLocation属性更改联系人和位置信息。 我们将在snmpd.conf文件中找到并设置所需的内容。

sysLocation InPoftut sysContact [email protected] Change sysContact and sysLocation Change sysContact and sysLocation 更改sysContact和sysLocation 重新启动SNMP服务以重新加载新配置 (Restart SNMP Service For Reload New Configuration)

We made some configuration. In order to make them effective we should reload configuration. Most pratical way to reload configuration is restarting the snmpd service like below.

我们做了一些配置。 为了使它们有效,我们应该重新加载配置。 重新加载配置的最实用方法是重新启动snmpd服务,如下所示。

$ sudo systemctl restart snmpd 测试SNMP服务 (Test SNMP Service)

We can test our new configuration and snmp service with one of snmp tool. In this example we will use snmpwalk which will list all snmp data.

我们可以使用snmp工具之一来测试我们的新配置和snmp服务。 在此示例中,我们将使用snmpwalk列出所有snmp数据。

$ snmpwalk -v 2c -c public localhost Test SNMP Service Test SNMP Service 测试SNMP服务

As we can see our new data like contact and location information is activated and listed accordingly.

正如我们看到的那样,我们的新数据(如联系方式和位置信息)已激活并相应列出。

翻译自: https://www.poftut.com/install-and-setup-snmp-service-or-daemon-for-linux/

linux安装snmp服务



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3