File: BUILD-NTOP.txt

package info (click to toggle)
ntop 3:3.3-11
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 12,772 kB
  • ctags: 7,534
  • sloc: ansic: 71,427; sh: 16,772; awk: 1,504; perl: 792; makefile: 782; php: 123; python: 23; sql: 13; sed: 11
file content (216 lines) | stat: -rw-r--r-- 7,115 bytes parent folder | download
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

Quick Instructions
==================

1. Get and install mandatory packages/tools

      These instructions assume your system is already provided with
      the normal source compile tools.  Most are gnu packages, available 
      through http://www.gnu.org or your favorite prebuilt package source.

      Using their RedHat package names, these are:

         - glibc, glibc-devel, gcc, cpp
         - Some version of awk
         - libtool (1.4+)
               Note that there are reports of success with libtool 1.3.x under
               FreeBSD so the script allows this.
         - m4
         - autoconf (2.53+)
         - automake (1.6+)

         - gdbm, gdbm-devel
         - libpcap (http://www.tcpdump.org)
         - gd, gd-devel
         - libpng, libpng-devel

1b. Optional packages

         - openssl, openssl-devel (http://www.openssl.org)
         - zlib, zlib-devel

2. Build ntop

   - cd ntop
   - ./autogen.sh
   - make
   - make install

2.1. Cleanup older versions.
    During make install, ntop may report a couple of things...

    |  Cleanup of old database files...
    |
    |        ...Deleting /usr/share/ntop/addressQueue.db
    |        ...Deleting /usr/share/ntop/dnsCache.db

    This is normal - since installing a new version could alter the formats,
    we just wipe them.  ntop will happily recreate these next time and store
    data in them.


    |NOTE: ntop can show traffic by AS (Autonomous System) Number
    |
    |      Because this feature consumes a number of MB of memory,
    |      the datafile is not installed by default.
    |
    |      Which, if there is no file - from this or a previous
    |      install - effectively disables the ASN feature.
    |
    |      To install the AS data, type:
    |
    |# make install-data-as

    Means pretty much what it says - ntop doesn't install the files
    by default to conserve memory.  The file wasn't found, so you are
    being told how to install it.


    |  There appear to be old shared library files on your system.
    |  You may wish to delete these if you are no longer using the
    |  older versions.
    |
    |  To see the list of files, run
    |
    |# make listlibclean
    |
    |  To delete them (you will have a chance to abort before the
    |  actual delete):
    |
    |# make libclean

    Again, means what it says.  ntop uses the ntop version number in the
    name of the various .so files (e.g. libntop-3.0pre2.so).  After installing
    the new version, ntop found other versions (e.g. libntop-3.0pre1.so).  If 
    you aren't still using that old version (tough since make install overlaid
    /usr/bin/ntop), this is how to see what files make install things are bad
    and how to delete them.


2.2 Build a static ntop

    Sometimes you want to build ntop statically so that both shared libraries
    and plugins are included in the main program. In order to do that you need
    to:

    - cd ntop
    - ./autogen.sh --enable-static-plugins
    - make sntop

    The final binary is called sntop (static ntop).


3. Run ntop (See 1STRUN.txt)

   - /usr/local/bin/ntop -A -u userid -P directory

          where  userid is the *nix userid you've created - with minimal
                 permissions - to run ntop
                 directory is the directory path where ntop will store
                 it's databases

   - /usr/local/bin/ntop -u userid -P directory ...other parameters...

Compile problems
================

      First off, READ the output from ./autogen.sh - many issues and
      problems are reported there.  If you ignore this and blythly try
      to run make, well, things might be broken.

      The most common problem is an inability to find critical libraries
      such as libpcap, libpng, etc.

      The problem is that across the universe of *nix systems, libraries
      get installed in many different locations, making the Makefile
      incredibly complex.

      Starting with 2.2, ntop no longer goes to extreme lengths to find
      the .h and lib files.  2.2.1 continues this evolution, to the extent
      that if a header or library isn't in the standard locations, you
      MUST tell ntop where to find it. 

      3.0 adds the common /usr/local directories (e.g. /usr/local/include
      and /usr/local/lib) to the places ntop looks by default.

      (Note that standard locations differ across systems and may not
       include the common installation location for packages on a particular
       system, such as /opt - consult the OS documentation!)

      You have two choices...

      1. explicitly tell ./autogen.sh where to find them via a series of
      --with-xxxx-root=dir parameters.

          Note that if you give both --with-xxxx-lib and --with-xxxx-include,
          the --with-xxxx-root is ignored.  If you give --with-xxxx-root=xyzzy,
          it is equivalent to giving --with-xxxx-lib=xyzzy/lib and
          --with-xxxx-include=xyzzy/include.

      2. Use the LDFLAGS and CPPFLAGS variables, e.g.:

          $ export CPPFLAGS="-lm"
          $ export LDFLAGS="-L/opt/lib"
          $ ./autogen.sh ...
          $ make

         which adds /opt/lib to the loader path and libm (math library
         in some flavors of *nix) to the list of libraries.

Notes
=====

   ntop 2.2.1+

      A frozen version of rrd is in the myrrd subdirectory and used
      by ntop.

      gdchart has been replaced entirely by code in graph.c

      Graphics are no longer optional.

      We no longer include static versions of the helper libraries
      (gd, libpng and libz).  Instead we use the installed versions,
      hence the 'increase' in the # of required packages.  

   ntop 3.3 (3.2.2+ development)

      Any parameters specified on ./autogen.sh which are not recognized
      are passed to the generated ./configure:

          $ ./autogen.sh --help

          Starting ntop automatic configuration system v0.2.0

            Please be patient, there is a lot to do...

          This script should help you to configure 'ntop'

          Usage: autogen.sh [OPTION]...

          -h, --help            display this message and exit
          -v, --version         print version information and exit
          -d, --debug           enable verbose shell tracing
          -p, --purge           purge all files which are not part of the source package
              --noconfig        skip the ./configure execution

          Any unrecognized options will be passed to ./configure, e.g.:

           ./autogen.sh --prefix=/usr

          becomes

           ./configure --prefix=/usr

     To see the parameters which are available on ./configure, you must first
     create it, by running  ./autogen.sh with the --noconfig option, then run
     ./configure --help.

----------------------------------------
Luca Deri <deri@ntop.org> - January 2001
Updated - June 2002
Updated - October 2002 (new ./configure scripts)
Updated - January 2003 (automake 1.6+ vs. 1.5+)
Updated - July 2003 (2.2.1+ changes)
Updated - March 2004 (3.0 final changes)
Updated - May 2006 (replace ./configure with ./autogen.sh)