IMPORTANT: This post contains outdated information. See README.compilation for updated instructions.
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 running
$ 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
- Pull the source code from the ntop svn repository. To do this, you need first to install subversion using yum as follows
Enjoy!