1 | % Monitoring Netflow with NFsen |
---|
2 | % |
---|
3 | % Network Monitoring and Management |
---|
4 | |
---|
5 | # Introduction |
---|
6 | |
---|
7 | ## Goals |
---|
8 | |
---|
9 | * Build the nfdump package from source |
---|
10 | |
---|
11 | ## Notes |
---|
12 | |
---|
13 | * Commands preceded with "$" imply that you should execute the command as |
---|
14 | a general user - not as root. |
---|
15 | * Commands preceded with "#" imply that you should be working as root. |
---|
16 | * Commands with more specific command lines (e.g. "RTR-GW>" or "mysql>") |
---|
17 | imply that you are executing commands on remote equipment, or within |
---|
18 | another program. |
---|
19 | |
---|
20 | We will use the latest definition from Ubuntu's launchpad site: |
---|
21 | |
---|
22 | - Add this line to the file /etc/apt/sources.list: |
---|
23 | |
---|
24 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
25 | deb-src http://apt.ws.nsrc.org:3142/archive.ubuntu.com/ubuntu precise main restricted universe multiverse |
---|
26 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
27 | |
---|
28 | Then: |
---|
29 | |
---|
30 | $ sudo apt-get update |
---|
31 | |
---|
32 | To build the packages, we'll need the following files: |
---|
33 | |
---|
34 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
35 | https://launchpad.net/ubuntu/+archive/primary/+files/nfdump_1.6.6-1.debian.tar.gz |
---|
36 | https://launchpad.net/ubuntu/+archive/primary/+files/nfdump_1.6.6.orig.tar.gz |
---|
37 | https://launchpad.net/ubuntu/+archive/primary/+files/nfdump_1.6.6-1.dsc |
---|
38 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
39 | |
---|
40 | They have already been downloaded for you to: |
---|
41 | |
---|
42 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
43 | http://noc.ws.nsrc.org/downloads/nfdump_1.6.6-1.debian.tar.gz |
---|
44 | http://noc.ws.nsrc.org/downloads/nfdump_1.6.6.orig.tar.gz |
---|
45 | http://noc.ws.nsrc.org/downloads/nfdump_1.6.6-1.dsc |
---|
46 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
47 | |
---|
48 | So let's get them from the NOC: |
---|
49 | |
---|
50 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
51 | cd /tmp/ |
---|
52 | wget http://noc.ws.nsrc.org/downloads/nfdump_1.6.6-1.debian.tar.gz |
---|
53 | wget http://noc.ws.nsrc.org/downloads/nfdump_1.6.6.orig.tar.gz |
---|
54 | wget http://noc.ws.nsrc.org/downloads/nfdump_1.6.6-1.dsc |
---|
55 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
56 | |
---|
57 | Extract the source: |
---|
58 | |
---|
59 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
60 | sudo dpkg-source -x --no-check nfdump_1.6.6-1.dsc |
---|
61 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
62 | |
---|
63 | Install prerequisites: |
---|
64 | |
---|
65 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
66 | sudo apt-get build-dep nfdump |
---|
67 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
68 | |
---|
69 | One more package is required for building: |
---|
70 | |
---|
71 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
72 | sudo apt-get install flow-tools-dev |
---|
73 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
74 | |
---|
75 | Build the tool: |
---|
76 | |
---|
77 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
78 | cd nfdump-1.6.6 |
---|
79 | sudo dpkg-buildpackage -rfakeroot -b |
---|
80 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
81 | |
---|
82 | The package is now built in the "proper" way, let's install it: |
---|
83 | |
---|
84 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
85 | cd .. |
---|
86 | ls -l nfdump*.deb |
---|
87 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
88 | |
---|
89 | Installation: |
---|
90 | |
---|
91 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
92 | sudo dpkg --install nfdump_1.6.6-1_i386.deb |
---|
93 | sudo dpkg --install nfdump-flow-tools_1.6.6-1_i386.deb |
---|
94 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
95 | |
---|