Oct 312014
 
This is how to compile ntopng in a fresh centos 7 x64 installation
  • For the impatient:
    • # yum install -y subversion autoconf automake make gcc 
      libpcap-devel libxml2-devel sqlite-devel libtool glib2-devel
       gcc-c++
      $ svn co https://svn.ntop.org/svn/ntop/trunk/ntopng
      $ ./autogen.sh
      $ ./configure
      $ make
      $ ./ntopng --help
      ntopng x86_64 v.1.1.4 (r7865) - (C) 1998-14 ntop.org
      <snip>
  • Step by step description
    • Pull the source code from the ntop svn repository. To do this, you need first to install subversion using yum as follows
      $ sudo yum -y install subversion
    • Now change your directory to the one you want ntopng in and run
      $ svn co https://svn.ntop.org/svn/ntop/trunk/ntopng
    • Once the repository is downloaded, you should run the autogen.sh script
      $ ./autogen.sh
    • It will fail due to the lack of a autoconf packages. To step over this run
      $ sudo yum install -y autoconf automake
    • and re-run autogen.sh
      $ ./autogen.sh
      ......
    • Now autogen.sh completes successfully, then run ./configure, but it will fail due to the missing compiler
      $ ./configure
      .....
      configure: error: no acceptable C compiler found in $PATH
    • Install it using
      $ sudo yum install -y gcc
      Next step is the missing libpcap development package
      $ ./configure
      ......
    • Please install libpcap(-dev) (http://tcpdump.org)
      $ sudo yum install -y libpcap-devel
    • Next mandatory package is libxml2-devel required by rrd compilation
      $ ./configure
      .....
    • Please install libxml2(-devel) package (RRD prerequisite)
      $ sudo yum install -y libxml2-devel
      and glib2-devel
      $ ./configure
      .....
    • Please install libglib-2.0 (glib2-devel/libglib2.0-dev) package (RRD prerequisite)
      $ sudo yum install -y glib2-devel
    • now configure require another package
      $ ./configure
      SQLite 3.x missing (libsqlite3-dev): please install it and try again
    • Installable runn
      ing

      $ sudo yum install -y sqlite-devel
    • Now configure works
      $ ./configure
    • You are now ready to compile typing /usr/bin/gmake
      But make will fail due the the missing c++ compiler
      $ make
      configure: error: Unable to find a working C++ compiler
      $ sudo yum install gcc-c++
    • After the last installed package, build will fail on json-c compilation with the following error
      $ make
      make: *** [third-party/json-c/.libs/libjson-c.a] Error 2
    • To solve this, install libtool package using
      $ sudo yum -y install libtool
    • Then rerun make
      $ make
    • and you should have everything compiled successfully.
      Test is running:
      $ ./ntopng --help
      ntopng x86_64 v.1.1.4 (r7865) - (C) 1998-14 ntop.org
Enjoy!

Other

IMPORTANT

This directory contains nightly builds (SVN code) of 64 bit binary packages for RedHat/CentOS (latest OS version). Please use rpm-stable.ntop.org for stable builds.

In order to use the repository you need to create a file named /etc/yum.repos.d/ntop.repo containing
# cat /etc/yum.repos.d/ntop.repo
[ntop]
name=ntop packages
baseurl=http://www.nmon.net/centos/$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://www.nmon.net/centos/RPM-GPG-KEY-deri
[ntop-noarch]
name=ntop packages
baseurl=http://www.nmon.net/centos/$releasever/noarch/
enabled=1
gpgcheck=1
gpgkey=http://www.nmon.net/centos/RPM-GPG-KEY-deri

and also install the /etc/yum.repos.d/epel.repo extra repositories

# cat /etc/yum.repos.d/epel.repo 
[epel]
name=Extra Packages for Enterprise Linux X - $basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-X&arch=$basearch
failovermethod=priority
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-X

Note: replace X with 6 (for CentOS 6) or 7 (for CentOS 7) then do:

  • yum clean all
  • yum update
  • yum install pfring n2disk nprobe ntopng ntopng-data nbox

PF_RING is now packaged without ZC/DNA drivers. You can choose what family you want to install

  • ZC: yum install pfring-drivers-zc-dkms
  • DNA: yum install pfring-drivers-dna-dkms
Most software works without licenses. However some components do need a license. They include:
  • PF_RING DNA and libzero user-space libraries
  • nProbe (NetFlow/IPFIX probe)
  • n2disk (packet to disk application)
You can find more info on the ntop site, or acquire licenses on the ntop e-shop.
We remind you that all ntop products are available at no cost to universities and research.
NOTE
  • we periodically update the kernel package in order to build against a recent kernel. If you encounter issues while installing packages make sure you have first updated the linux kernel package.