How to install Ntopng on CentOS 6.9
How to install Ntopng on CentOS 6.9
In the previous article, we saw the installation procedure of Ntopng on CentOS 7. The Ntopng is an open-source network traffic monitoring system that provides a web interface for real-time network monitoring. Ntopng provides several tools for monitoring various protocols, traffic variants and bandwidth across multiple time frames. You can install ntopng on any monitoring server connected to your network and use a web browser to access real-time traffic reports available on the server. This tutorial covers the ground on the installation procedure of Ntopng on CentOS 6.9.
Features
- Show network traffic and IPv4/v6 active hosts
- Store on disk persistent traffic statistics in RRD format Geolocate hosts
- Discover application protocols by leveraging on nDPI, ntop’ s DPI framework
- Show IP traffic distribution among the various protocols
- Analyse IP traffic and sort it according to the source/destination
- Report IP protocol usage sorted by protocol type
Installation procedure
To begin with the installation procedure, install the dependency packages for ntop by executing the following command.
[root@localhost Desktop]# yum install -y libpcap-devel glib2-devel GeoIP-devel libxml2-devel libxml2-devel redis wget gcc gcc-c++ make libpcap libpcap-devel gdbm-devel libgd-devel libpng-devel libtool libtool-libs rrdtool rrdtool-devel git libcurl-devel sqlite-devel mysql-server mysql* gcc tcl
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: ftp.iitm.ac.in
* extras: ftp.iitm.ac.in
* updates: ftp.iitm.ac.in
.
.
.
sinjdoc.x86_64 0:0.5-9.1.el6 slf4j.noarch 0:1.5.8-8.el6
unixODBC.x86_64 0:2.2.14-14.el6 wsdl4j.noarch 0:1.5.2-7.8.el6
xml-commons-apis.x86_64 0:1.3.04-3.6.el6 xml-commons-resolver.x86_64 0:1.1-4.18.el6
zlib-devel.x86_64 0:1.2.3-29.el6
Complete!
Next, download the ntop package using git and trigger the following command.
[root@localhost Desktop]# git clone https://github.com/ntop/ntopng.git
Initialized empty Git repository in /root/Desktop/ntopng/.git/
.
.
.
Receiving objects: 100% (25967/25967), 104.07 MiB | 204 KiB/s, done.
Resolving deltas: 100% (19253/19253), done.
Run the below script files and do the steps as shown below
[root@localhost ntopng]# ./autogen.sh
Wait please...
Run the ./configure command.
[root@localhost ntopng]# ./configure
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
.
.
.
checking whether g++ accepts -g... yes
checking for nDPI... not found
Please do cd .. git clone https://github.com/ntop/nDPI.git cd nDPI ./autogen.sh make cd ../ntopng and try again
Come back from ntop directory and download the nDPI.git package.
[root@localhost ntopng]# cd [root@localhost ~]# git clone https://github.com/ntop/nDPI.git Initialized empty Git repository in /root/nDPI/.git/ . . . Receiving objects: 100% (6817/6817), 23.02 MiB | 112 KiB/s, done. Resolving deltas: 100% (4434/4434), done.
Run the ./autogen.sh script from nDPI directory.
[root@localhost nDPI]# ./autogen.sh
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
.
.
.
config.status: creating libndpi.pc
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
Run the ./configure script.
[root@localhost nDPI]# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
.
.
.
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
Now run make and make install commands.
[root@localhost nDPI]# make [root@localhost nDPI]# make install
Return back to ntopng directory and run the below scripts as follows.
[root@localhost ntopng]# ./autogen.sh
[root@localhost ntopng]# ./configure
Run the make geoip command.
[root@localhost ntopng]# make geoip
--2017-07-26 17:06:35-- http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
Resolving geolite.maxmind.com... 104.16.37.47, 104.16.38.47, 2400:cb00:2048:1::6810:252f, ...
Connecting to geolite.maxmind.com|104.16.37.47|:80... connected.
.
.
.
100%[==================================================================> ] 2,786,507 10.5M/s in 0.3s
2017-07-26 17:07:44 (10.5 MB/s) - “ GeoIPASNumv6.dat.gz” saved [2786507/2786507]
Execute the make and make install commands.
[root@localhost ntopng]# make
[root@localhost ntopng]# make install
Download and extract the redis package using the wget and tar commands respectively.
[root@localhost Desktop]# wget http://download.redis.io/releases/redis-2.8.6.tar.gz [root@localhost Desktop]# tar &ndash xvf redis-2.8.6.tar.gz
Switch the src directory from redis directory.
[root@localhost Desktop]# cd redis-2.8.6/src
Trigger the make and make test commands as follows.
[root@localhost src]# make all
[root@localhost src]# make test
Copy the redis file into following locations.
[root@localhost src]# cd ..
[root@localhost redis-2.8.6]# cp ./src/redis-server /usr/local/bin/
[root@localhost redis-2.8.6]# cp ./src/redis-cli /usr/local/bin/
[root@localhost redis-2.8.6]# cp ./src/redis-check-dump /usr/local/bin/
Create a directory in below given location.
[root@localhost ~]# mkdir /var/redis
[root@localhost ~]# mkdir /etc/redis
[root@localhost ~]# mkdir /etc/ntopng &ndash p
Create ntop daemon file and the copy the following contents in the file. Save and exit from the file.
[root@localhost ~]#sudo -e /etc/ntopng/ntopng.start
--local-networks " 192.168.1.0/24"
--interface 1
Create a pid file for ntop by executing the following command.
[root@localhost ~]# sudo -e /etc/ntopng/ntopng.conf
-G=/var/run/ntopng.pid < BR>
Start the redis server by running the following command.
[root@localhost ~]# redis-server &
Run the ntop script from ntop directory.
[root@localhost ntopng]# ./ntopng --dont-change-user &
Switch over to your webserver enter your server IP with ntopng port number 3000. http://< IP-ADDRESS> :3000 and run it. A welcome page for ntopng will appear.
Now you can monitor the network bandwidth from hosts using ntopng application.
The installation procedure is complete. The Ntopng has an optional web interface that is written in Lua.
Comments ( 2 )