1. Install Fedora Server 27 -64 version
In ‘Software Selection’, choose: ‘Fedora Custom Operating System’ without any sub selections.
Add a root password.
When the installation is done, reboot and login as root, and run the following commands:
$ dnf -y update
$ dnf -y install dkms log4cplus htop vsftpd numactl libpcap pciutils lshw ntpdate kernel-devel libbson network-tools
Static interface IP address:
$ vi /etc/sysconfig/network-scripts/ifcfg-eno1
Configure the static IP addresses to the file:
BOOTPROTO=none
IPADDR=192.168.1.xxx
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS1=192.168.1.1
DNS2=8.8.8.8
Disable SELINUX:
$ sed -i 's/^SELINUX=.*$/SELINUX=disabled/' /etc/selinux/config
2. Install epel
The official command is as below:
sudo yum install epel-release
Alternatively, you can:
$ wget https://mirrors.ustc.edu.cn/fedora/epel//7/x86_64/e/epel-release-7-7.noarch.rpm
$ sudo rpm -ivh epel-release-7-7.noarch.rpm
3. Install associated packages
$ sudo yum groupinstall “Development Tools”
$ sudo yum install libpcap-devel glib2-devel GeoIP-devel libxml2-devel libcurl-devel redis autoconf automake sqlite-devel
or, more detailed installation:
$ sudo yum install subversion autoconf automake autogen libpcap-devel GeoIP-devel hiredis-devel redis glib2-devel libxml2-devel sqlite-devel gcc-c++ libtool wget libcurl-devel pango-devel cairo-devel libpng-devel git
4. Install ntopng
ntopng installaion
$ git clone https://github.com/ntop/ntopng.git
$ cd ntopng
$ ./autogen.sh
$ ./configure
// Maybe informed by missing nDPI
$ cd ..
$ git clone https://github.com/ntop/nDPI.git
$ cd nDPI
$ ./autogen.sh
$ make
$ cd ../ntopng
$ make
// make install
// “MySQL libraries not found….”
$ yum list \*mysql\* | grep dev
// Install all the mysql programme listed, $ sudo yum install ***
$ /usr/bin/gmake geoip
$ make
$ make install
5. Configure ntopng
Create configuration file:
sudo -e /etc/ntopng/ntopng.conf
Edit configuration file:
-G=/var/tmp/ntopng.gid
--local-networks=192.168.1.0/24
--interface=eth0 --http-port=3000
6. Initiate ntopng
Before running ntopng, run redis first
Officially execution:
$ wget http://download.redis.io/releases/redis-3.2.2.tar.gz
$ tar xzf redis-3.2.2.tar.gz
$ cd redis-3.2.2
$ make
$ src/redis-server
Optional initiation:
// Operation in Fedora/centos, enter the folder /src/, make test
$ cd src
$ yum install tcl
$ make test
$ ./redis-server
// Check if initiated
$ cd ~/ntopng***/
$ sudo ./ntopng
// There might be errors, user cannot get access to a folder, try command as below.
$ sudo ./ntopng --dont-change-user
// Declare interface want to be monitored
$ ./ntopng -i ens2f0 -i ens2f1 –-local-networks “192.168.1.0/24” -–dont-change-user