Skip to content

net-snmp 설치 및 snmp 사용법

조회 수 26410 추천 수 0 2009.06.24 06:30:32

시스템 관리에 있어서 용이하게 사용할 수 있는 snmp (simple gateway monitoring protocol)

설치와 간단한 설정 방법을 알려드리도록 하겠습니다.

 

설치방법은 yum 패키지를 통한 net-snmp 인스톨과 일반적인 소스컴파일이 있습니다.

 

1. yum 이용 설치시

[root@test ~] yum list |grep net-snmp // net-snmp 패키지 확인


net-snmp-libs.i386                       5.1.2-11.el4.7         installed      
net-snmp.i386                            5.1.2-11.el4.10        base           
net-snmp-devel.i386                      5.1.2-11.el4.10        base           
net-snmp-libs.i386                       5.1.2-11.el4.10        base           
net-snmp-perl.i386                       5.1.2-11.el4.10        base           
net-snmp-utils.i386                      5.1.2-11.el4.10        base  

 

[root@test ~] yum install net-snmp-libs.i386 // ~ net-snmp-utils.i386 까지 install 합니다.

 

yum 을 통한 net-snmp 설치시에는 rpm 설치가 되기 때문에 snmp 데몬에 대한 conf 파일은

/etc/snmp/snmpd.conf 존재하게 됩니다.

 

1-2. 소스컴파일

net-snmp-5.1.tar.gz  파일을 서버에 업로드후 tar xvfz net-snmp-5.1.tar.gz 통해서 압축을 풀어줍니다.

 

[root@test net-snmp-5.1]# ./configure --prefix=/usr/local/snmp --with-mibs="ip-mib:if-mib:tcp-mib:udp-mib:snmpv2-mib:rfc1213mib:altibase-mib"

 

[root@test net-snmp-5.1]# make;make install

 

소스컴파일시 설치경로에 따라서 /usr/local/snmp/share/snmp/snmpd.conf 존재하게 됩니다.

 

2.snmpd.conf 파일 생성은 아래와 같이 기본적으로 설정을 합니다.

 

# snmpd.conf #

com2sec local     127.0.0.1       public //  고유 커뮤니티 설정
com2sec mynetwork 0.0.0.0/0       public //  고유 커뮤니티 설정

group myrwgroup v1         local
group myrwgroup v2c        local
group myrwgroup usm        local
group myrogroup v1         mynetwork
group myrogroup v2c        mynetwork
group myrogroup usm        mynetwork

view all    included  .1                               80

access myrogroup ""      any       noauth    exact  all    none   none
access myrwgroup ""      any       noauth    exact  all    all    none

syslocation test.com
syscontact vitro root@test.com

# snmpd.conf end #

 

3.snmpd 데몬 실행

 

패스 설정에 따라서 아래 와 같이 실행을 합니다.

[root@test root]# snmpd

[root@test root]# /usr/local/snmp/sbin/snmpd

 

4.snmp 테스트

[root@test root]# snmpwalk -v1-c public localhost system.sysname.0 // 호스트 네임 알아보기
system.sysname.0 = ns.test.com

 

첨부되어있는 snmpd.conf_sample 파일 내용에 따라서 서버모니터링을 위한 설정을 할 수

있으며 , 서버 모니터링을 위한 rrd 설정 , 프론트엔드 소프트웨어인 (hotsanic , cacti) 과 연동하여서버 모니터링을 할 수 있습니다.

profile

일요일은 짜빠게뤼~ 먹는날~^^

엮인글 :
http://adminplay.com/1940/874/trackback
List of Articles
번호 제목 글쓴이 날짜 조회 수sort

[ UDP ] packet buffer size 조절

Install 3ware (LSI) 9690SA SCSI RAID Controller VIB On... file

[맥] 커맨드 라인에서 CD/DVD 꺼내기

우분투 DNS 변경 및 고정

Ubunt (우분투) 에서 sun-java6-jdk 설치

sysctl 조정 방법

Unbunt OS 에서 Maven 설치(Install it – apt-get install)

VirtualBox 4.3 Released – Install on RHEL/CentOS/Fedor...

SVN 클라이언트 명령어

리눅스 벤치마크 프로그램 목록

스퀴드(squid) 로그 로테이트 방법

원격데스크톱(RDP) 클라이언트 접속기록(Log) 삭제하기 file

CentOS 6.5 에서 VirtualBox 4.3 설치후 VirtualBox 구동...

CentOS Linux Remote Desktop 에서 로그인 화면보기

sakai 2.7.0 source installation in ubuntu 10.04.1 file

python mysql connector 설치 및 SQLAachemy 연동

ubuntu 부팅시 서비스 자동실행 및 실행방지

CentOS 6.5 + Python2.7 + MySQL_Python-1.2.3

proxy 서버 통해서 외부문서 불러오기 curl

cacti plugin thold 설치

Copyright ADMINPLAY corp. All rights reserved.

abcXYZ, 세종대왕,1234

abcXYZ, 세종대왕,1234