-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathINSTALL
1405 lines (954 loc) · 47.1 KB
/
INSTALL
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
NAME
Netdisco INSTALL -- Instructions for setting up the Netdisco
application.
VERSION
Netdisco 1.3.1
AUTHOR
Developed by team of Open Source authors headed by Eric Miller, Bill
Fenner, and Oliver Gorwits, originally created by Max Baker. See list at
the end of README of all the contributors.
Netdisco was created at the University of California, Santa Cruz (UCSC),
Networking and Technology Services (NTS) department. UCSC continues to
support the development of Netdisco by providing development servers and
beer.
The Netdisco project is hosted by Source Forge at
<https://sourceforge.net/projects/netdisco> and
<https://sourceforge.net/projects/snmp-info>.
SUPPORT
Netdisco is an Open Source project created and maintained by volunteer
developers.
Please use the "netdisco-users" mailing list for all help, problems and
comments. Developers, patches, and ideas are always welcome.
In Case of Problems
In case of problems, the first thing you should do is search for
answers on the mailing list at
<http://sourceforge.net/search/?group_id=80033&type_of_search=mlists
>.
To ask a Question
To subscribe to the "netdisco-users" mailing list to ask questions
go to <http://lists.sourceforge.net/lists/listinfo/netdisco-users>.
To report a bug
To report bugs, please use the Bug tracker on the Netdisco Source
Forge project page at
<https://sourceforge.net/tracker2/?group_id=80033&atid=558508>
To become a developer
If you would like to help develop Netdisco, or have code to
contribute, please submit your code to the patches tracker at
<https://sourceforge.net/tracker2/?group_id=80033&atid=558510> and
join us on the "netdisco-devel" mailing list.
To register your install of Netdisco
The developers are now maintaining a registry of Netdisco installs.
This is mainly for morale boosting purposes, but also helps us
direct feature requests to our target audience. One drawback of the
Source Forge system is that we have no idea how many people are
using the software compared to the number of downloads. So after you
have Netdisco up and running please spend a minute to let us know
you're using it at <http://netdisco.org/register.html>.
INSTALL FLAVORS
There are three general flavors of installs out there for Netdisco:
From Source
The most common way is to install it from source on your machine
using an install script (see bin/install and
http://www.auburn.edu/~gouldwp/netdisco/), or manually using this
document.
From Package
Netdisco is available as a package / port on a few flavors of Linux
and BSD. Check your favorite package repository first before going
to the trouble of installing it manually.
Virtual Machine / VMWARE Applicance
Charles Goldsmith maintains a VMWARE Appliance version of Netdisco
at <http://wokka.org/netdisco/>. This is by far the easiest way to
get up and running w/ Netdisco.
REQUIREMENTS
Netdisco is built using lots of fine Open-Source tools:
* Perl
5.8.x and newer advised. Whatever version that comes with your
distro should be fine.
* Perl Modules
Listed below
* Net-SNMP
5.1.x and newer advised. Reported working on 5.0.x as well.
* Postgres SQL Server
Version 8.x or higher suggested.
Reported working for versions 7.2, 7.3, 7.4, 8.0, 8.1
* Mason
1.26 or newer required. 1.39 or newer advised, especially for
Apache2 installs.
* Apache
1.3.x and 2.x supported. 2.x strongly preferred.
* mod_perl
Get the mod_perl version to match your Apache:
Apache 1.3.x
mod_perl version 1.29 or higher is recommended.
Apache 2.x
Do not install version 1.99! Make sure you have mod_perl version
2.02 or later.
* GraphViz (Optional)
Version 2.22 or higher recommended.
See INSTALL below for details on how to retrieve and install each
prerequisite.
OS
Netdisco was developed on a FreeBSD system but should work on any system
that Postgres, Perl, Apache, and Net-SNMP run on.
Linux is a sure bet. Successful installs have been reported under
Redhat, Mandrivia, Gentoo and Debian. A beta RPM is available for
Mandrivia, but may be out of date. One user has reported getting
Netdisco running on OS X. Solaris has been successful for 8 and 10.
Windows will take a lot of massaging but should be possible under
Cygwin.
See "OS Specific Notes" below for details.
UPGRADE
If you are upgrading your copy of Netdisco, please read through this
file and then read the "UPGRADE" document in this directory.
INSTALL
This is not a terribly easy install. If you aren't comfortable
installing programs from source and using a text editor, get some help.
Some packaged versions of Netdisco are available.
1. Download Netdisco
Get the newest version from <http://www.netdisco.org>.
[1.1] Unarchive Netdisco
tar xvfz netdisco-x.xx_with_mibs.tar.gz
[1.2] Create a directory for Netdisco and move the files into that dir
mkdir /usr/local/netdisco
mv netdisco-x.xx/* /usr/local/netdisco
[1.3] Non-Standard install Directory
If you plan to install to a directory other than
"/usr/local/netdisco" then you must change a couple files. Otherwise
Skip down to Number 2.
[1.3.1] Shell Scripts
The following shell scripts require you specify the Netdisco
directory if it is not in the default location:
sql/pg -d /path/to/netdisco
bin/netdisco_daemon
[1.3.2] netdisco.conf
Set the "home" option in netdisco.conf.
[1.3.3] netdisco_apache.conf
Change all the appearances of "/usr/local/netdisco" in
netdisco_apache.conf to match your new directory.
[1.3.4] netdisco_apache_dir.conf
Change all the appearances of "/usr/local/netdisco" in
netdisco_apache_dir.conf to match your new directory.
2. Create a Unix User/Group for Netdisco
[2.1] Create a user and group named "netdisco"
Linux:
useradd -d /usr/local/netdisco netdisco
BSD:
adduser netdisco
[2.2] User Permissions
Give this user permission to the installed files
chown -R netdisco.netdisco /usr/local/netdisco
3. Add Unix Administrators to Netdisco Group
Once Netdisco is up and running most administration can be done from the
Web interface. Whoever will be doing the back-end administration will
need to have write access and will need write access on Netdisco's
files.
Add the unix account names of administrators that will modify the source
code or use the command line interface interface to the "netdisco" group
in /etc/group.
Don't forget to logout and login after adding yourself to a group.
4. Postgres
Netdisco runs Postgres SQL as its database back-end.
[4.1] Install Postgres
See the section "OS Specific Notes" below for any notes relating to
your operating system of for a binary version.
There is probably a binary package all ready for you. See your
distribution's instructions for more help.
If you cannot use a binary package, download and compile the source
code from <http://www.postgresql.org>.
If you are installing Postgres from source you may have to run these
two commands in order to install the DBD::Pg Perl module later on :
export POSTGRES_INCLUDE=/usr/local/postgres/include
export POSTGRES_LIB=/usr/local/postgres/lib
You may also have to modify your /etc/ld.so.conf to include your new
POSTGRES_LIB directory. Don't forget to run "ldconf" afterwards.
[4.2] Configure Postgres
Netdisco's settings in Postgres are
Database User : netdisco
Database Name : netdisco
Database Password : you choose it
Edit netdisco.conf and netdisco_apache.conf to match this user name
and password.
Follow these steps to setup Netdisco in Postgres.
[4.3] Permissions
If you have just setup Postgres for the first time you may have to
change the default permissions in $PG_DATA/pg_hba.conf. $PG_DATA
might be in /usr/local/pgsql or in /var/db, depends on your OS.
Check the postgres users' homedir files for the location of
$PG_DATA.
For installation you must give the database user access to the
"template1" database. The following line will give all users who
have logon permissions in Unix access to the "template1" database.
local template1 all ident
Restart Postgres. If you have permission problems try the following
line which opens up access to all users.
local template1 all all
Next you must give the "netdisco" database user access to the
"netdisco" database. The following line will give all database users
access to a database that is the same name as them. This line must
be put above all the rest of the uncommented lines in the
pg_hba.conf file to take precedence.
local sameuser all md5
For older 7.3 or 7.4 installs of Postgres you may have to swap "md5"
for "crypt". Upgrade. Please.
Finally if you would like to have "root" be able to access all
databases, try this one :
local all root trust
[4.4] Restart Postgres
You must now restart Postgres
Linux : one of these three
/etc/rc.d/init.d/postgresql restart
service postgresql restart
/etc/rc.d/postgresql restart
FreeBSD :
/usr/local/etc/rc.d/*pgsql* restart
If there are problems with this step you will receive an error that
mentions something about pg_hba.conf.
[4.5] Create Database.
Make sure Postgres is up and running.
The "pg" command use netdisco.conf to find the database user name
and password. Make sure that the database user name and password are
set.
As root, run "sql/pg --init" to create the database and user for
Netdisco.
When you are prompted for a password, enter the new password for the
database user you are creating. This is the same password you set in
netdisco_apache.conf and in netdisco.conf. The "pg" command has
additional options shown in "pg --help"
cd /usr/local/netdisco/sql
./pg --help
./pg --init
If you get permissions errors, find out the name of your database
user. This is the "unix" user that the Postgres database is running
as. The default name for some Linux RPM versions is "postgres" and
for some BSD installations "pgsql". If yours is different, please
specify it with the "-u" option to sql/pg.
[4.6] Check Settings
Now as a non-privileged user (root) make sure you can get into the
database by running "sql/pg". The database user password given above
will be retrieved from netdisco.conf.
cd /usr/local/netdisco/sql
./pg
You should see output similar to the below:
Welcome to psql 8.0.6, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
netdisco=>
netdisco=> \q
[4.7] Optimizations
If you have freshly installed Postgres then the default memory usage
NEEDS to be increased for efficiency. See the Postgres documentation
for postgresql.conf. Newer versions may have options to turn on for
automatic tuning.
Specifically, you really need to up the maximum connections and
shared memory settings. After you have Netdisco running on a large
installation it would be of great benefit to get a Postgres guru in
there to tune things for you. See README for more info about how to
speed things up now and again.
See
<http://www.postgresql.org/docs/current/static/kernel-resources.html
> for kernel settings related to Postgres that you *should* check.
[4.8] Postgres Startup
Make sure that Postgres is set to start on reboot of the server.
Linux
chkconfig postgresql on
BSD Make sure that the file in "/usr/local/etc/rc.d" is alright and
you have added
postgresql_enable="YES"
to /etc/rc.conf.
[4.9] Postgres Maintenance
Read the section in README about Database Maintenance... every once
in a while you may have to run a "VACUUM" and "REINDEX" by hand if
things get too slow. This appears to be less necessary in Postgres
8.0 and up.
[4.10] Remote Database (Optional)
If you have Postgres installed in a remote location then all you
have to do is add that host information to the "db_Pg" line in
netdisco.conf.
db_Pg = dbi:Pg:dbname=netdisco;host=HOSTNAME;port=PORT;
On the Postgres machine, allow your remote front end to contact the
back-end database. Here is a sample line in pg_hba.conf.
#TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
host netdisco netdisco 101.102.103.104 255.255.255.0 md5
Don't forget to restart Postgres after changing the pg_hba.conf
file.
5. SNMP
There are three components to set up for SNMP:
5.1. Net-SNMP
Net-SNMP lives at <http://net-snmp.sourceforge.net>.
There are two known bad versions: 5.2.3 and 5.3.1 !
Please use the older working versions 5.2.2 or 5.3.0.1, or try the newer
5.2.4, 5.3.2 or 5.4 when they're available. See
<http://www.net-snmp.org/dev/schedule.html> for release schedule plans.
You can also use a nightly version from the appropriate patch branch,
from <http://www.net-snmp.org/nightly/tarballs/>.
The symptom of the failure is getting an error "Not an ARRAY reference
at SNMP/Info.pm line xxx".
A workaround if you must use a buggy Net-SNMP version is to use SNMPv1
or turn off bulkwalk with "bulkwalk_off: yes" -- but the best thing to
do is change your Net-SNMP version.
You can update the perl SNMP module seperately from the libraries and
binaries, using CPAN. As of this writing, the current module on CPAN is
5.0301002 which does not have this bug. Only try to use this module with
a matching Net-SNMP version - i.e., if you get a warning like this when
you try to install:
ERROR:
Net-SNMP installed version: 5.2.3 => 5.0203
Perl Module Version: 5.0301
then please try a different method.
[5.1.0] Binary Install
Check the Net-SNMP page for binaries and see "OS Specific Notes"
below for details.
[5.1.1] Source Install
Download Net-SNMP from http://net-snmp.sourceforge.net
This used to be called ucd-snmp. However, don't download ucd-snmp;
it is too old.
[5.1.2] Install Net-SNMP to include Perl module that comes inside the
distribution.
When you run "./configure", make sure you add the switch
"--with-perl-modules"
./configure --with-perl-modules --enable-shared
make
make install
If you already have Net-SNMP installed, then go to the source
directory and in the "perl" subdirectory and run "perl Makefile.PL"
cd /path/to/net-snmp-5.1.x/perl
perl Makefile.PL
make
make install
********************************************************************
DO NOT INSTALL the "SNMP::" or "Net::SNMP" modules off of CPAN.
These modules are not related to Net-SNMP and are not compatible
with Netdisco.
********************************************************************
[5.1.3] Configure Net-SNMP for a non-standard setup (Optional)
You probably will not have to do this step unless you have installed
Net-SNMP somewhere other than /usr/local/ or have some specific SNMP
defaults to change for these tools. Usually the settings in
netdisco.conf are more than enough.
snmpconf
Make sure to set the MIB dir if non-standard or you are not using
the MIBS that come with Netdisco.
(Textual mib Parsing -> Specifies directories to be searched for mibs)
Make sure this newly created snmp.conf lives in
/usr/local/share/snmp or wherever you put a custom install.
5.2. SNMP::Info
SNMP::Info is one half of the Netdisco application.
SNMP::Info holds all the device-specific code to retrieve data from
network devices via SNMP. A wide variety of devices are supported. You
may need to add support for other devices if they do not follow a
standard interface. This is not too complex. See SNMP::Info and consult
the mailing list archives for more details.
SNMP::Info is available from <http://snmp-info.sourceforge.net> and from
CPAN. You must have Net-SNMP installed before installing it.
You have four different options in installing SNMP::Info
[5.2.1] CPAN
perl -MCPAN -e shell
o conf prerequisites_policy ask
install SNMP::Info
[5.2.2] From Source
Download newest version from <http://snmp-info.sourceforge.net>
tar xvfz SNMP-Info-3.01.tar.gz
cd SNMP-Info-1.x
perl Makefile.PL
make install
[5.2.3] From CVS
If you plan to add or change device support in SNMP::Info to
customize Netdisco to your devices, you should install SNMP::Info
this way.
make snmp
This will create the SNMP/ directory where SNMP::Info will live.
Periodically you should re-run
make snmp
To update to the most current CVS version.
[5.2.4] From Package
See "OS Specific Notes" below for details.
5.3. MIBs
MIBs that are required for SNMP::Info are included with Netdisco in the
mibs/ directory if you installed the "netdisco-1.0_with_mibs" package.
If you installed the "netdisco" package without included MIB files, then
please download the "netdisco-mibs" package from
<http://sourceforge.net/project/showfiles.php?group_id=80033>. Place
these files in "/usr/local/netdisco/mibs".
6. GraphViz (Optional)
GraphViz is used to create the Network Map.
It lives at <http://www.graphviz.org/>.
[6.1] Download
Get the newest version from <http://www.graphviz.org/pub/graphviz>.
Unarchive and install. Some binary versions are available.
[6.2] True Type Font
Copy a True Type Font file (.ttf) into the Netdisco directory and
change "node_font" in netdisco.conf to match.
cp /path/to/windows/fonts/lucon.ttf /usr/local/netdisco
You can grab arial.ttf or lucon.ttf out of the c:\windows\fonts
directory of any Windows machine.
[6.3] Graph Settings
Review other graph settings in netdisco.conf. See README for details
on the settings.
[6.4] Check Path
Make sure that "neato" or "twopi" is in your path, and in the path
in netdisco.crontab.
which twopi
which neato
After the Perl Modules step below, make sure the Graphviz Perl
module got installed
perldoc GraphViz
NOTE: You can safely ignore all warnings about "size too small for
label".
7. Setup Apache
[7.1] Apache2
Using recent versions of Mason and mod_perl, Netdisco runs fine
under Apache2.
[7.2] Apache1
It is strongly advised to use Apache2. Consider section 7.2 as
historical.
See the O/S specific notes at the bottom of this document for a
binary install or install Apache 1.3.x From Scratch:
Comment out the lines at the top of netdisco_apache.conf that are
related to Apache2.
Install Apache 1.3.x and mod_perl 1.x and mod_ssl
Netdisco is designed to work in a secure (https) or non-secure
environment. Due to the security and privacy concerned associated
with this data, using a secure server is recommended.
Below is my method if you haven't installed apache and mod_perl
before. I statically compile mod_perl, and mod_ssl then leave the
rest of the modules as dynamically loadable objects (DSO).
[7.2.1] Download and Unarchive
Get Apache from <http://httpd.apache.org>
Get mod_perl from <http://perl.apache.org>
Get mod_ssl from <http://www.modssl.org>
Unarchive all three to the same directory, maybe /usr/local/src
[7.2.2] Inital Apache Setup
This step makes the framework that mod_ssl and mod_perl need.
cd apache_1.3*
./configure
No need to make it yet.
[7.2.3] mod_ssl
Mod_SSL gives us a secure server (https) for Netdisco to run
under.
The OpenSSL library is a prerequirement for mod_ssl and may or
may not already be on your system. See "OS Specific Notes" at
the bottom of this document.
To use a source version, you need to point the apache1 installer
to the install. First follow the instructions in the INSTALL
that comes with "mod_ssl". Then use the command below:
SSL_BASE=/path/to/openssl-0.9.x \
./configure \
--with-apache=../apache_1.3.x \
--disable_rule=SSL_COMPAT
[7.2.4] mod_perl
This step sets up mod_perl for this copy of apache :
cd ../mod_perl-1.x
/usr/local/bin/perl Makefile.PL \
APACHE_SRC=../apache_1.3.x/src \
EVERYTHING=1 \
DO_HTTPD=1 \
USE_APACI=1 \
PREP_HTTPD=1 \
PERL_SECTIONS=1
make
[7.2.5] Apache Again
Now we're ready to make the main apache and install all of the
above (mod_ssl, mod_perl, and Apache).
cd ../apache_1.3*
./configure \
--prefix=/usr/local/apache \
--enable-module=most \
--enable-shared=max \
--activate-module=src/modules/perl/libperl.a \
--with-perl=/usr/local/bin/perl \
--enable-module=ssl
make
make certificate
make install
[7.2.6] Install mod_perl
cd ../mod_perl*
make install
[7.3] Apache Configuration Files
Add the following lines in your "httpd.conf".
Your "httpd.conf" will live in "/usr/local/apache/conf" if you
installed using the method above. For system installed packages, try
"/etc/httpd" or "/usr/local/etc/httpd".
[7.3.1] In the Global Section
Add this line once in the end of "httpd.conf" not in a
VirtualHost section.
Include /usr/local/netdisco/netdisco_apache.conf
[7.3.2] No virtualhosts
If you do not have virtual hosts setup and/or you have a main
server, add this line right after the first include :
Include /usr/local/netdisco/netdisco_apache_dir.conf
[7.3.3] In each VirtualHost
If you have Virtual Hosts or are setting up a secure server, put
the following line in each of them that you want Netdisco turned
on for:
If you are not using Virtual Hosts, then add this line under the
*netdisco_apache.conf* line.
Include /usr/local/netdisco/netdisco_apache_dir.conf
Make sure you have this include line for the secure server
virtual host *:443 at the bottom of http.conf.
[7.4] Mason Data Directory
Set the Mason data directory writable to the apache user that does
the requests.
Assuming "nobody" is the user that the apache web server runs under,
run this command as "root" :
mkdir /usr/local/netdisco/mason
chown nobody.netdisco /usr/local/netdisco/mason
The name of the user is listed in "httpd.conf" under the "User"
directive. Some distros use the name "apache" or "www" as the web
server unix user.
8. Perl Modules
Below is a list of required modules for Netdisco, freely available from
CPAN <http://www.cpan.org>. Many of these modules have prerequisite
modules. Many of these are available in distros already as packages.
PLEASE check that you have these in package form first to allow for
automatic updating of these dependency libraries. A good place to start
is the Mason library.
[8.1] Install required Perl modules from CPAN
Use the CPAN module that comes with Perl to install the modules and
their prerequisites automatically:
perl -MCPAN -e shell
o conf prerequisites_policy ask
install Digest::MD5
install Bundle::DBI
install Apache::DBI
install DBD::Pg
install DB_File (for Apache::Session)
install Apache::Session
install HTML::Entities
install HTML::Mason
install MasonX::Request::WithApacheSession
install Graph ( > 0.50 )
install GraphViz ( > 2.02 )
install Compress::Zlib (probably already have this one)
install Parallel::ForkManager
install Net::NBName (optional for NetBIOS lookup on devices)
install Net::LDAP (optional for LDAP authentication)
install Net::SSLeay (optional for encrypted LDAP authentication)
install IO::Socket::SSL (optional for encrypted LDAP authentication)
For Apache1 install these modules:
install Apache::Test (for Apache::Request, you may need to do a 'force install')
install Apache::Request
For Apache2 install this module:
install Apache2::Request
Some of these you will probably already have installed. Others you
may need to force with "force install ModuleName". Do Not include
the comments in (parens)!
[8.2] Non-Standard Perl Location
If you don't have Perl installed in "/usr/bin", you will need to
modify the first lines of netdisco and bin/doc_munge to point to the
version of Perl you would like to use.
9. Netdisco Configuration
[9.1] netdisco.conf
Modify netdisco.conf to match your site.
See README for detailed configuration descriptions.
[9.2] netdisco_apache.conf
Change the follow lines in netdisco_apache.conf to match your
database user name and password that you picked in step 4.2:
session_user_name
session_password
session_cookie_domain
[9.3] netdisco.crontab
Use this crontab to control the frequency of data collection done by
Netdisco. See section 15 of this document for details.
Change "center_network_device" to a network device that is well
connected to the main segment by a supported discovery protocol
(CDP/FDP/SONMP/LLDP).
[9.4] Add a web user in Netdisco
Add a user to the Netdisco application that will be the
administrator account.
/usr/local/netdisco/netdisco -u joebob
Add more users from the web "Admin Panel" once Netdisco is up and
running.
[9.5] Make Documentation (CVS Versions Only)
This step is only necessary if you have installed from CVS.
i. Perl Location
Make sure that the "POD2TEXT" lines in Makefile point to where
your Perl binaries are installed.
ii. Create Docs
This step will create documentation files from the source
".pod", ".pm", and ".pl" files.
cd /usr/local/netdisco && gmake doc
Run this step if you would like the SNMP::Info documentation
available from Netdisco.
[9.6] Change Permissions on Config files
Since the config files contain SNMP community strings and database
passwords, you must make them only available to the administrators
for security.
chgrp netdisco /usr/local/netdisco/*.conf
chmod 660 /usr/local/netdisco/*.conf
10. OUI Database
The "Organizationally Unique Identifier" (OUI) database allows Netdisco
to identify the manufacture of a network card using the first 24 bits of
the MAC address.
Run the following command to import the contents of oui.txt into your
database.
cd /usr/local/netdisco
netdisco -O
If you run into errors because of UTF-8 or other exotic characters in
oui.txt you may need to add this line to netdisco.conf.
db_Pg_env = PGCLIENTENCODING => iso8859-1
You may also try changing the above from "iso8859-1" to "UTF-8".
[10.1] Updating oui.txt (Optional)
The database of OUIs is needed by Netdisco and is available from the
IEEE.
This will use "wget" to download oui.txt from the IEEE and import it
into the Netdisco database.
cd /usr/local/netdisco
gmake oui
If you do not have "wget" download oui.txt manually and run
"netdisco -O".
11. Restart Apache
Now that you have everything setup, "cold" restart the web-server.
apachectl stop
apachectl start
Check the apache error_log for errors. See "OS Specific Notes" below for
details.
12. Discover a Device in Netdisco
Pick a device that you can access with the command "snmpwalk". Tell
Netdisco to discover that device:
cd /usr/local/netdisco
./netdisco -d devicename
Make sure that this step actually works. This is a good metric that you
have now installed Netdisco correctly. Add the *-D* flag to get copious
debugging info.
13. Create Network Topology
See README for a description of *Topology Information*.
If your network uses a supported topology discovery protocol
(CDP/FDP/SONMP/LLDP) pick a device that you consider close to the center
of the network and start an auto-discovery from there:
cd /usr/local/netdisco
./netdisco -r myrouter
If your network is *not* CDP friendly, then see README for how to use
the manual topology file netdisco-topology.txt.
You MUST supply Netdisco with a working topology or MAC addresses will
show up on uplink ports instead of end ports.
14. Test Web Side
First restart Apache so that Netdisco will see the changes that you have
made in netdisco.conf. Note that a *graceful* restart will not re-read
the configuration file. A full restart is required. See Step 11.
Next, point a browser to */netdisco* on the server you have Netdisco
installed on.
http://localhost/netdisco
If everything is working you should be able to login with the user name
and password you added in Step 9.4. You should also be able to access
the Admin Panel.
If you have problems, check the error_log of apache for messages.
tail /usr/local/apache/logs/error_log
15. Add Cron Jobs
Once you're sure Netdisco is setup correctly, modify netdisco.crontab.
vi netdisco.crontab
Network Discovery
Change "center_network_device" to one of your core routers or
switches.
Data Collection
You may want to fine-tune these jobs to your network. If jobs run
too frequent and overlap, nothing bad will happen, it's just higher
load on your network devices and Netdisco server.
Once Netdisco has been running for a day, look at the "BackEnd Log"
in the web browser and see how long each of the jobs is taking to
finish. If there is overlap, for example if your arpnip is taking
over 60 minutes or your macsuck is taking over 120 minutes, then
consider decreasing the frequency of these jobs as to not cause
extra load on your network devices.
Now, as "root", load the crontab for the "netdisco" user.
su
crontab -u netdisco /usr/local/netdisco/netdisco.crontab
16. Start the Netdisco Admin Daemon
The admin deaemon performs administration jobs that are requested from
the web front-end. See README for a full description of the admin
daemon.
/usr/local/netdisco/bin/netdisco_daemon start
The daemon will be respawned daily in the Cron job listed above. The
restart is not 100% necessary, it is added as a precaution in case any
of the prerequisite libraries have memory leaks.
[16.1] Make the Admin Daemon start at every boot
If you would like the daemon to be started upon bootup, then do the
following:
Linux
This is for Redhat/Mandrake/Fedora. Debian and Gentoo might be a
little different.
ln -s /usr/local/netdisco/bin/netdisco_daemon /etc/rc.d/init.d
chkconfig --add netdisco_daemon
chkconfig netdisco_daemon on
Now you should be able to use this command:
service netdisco_daemon {stop,start,restart,status}
FreeBSD
ln -s /usr/local/netdisco/bin/netdisco_daemon /usr/local/etc/rc.d/netdisco.sh
Other
Add the following line to your /etc/rc.d/rc.local file :
/usr/local/netdisco/bin/netdisco_daemon start
OS Specific Notes
FreeBSD
A port is available for FreeBSD in "/usr/ports/net-mgmt/netdisco". Make
sure that the port is up to date with this version of Netdisco. This is
the best way to install Netdisco on FreeBSD.
* Postgres
Install Postgres from ports:
cd /usr/ports/databases/postgresql83-server
make install
Make sure Postgres is configured to start at system startup time by