Skip to content
Vytautas Krakauskas edited this page Jun 9, 2013 · 2 revisions

A brief example how to setup nfsen on for distributed processing.
The setup is based on tools available in Debian GNU/Linux distribution. Most of the commands should be run as root.

Setup Nfdump

To use nfdump with nfdist you need some patches. They are available in my nufdump repo nfdist branch.

1. Compile and install nfdump from sources

cd /usr/local/src
git clone https://github.com/vytautas/nfdump
cd nfdump
./configure --prefix=/opt/nfdump --enable-nfprofile
make install

See nfdump's README for more details

Setup Nfdist

comming soon

Setup Nfsen

To use nfsen with nfdist you need some patches for nfsen They are available in nfsen repo nfdist branch.

1. Install required perl modules (debian)

aptitude install librrds-perl libmailtools-perl libsocket6-perl

2. Create user

adduser --system --home /opt/nfsen --group --disabled-password --disabled-login netflow
adduser netflow www-data

3. Download the sources

cd /usr/local/src
git clone https://github.com/vytautas/nfsen
cd nfsen

4. Edit config

cp etc/nfsen-dist.conf etc/nfsen.conf
editor etc/nfsen.conf

4. Run the install script

./install.pl etc/nfsen.conf

See nfsen's README for more details.

Setup Apache

1. Install apache with php (debian)

aptitude install libapache2-mod-php

2. Configure access to nfsen:

Alias /nfsen /opt/nfsen/html
<Directory /opt/nfsen/html>
    DirectoryIndex nfsen.php
</Directory>

Setup HDFS-FUSE

I recommend using Claudera's CDH4 Hadoop distribution. Everything should work with other Hadoop distributions too.

1. Install HDFS-FUSE

aptitude install hadoop-hdfs-fuse

2. Append to /etc/fstab

hadoop-fuse-dfs#dfs://NAMENODE_ADDRESS:8020 /mnt/hdfs fuse _netdev 0 0

3. Mount HDFS (directory /mnt/hdfs must exist)

mount /mnt/hdfs

4. Move nfsen profiles data to HDFS and set up a link to it

mv /opt/nfsen/profiles-data /mnt/hdfs/netflow
ln -s /mnt/hdfs/netflow /opt/nfsen/profiles-data

N.B. system's netflow user must have write permissions to /mnt/hdfs/netflow

Start NFSEN

/opt/nfsen/bin/nfsen start