Note that you need to edit third-party/LuaJIT-X.Y.Z/src/Makefile and change "CC= gcc" into "CC= cc" prior to start the compilation.

pkg install git wget autoconf autoconf-wrapper automake automake-wrapper fontconfig libtool sqlite3 mysql56-client libxml2 glib gmake bash rrdtool redis pkgconf flex bison sudo GeoIP geoip

echo 'redis_enable="YES"' >> /etc/rc.conf
service redis start

mkdir ~/build
cd ~/build
git clone https://github.com/ntop/nDPI.git
git clone https://github.com/ntop/PF_RING.git
git clone https://github.com/ntop/ntopng.git
cd nDPI
./autogen.sh
gmake
cd ../PF_RING/userland
./configure
cd nbpf
cd ../../../ntopng/
./autogen.sh
./configure
gmake geoip
gmake
gmake install
sysctl net.inet6.ip6.v6only=0
ntopng

Courtesy of Joe Rizzo <jrizzo@rizzos.net>
