Centos 6.5 SNMP客户端安装及配置版本net-snmp-5.7.3

摘要:
Centos6.5 SNMP客户端安装和配置SNMP版本:net-SNMP-5.7.3.tar.gz1.下载软件cd/usr/local/srcyum yinstallgccwgethttp://nchc.dl.sourceforge.net/project/net-snmp/net-snmp/5.7.3/net-snmp-5.7.3.tar.gz2.解压缩、编译并安装tar-zxvfnet-snmp-5

Centos 6.5 SNMP客户端安装及配置
SNMP版本:net-snmp-5.7.3.tar.gz
1.下载软件
cd /usr/local/src
yum -y install gcc
wget http://nchc.dl.sourceforge.net/project/net-snmp/net-snmp/5.7.3/net-snmp-5.7.3.tar.gz

2.解压编译安装
tar -zxvf net-snmp-5.7.3.tar.gz
cd net-snmp-5.7.3
./configure --with-default-snmp-version="2"  --with-sys-contact="zjqs"  --with-sys-location="XSIDC" --with-logfile="/var/log/snmpd.log"  --with-persistent-directory="/opt/net-snmp"
make
make install

4.配置

/usr/local/sbin/snmpd
/usr/local/sbin/snmpd会在/opt/下生成/opt/net-snmpd/snmpd.conf
cd /opt/net-snmpd/
vim snmpd.conf
添加以下内容
com2sec notConfigUser default public
group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser
view all included .1
access notConfigGroup "" any noauth exact all none none
syslocation www.osyunwei.com



注释说明
public为团体号
syslocation 为位置
启动snmpd
cd /opt/net-snmpd
/usr/local/sbin/snmpd -c snmpd.conf

编译防火墙策略
vim /etc/sysconfig/iptables 添加以下内容
-A INPUT -m udp -p udp --dport 161 -j ACCEPT

重启防火墙

service iptables restart



脚本一键安装
#!/bin/bash
cd /usr/local/src
yum -y install gcc
wget http://nchc.dl.sourceforge.net/project/net-snmp/net-snmp/5.7.3/net-snmp-5.7.3.tar.gz
tar -zxvf net-snmp-5.7.3.tar.gz
cd net-snmp-5.7.3
./configure --with-default-snmp-version="2"  --with-sys-contact="zjqs"  --with-sys-location="XSIDC" --with-logfile="/var/log/snmpd.log"  --with-persistent-directory="/opt/net-snmp"
make
make install
/usr/local/sbin/snmpd
cd /opt/net-snmpd/
echo "com2sec notConfigUser default public">snmpd.conf
echo "group notConfigGroup v1 notConfigUser">>snmpd.conf
echo "group notConfigGroup v2c notConfigUser">>snmpd.conf
echo "view all included .1">>snmpd.conf
echo "access notConfigGroup "" any noauth exact all none none">>snmpd.conf
echo "syslocation www.osyunwei.com">>snmpd.conf
/usr/local/sbin/snmpd -c snmpd.conf
echo "-A INPUT -m udp -p udp --dport 161 -j ACCEPT">>/etc/sysconfig/iptables
备注:推荐更改一下团体号

免责声明:文章转载自《Centos 6.5 SNMP客户端安装及配置版本net-snmp-5.7.3》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇使用sudo执行命令的时候提示找不到命令H5读取本地文件下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

CentOS 7系统KVM虚拟机安装过程详解

什么是 KVM ? KVM 在标准的 Linux 内核中增加了虚拟技术,从而我们可以通过优化的内核来使用虚拟技术。在 KVM 模型中,每一个虚拟机都是一个由 Linux 调度程序管理的标准进程,你可以在用户空间启动客户机操作系统。一个普通的 Linux 进程有两种运行模式:内核和用户。 KVM 增加了第三种模式:客户模式(有自己的内核和用户模式)。 一个典...

centos安装ruby

下面开始安装Ruby 一、下载Ruby源码包 wget ftp://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.7.tar.gz 二、解压安装Ruby tar zxvf ruby-2.1.7.tar.gz ./configure --disable-install-rdoc make make prefix=/usr/l...

CentOS学习:第一天

阿里的一台ECS还有一个月到期,就趁这一个月的时间,用它来学习一下梦寐已久的CentOS。 由于历史原因,一直使用Windows环境,还从没接触过任何一种Linux系统。 在服务器端部署MySQL/Tomcat/Ngix环境时,同配置的低成本ECS,如果使用Win系列,除了系统开销就不剩多少了,但Linux不一样,没有那么多的UI渲染,可以把宝贵的资源用到...

CentOS 7 下网络无法访问 Failed to start LSB: Bring up/.

[root@localhost Desktop]# ping 192.168.2.1PING 192.168.2.1 (192.168.2.1) 56(84) bytes of data.64 bytes from 192.168.2.1: icmp_seq=1 ttl=64 time=0.067 ms64 bytes from 192.168.2.1:...

【转】【Centos】centos 安装libtorrent/rtorrent

1.下载编译时需要的软件 yum install gcc gcc-c++ m4 make automake libtool pkgconfig perl openssl-devel ncurses-devel cppunit-devel 2.下载 curl, libsigc++, libtorrent 和 rtorrent wgethttps://cur...

CentOS 7 升级gcc/g++编译器

gcc的升级必须要使用源码进行升级,也就说,必须要使用源码进行编译才行。我的7.2的CentOS目前自带的gcc是4.8.5的,gcc从4.8之后开始支持C++11,但是鉴于现在C++14、C++17都已经出来了,所以还是把编译器升级一下,才能紧跟发展,尝试使用14/17的新特性。gcc源码下载地址:https://gcc.gnu.org/。 第一步:下载...