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/0b6/trackback
List of Articles
번호 제목 글쓴이 날짜 조회 수sort
87 vi(Visual) Editor 사용법 ADMINPLAY 2009-05-11 15339
86 Centos 6.0 사용장비 교체후 eth0,1이 eth2,3으로 밀리거... ADMINPLAY 2012-05-29 15122
85 rsync 미러링 백업 ADMINPLAY 2009-05-17 14845
84 [linux][명령어 백그라운드 실행] ADMINPLAY 2015-05-20 14749
83 각종 데몬 이름 및 설명 ADMIN 2008-11-25 13782
82 linux bonding (네트워크 2개를 1개의 인터페이스로 구성) ADMINPLAY 2012-06-26 12454
81 squid.conf : Reverse Proxy ADMINPLAY 2012-04-13 11862
80 Linux 마우스 휠 방향 바꾸기 (mac 처럼 마우스 휠 바꾸기) ADMINPLAY 2014-02-27 11850
79 OS X 10.9 매버릭스의 기본 파일공유 프로토콜은 AFP가 아... ADMINPLAY 2014-03-04 11038
78 GSLB(Global Service Load Balancing) ADMINPLAY 2012-07-30 10892
77 rsync 를 이용하여 동기화 할때 특정 폴더 2개 이상 제외하기 ADMINPLAY 2012-05-09 10736
76 TaskSet 으로 Process의 사용 CPU를 지정해 보자! ADMINPLAY 2012-06-18 10221
75 FreeBSD 참고 명령문 ( H/W 정보 확인 방법) ADMINPLAY 2012-10-22 10191
74 스트리밍 서비스 위한 각 회사 와우자,어도비,마이크로 ... ADMINPLAY 2013-05-06 9888
73 Sample rate(샘플레이트)와 Bit rate (비트레이트) ADMINPLAY 2012-12-28 9716
72 파일비교 명령어 diff 사용법 ADMINPLAY 2013-05-03 9646
71 How to Enable EPEL Repository for RHEL/CentOS 6/5 ADMINPLAY 2014-06-13 9541
70 [CentOS] sshfs - 리눅스 윈도우간 데이터 전송을 편리하게 file ADMINPLAY 2014-09-21 9429
69 Adaptec 컨트롤러 StorMan 에러 및 각종 확인 방법 ADMINPLAY 2013-06-12 8986
68 Bigbluebutton Installation Ubuntu ADMINPLAY 2013-04-11 8960

Copyright ADMINPLAY corp. All rights reserved.

abcXYZ, 세종대왕,1234

abcXYZ, 세종대왕,1234