How to install Ntopng on CentOS 7

How to install 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 7. 

 

Installation procedure

Before beginning the installation procedure, update your system of the required repositories by executing the update command. 

Then, install the epel repository in your system and press y to continue with the installation procedure. 

[root@linuxhelp1 ~]# yum install epel-release -y

Next, you will need to create an ntop repository for the stable builds. To do this, create a file named ntop.repo inside the /etc/yum.repos.d/ directory. Enter the following lines and save the changes in the file. 

[ntop]
name=ntop packages
baseurl=http://www.nmon.net/centos-stable/$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://www.nmon.net/centos-stable/RPM-GPG-KEY-deri
[ntop-noarch]
name=ntop packages
baseurl=http://www.nmon.net/centos-stable/$releasever/noarch/
enabled=1
gpgcheck=1
gpgkey=http://www.nmon.net/centos-stable/RPM-GPG-KEY-deri

Install the ntopng by executing the following command and press y to continue with the installation procedure. 

[root@linuxhelp1 ~]# yum --enablerepo=epel install redis ntopng -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.mirror.snu.edu.in
 * epel: ftp.riken.jp
 * extras: centos.mirror.snu.edu.in
 * updates: centos.mirror.snu.edu.in
.
.
.
complete!

Start the Ntopng and Redis Services. Once the ntopng has been installed, you need to install the hiredis-devel package and start the redis server before starting ntopng.

[root@linuxhelp1 ~]# yum --enablerepo=epel install hiredis-devel
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.mirror.snu.edu.in
 * epel: mirror01.idc.hinet.net
 * extras: centos.mirror.snu.edu.in
 * updates: centos.mirror.snu.edu.in
.
.
.
complete

Now, start the redis service and enable the service to start at boot time. 

[root@linuxhelp1 ~]# systemctl start redis.service
[root@linuxhelp1 ~]# systemctl enable redis.service

Then start ntopng and add the service to start at boot time as follows. 

[root@linuxhelp1 ~]# systemctl start ntopng.service
[root@linuxhelp1 ~]# systemctl enable ntopng.service

Configuration procedure

Ntop will create a default configuration file at /etc/ntopng/ntop.conf. However if you check the status, you’ll see that ntop gives you a "No Pro licence is found" error, and announces that it will return to community mode after 10 minutes.

To check the ntop status, run the following command and check whether it is active or not. 

[root@linuxhelp1 ~]#sudo systemctl status ntopng
? ntopng.service - Start/stop ntopng program
   Loaded: loaded (/etc/systemd/system/ntopng.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2017-07-20 14:50:20 IST; 1h 11min ago
  Process: 26572 ExecStop=/etc/init.d/ntopng stop (code=exited, status=0/SUCCESS)
  Process: 26581 ExecStart=/etc/init.d/ntopng start (code=exited, status=0/SUCCESS)
 Main PID: 26588 (ntopng)
   CGroup: /system.slice/ntopng.service
           ??26588 /usr/bin/ntopng /etc/ntopng/ntopng.conf
Jul 20 14:50:15 linuxhelp1 systemd[1]: Starting Start/stop ntopng program...
Jul 20 14:50:20 linuxhelp1 ntopng[26581]: Starting ntopng: Unable to start n...]
Jul 20 14:50:20 linuxhelp1 systemd[1]: Started Start/stop ntopng program.
Hint: Some lines were ellipsized, use -l to show in full.

Use the vim editor to create a ntopng configuration file and enter the following lines. Save and exit from the file. 

[root@linuxhelp1 ~]# vim /etc/ntopng/ntopng.conf
-G=/var/run/ntopng.pid
--community

To allow Ntopng through the Firewall, consider the following lines. Ntopng listens by default at the 3000 TCP port so you will need to add firewall rule to access ntopng from remote machine. You can do this by running following command:

[root@linuxhelp1 ~]# firewall-cmd --permanent --add-port=3000/tcp
success      

Next, switch to browser and provide machine’s IP http://192.168.7.231 and run it. It leads to the login page of Ntopng. By default the username and pasword is “admin

user credentials

After entering into ntopng, change your password from default and set your own password. 

change password

The Ntopng has been successfully installed in the system. 

ntopng

That was an easy installation procedure, Wasn't it? The Ntopng has an optional web interface that is written in Lua. 


Thank you! for using Linux Help.

You find this tutorial helpful? Share with your friends to keep it alive.
For more help topics browse our website www.linuxhelp.com
Be the first to comment, we value your suggestions. For further queries please comment below.

Tags: CentOS Network Monitoring
user image Author :  Matthew