2014年2月5日 星期三

[研究] NETDISCO 1.1 網路管理工具安裝 (CentOS 6.5 x64)

[研究] NETDISCO 1.1 網路管理工具安裝 (CentOS 6.5 x64)

2014-02-05
Lu

NETDISCO - Network Management Tool

這個Web-based應用被設計為管理中到大型網絡和其中的SNMP網絡設備。

官方網站
http://netdisco.org/

下載
http://www.auburn.edu/~gouldwp/netdisco/CVS/
http://www.auburn.edu/~gouldwp/netdisco/CVS/CentOS5_CVS_install.sh

安裝

#wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
rpm -Uvh  https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum -y install cvs wget make httpd httpd-devel postgresql postgresql-server postgresql-devel graphviz net-snmp net-snmp-perl mod_perl mod_perl-devel mod_ssl perl-DBI perl-Apache-DBI perl-DBD-Pg perl-Apache-Session perl-HTML-Parser perl-HTML-Mason perl-GraphViz perl-Compress-Zlib perl-libapreq2 perl-Net-NBName httpd
wget http://www.auburn.edu/~gouldwp/netdisco/CVS/CentOS5_CVS_install.sh
chmod +x CentOS5_CVS_install.sh
./CentOS5_CVS_install.sh
chkconfig httpd restart
service httpd restart

./CentOS5_CVS_install.sh 安裝過程有些要輸入,其他都可以按下 Enter

CSV Password : 按下Enter

Enter Netdisco Database password: (輸入你想要設定的密碼)

Enter domain name:按下Enter

Enter SNMP read string:按下Enter

Enter SNMP write string:按下Enter


Install Module::Build now from CPAN? [y]

Enter new password for admin [no change]:

NETDISCO 預設帳號是 admin,密碼在此輸入

安裝後請用瀏覽器開啟下面網址即可
https://192.168.128.101/netdisco/

實際有些問題

[root@localhost ~]# service httpd restart
Stopping httpd:                                            [FAILED]
Starting httpd: httpd: Syntax error on line 1010 of /etc/httpd/conf/httpd.conf: Could not open configuration file /usr/local/netdisco/netdisco_apache.conf: Permission denied
                                                          [FAILED]
[root@localhost ~]# cp  /usr/local/netdisco/netdisco_apache.conf  /etc/httpd/conf.d/netdisco_apache.conf
[root@localhost ~]# cp  /usr/local/netdisco/netdisco_apache_dir.conf   /etc/httpd/conf.d/netdisco_apache_dir.conf

[root@localhost ~]# vi  /etc/httpd/conf/httpd.conf

Include /usr/local/netdisco/netdisco_apache.conf
Include /usr/local/netdisco/netdisco_apache_dir.conf
改為
#Include /usr/local/netdisco/netdisco_apache.conf
Include /etc/httpd/conf.d/netdisco_apache.conf
#Include /usr/local/netdisco/netdisco_apache_dir.conf
Include /etc/httpd/conf.d/netdisco_apache_dir.conf

再次啟動看看

[root@localhost ~]# service httpd restart
Stopping httpd:                                            [FAILED]
Starting httpd: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 8 of /etc/httpd/conf.d/netdisco_apache.conf: Cannot load /etc/httpd/libexec/apache2/mod_perl.so into server: /etc/httpd/libexec/apache2/mod_perl.so: cannot open shared object file: No such file or directory
                                                           [FAILED]
有模組找不到

[root@localhost ~]# find / -name mod_perl.so
/usr/lib64/httpd/modules/mod_perl.so

[root@localhost ~]# find / -name mod_apreq2.so
/usr/lib64/httpd/modules/mod_apreq2.so

[root@localhost ~]# vi /etc/httpd/conf.d/netdisco_apache.conf

LoadModule perl_module  libexec/apache2/mod_perl.so
LoadModule apreq_module libexec/apache2/mod_apreq2.so
改為
#LoadModule perl_module  libexec/apache2/mod_perl.so
LoadModule perl_module  /usr/lib64/httpd/modules/mod_perl.so
#LoadModule apreq_module libexec/apache2/mod_apreq2.so
LoadModule apreq_module /usr/lib64/httpd/modules/mod_apreq2.so

再次啟動看看

[root@localhost ~]# service httpd restart
Stopping httpd:                                            [FAILED]
Starting httpd: [Tue Jan 28 14:34:36 2014] [warn] module apreq_module is already loaded, skipping
[Tue Jan 28 14:34:36 2014] [warn] module perl_module is already loaded, skipping
[Tue Jan 28 14:34:36 2014] [warn] module perl_module is already loaded, skipping
[Tue Jan 28 14:34:36 2014] [warn] module apreq_module is already loaded, skipping
...(略)
                                                           [FAILED]
[root@localhost ~]#

發現模組重複載入,再把 LoadModule 都註解掉
#LoadModule perl_module  libexec/apache2/mod_perl.so
#LoadModule perl_module  /usr/lib64/httpd/modules/mod_perl.so
#LoadModule apreq_module libexec/apache2/mod_apreq2.so
#LoadModule apreq_module /usr/lib64/httpd/modules/mod_apreq2.so

再次啟動看看

[root@localhost ~]# service httpd restart
Stopping httpd:                                            [FAILED]
Starting httpd: [Tue Jan 28 14:39:45 2014] [warn] The Alias directive in /etc/httpd/conf.d/netdisco_apache_dir.conf at line 5 will probably never match because it overlaps an earlier Alias.
Syntax error on line 24 of /etc/httpd/conf.d/netdisco_apache.conf:
Can't locate netdisco.pm in @INC (@INC contains: /usr/local/netdisco /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 . /etc/httpd) at /etc/httpd/conf.d/netdisco_apache.conf line 28.\nBEGIN failed--compilation aborted\t(in cleanup) Can't locate netdisco.pm in @INC (@INC contains: /usr/local/netdisco /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 . /etc/httpd) at /etc/httpd/conf.d/netdisco_apache.conf line 28.\nBEGIN failed--compilation aborted at /etc/httpd/conf.d/netdisco_apache.conf line 28.\n
                                                           [FAILED]
[root@localhost ~]# find / -name netdisco.pm
/usr/local/netdisco/netdisco.pm

[root@localhost ~]# ls -al /usr/local/netdisco/netdisco.pm
-rw-r--r--. 1 netdisco netdisco 60230 Mar 31  2011 /usr/local/netdisco/netdisco.pm

錯誤訊息找不到 netdisco.pm,但 @INC 目錄包含了 /usr/local/netdisco,裡面有 netdisco.pm,暫時不知如何處理

(待研究...)

參考

十大優秀開源網絡管理工具
http://forum.icst.org.tw/phpbb/viewtopic.php?f=22&t=16080

[研究] NETDISCO - Network Management Tool 安裝 (CentOS 5.4 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=18020

1 則留言:

  1. In The Works: CentOS 6.5 Install Script
    http://www.netdisco.blogspot.hk/

    回覆刪除