yum -y install perl-core perl-DBD-Pg net-snmp-perl net-snmp-devel make automake gcc
useradd netdisco
yum -y install postgresql-server
service postgresql initdb; service postgresql start; chkconfig postgresql on
su - postgres
createuser -DRSP netdisco
createdb -O netdisco netdisco
su - netdisco
curl -L http://cpanmin.us/ | perl - --notest --local-lib ~/perl5 App::Netdisco
mkdir ~/bin
ln -s ~/perl5/bin/{localenv,netdisco-*} ~/bin/
~/bin/netdisco-daemon status
mkdir ~/environments
cp ~/perl5/lib/perl5/auto/share/dist/App-Netdisco/environments/deployment.yml ~/environments
chmod 600 ~/environments/deployment.yml
vi ~/environments/deployment.yml
~/bin/netdisco-deploy ./oui.txt
~/bin/netdisco-web start
~/bin/netdisco-daemon start
http://ip:5000
run as netdisco user:
bin/netdisco-web get_init_file > netdisco-web
bin/netdisco-daemon get_init_file > netdisco-daemon
run as root user:
mv /home/netdisco/netdisco-web /etc/init.d/
mv /home/netdisco/netdisco-daemon /etc/init.d/
chown root:root /etc/init.d/netdisco-*
chmod 755 /etc/init.d/netdisco-*
chkconfig --add netdisco-web
chkconfig --add netdisco-daemon
refer: https://metacpan.org/pod/App::Netdisco
本文出自 “Ilovecat(个人笔记)” 博客,请务必保留此出处http://hj192837.blog.51cto.com/655995/1769210
原文:http://hj192837.blog.51cto.com/655995/1769210