티스토리 뷰

Download Link : http://www.net-snmp.org/download.html


dependencies

1
$ apt-get install libperl-dev
cs

설치하지 않으면, make 과정에서 -lperl 옵션이 지정되었는데 링킹을 하지 못 해서 에러난다. 미리 설치해 두도록 한다.



Install

- original Install

1
2
3
4
5
6
7
8
9
10
11
# download net-snmp-{version}.tar.gz && decompress the tar.gz file
$ tar zxvf net-snmp-{version}.tar.gz
$ cd net-snmp-{version}
 
# execute configure binary, and press enter key
$ ./configure
....
 
# make && make install
$ make
$ make install
cs

아래와 같이 apt-get으로 설치해도 되지만, 직접 설치할 필요가 있는 경우에 설치하면 되겠다.


- install using apt-get

1
$ apt-get install snmp
cs

안 귀찮게 설치하려면 이게 가장 편하다.



Install error

- fix shared object file error

1
2
3
4
5
6
$ snmpd --version
snmpd: error while loading shared libraries: libnetsnmp.so.30: cannot open shared object file: No such file or directory
 
$ cp /usr/local/lib/libnetsnmp.so.30 /usr/lib
$ cp /usr/local/lib/libnetsnmpagent.so.30 /usr/lib
$ cp /usr/local/lib/libnetsnmpmibs.so.30 /usr/lib
cs

설치했더니 공유 라이브러리를 로딩할 수 없다고 하는 경우, 위 처럼 해당 라이브러리를 복사하면 오류가 사라지고 제대로 실행이 되는 것을 확인할 수 있다.


- U64 typedef error

link : https://sourceforge.net/p/net-snmp/code/ci/477b4307ef12ddce3b6a9205e0bdddbfb2e0e9b6/


위의 링크에 나오는 파일들에 대해 commit 내용 그대로 수정해 주어야 한다.


- Perl module compliation error

link : https://sourceforge.net/p/net-snmp/code/ci/4e793461e96a2b4fd81142ab312d074d5c8841fa/


역시 위의 링크에 나오는 파일들에 대해 commit 내용 그대로 수정해 주어야 한다.


- shift: can't shift that many error

net-snmp-config를 실행했을 때, 위와 같은 오류가 발생할 수도 있다. 이 경우, 최신 버전의 net-snmp-config 파일을 가져오면 된다. 쉘 스크립트이기 때문에 문제가 발생하지 않았다. net-snmp-create-v3-user 등도 쉘 스크립트로 작성되어 있기 때문에 그냥 긁어온다.


Usage

일단 생략...



Reference


'Network' 카테고리의 다른 글

[ASN.1] ASN.1 format  (0) 2019.06.10
[net-snmp] net-snmp config on windows  (0) 2018.10.16
[Scapy] scapy python 예제 코드 모음  (0) 2018.09.14
IPv4와 IPv6 헤더  (5) 2016.06.11
(네트워크)자기 자신에게 메시지 보내는 방법  (0) 2015.12.28
댓글
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31