Skip to content

net-snmp 설치 및 snmp 사용법

조회 수 26438 추천 수 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/001/trackback
List of Articles
번호 제목 글쓴이 날짜 조회 수sort
67 클라이언트가 ssh접속시 서버의 RSA키값 변경으로 인한 접... ADMINPLAY 2016-05-20 8956
66 CentOS 자동로그인 설정 ADMINPLAY 2014-04-14 8897
65 allowScriptAccess 설정 l2zeo 2012-05-05 8453
64 HTML5 멀티미디어 태그 - <video>,<audio>,<embed> ADMINPLAY 2012-05-02 8356
63 Zabbix 웹서비스 모니터링 ADMINPLAY 2014-07-07 8346
62 SCM - 캐시 서버 구축 (Squid in Linux) ADMINPLAY 2014-04-27 8311
61 <video>의 속성과 메소드 ADMINPLAY 2012-10-29 8279
60 cacti plugin thold 설치 ADMINPLAY 2014-07-07 8169
59 proxy 서버 통해서 외부문서 불러오기 curl ADMINPLAY 2013-02-20 8152
58 CentOS 6.5 + Python2.7 + MySQL_Python-1.2.3 ADMINPLAY 2014-03-28 8010
57 ubuntu 부팅시 서비스 자동실행 및 실행방지 ADMINPLAY 2013-04-16 7944
56 sakai 2.7.0 source installation in ubuntu 10.04.1 file ADMINPLAY 2012-10-31 7940
55 python mysql connector 설치 및 SQLAachemy 연동 ADMINPLAY 2014-03-27 7934
54 CentOS Linux Remote Desktop 에서 로그인 화면보기 ADMINPLAY 2014-04-14 7874
53 CentOS 6.5 에서 VirtualBox 4.3 설치후 VirtualBox 구동... ADMINPLAY 2014-02-14 7830
52 원격데스크톱(RDP) 클라이언트 접속기록(Log) 삭제하기 file ADMINPLAY 2014-07-14 7710
51 스퀴드(squid) 로그 로테이트 방법 ADMINPLAY 2012-05-18 7639
50 리눅스 벤치마크 프로그램 목록 ADMINPLAY 2013-09-09 7599
49 SVN 클라이언트 명령어 ADMINPLAY 2014-03-18 7493
48 VirtualBox 4.3 Released – Install on RHEL/CentOS/Fedor... ADMINPLAY 2014-02-14 7307

Copyright ADMINPLAY corp. All rights reserved.

abcXYZ, 세종대왕,1234

abcXYZ, 세종대왕,1234