centos 에 Net::SNMP perl 모듈 설치
perl 로 스 크 립 트 를 작성 할 때 use Net::SNMP 를 사용 할 때 도 있 습 니 다.이 모듈,그럼 centos 환경 에서 이 모듈 을 어떻게 설치 합 니까?
방법 은 두 가지 가 있 는데 다음 과 같다.
1) By CPAN (best)
on command line, as root :
[your_host]# perl -MCPAN -e shell
cpan shell -- CPAN exploration and modules installation (v1.76) ReadLine support enabled
cpan> install Net::SNMP
If it's the first time you run CPAN, it will probably ask you some (simple) questions.
CPAN will also ask you to satisfy some dependencies (Crypt::DES, Digest::MD5, etc..).
2) "By hand"
Get the folowings modules (tar.gz format) on www.cpan.org
- Crypt::DES - Digest::MD5 - Digest::SHA1 - Digest::HMAC - Net::SNMP for each one (you must install Net::SNMP at the end) :
tar zxf <module>.tar.gz
cd <module>
perl Makefile.pl
make test
make install
위의 두 가지 방법 으로 볼 때 첫 번 째 방법 은 가장 좋 은 방법 으로 의존 가방 을 자동 으로 설치 하여 편리 하 게 하 는 것 이다.
또한 cpan 을 사용 할 때 설정 이 필요 합 니 다.보통 돌아 가면 서 해결 합 니 다.
그러나 일부 특수 한 상황 에 대해 서 는 프 록 시 서버 를 설정 하고 cpan mirror 를 설정 해 야 합 니 다.제 가 사용 하 는 것 은:http://cpan.mirror.vexxhost.com/입 니 다.이렇게 설정 하면 위의 명령 으로 perl 모듈 을 설치 할 수 있 습 니 다.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
CentOS 7에서 OpenLDAP 서버 설치 및 구성LDAP(Lightweight Directory Access Protocol)는 ID와 개체를 쉽게 관리할 수 있는 디렉터리 서비스입니다. Windows 세계에서 서버는 일반적으로 Active Directory입니다...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.