In this tutorial, we will show you how to install Ntopng on CentOS 7. For those of you who didn’t know, Ntopng is a relatively useful tool if you are looking to monitor different network protocols on your servers. It provides a bunch of tools for monitoring various protocols, traffic variants, and yes, bandwidth across multiple time frames. Ntopng is based on libpcap and it has been written in a portable way in order to virtually run on every Unix platform, macOS, and on Win32 as well.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple. I will show you the step-by-step installation Ntopng on CentOS 7.
Prerequisites
- A server running one of the following operating systems: CentOS 7.
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- SSH access to the server (or just open Terminal if you’re on a desktop).
- A
non-root sudo user
or access to theroot user
. We recommend acting as anon-root sudo user
, however, as you can harm your system if you’re not careful when acting as the root.
Install Ntopng on CentOS 7
Step 1. First, we need to add the EPEL repository to our system.
yum install epel-release wget
Step 2. Create the Ntop repository for the stable builds.
# cat /etc/yum.repos.d/ntop.repo [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
Step 3. Install Ntopng packages on CentOS 7.
yum update yum install ntopng ntopng-data yum install redis php-pecl-redis
Step 4. Configure Ntopng.
Once installed, Ntopng needs a configuration file. For testing purposes, we can use the sample config file, but don’t forget to create a proper configuration file (man Ntopng) later:
cp /etc/ntopng/ntopng.conf.sample /etc/ntopng/ntopng.conf
Step 5. Start Ntopng and Redis server also enable the service to start at boot time:
systemctl start redis-server.service systemctl enable redis-server.service systemctl start ntopng.service systemctl enable ntopng.service
Step 6. Configure ipables or firewall.
firewall-cmd --direct --add-rule ipv4 filter IN_public_allow 0 -m tcp -p tcp --dport 3000 -s 192.168.1.146 -j ACCEPT
Step 7. Access Ntopng.
If all is well, now you can test your Ntopng application by typing http://your-server-ip:3000
. You will see Ntopng login page. For the first time, you can use user ‘admin’ and password ‘admin’.
Congratulations! You have successfully installed Ntopng. Thanks for using this tutorial for installing Ntopng server monitoring on CentOS 7 systems. For additional help or useful information, we recommend you to check the official Ntopng website.