如何在 CentOS 6 上安装 Ntopng

在本教程中,我们将向您展示如何在 CentOS 6 上安装 Ntopng。对于那些不知道的人,如果您希望监控服务器上的不同网络协议,Ntopng 是一个相对有用的工具。 它提供了一堆工具来监控各种协议、流量变体,是的,跨多个时间框架的带宽。 ntopng 基于 libpcap,它以可移植的方式编写,以便在每个 Unix 平台、macOS 以及 Win32 上虚拟运行。

本文假设您至少具备 Linux 的基本知识,知道如何使用 shell,最重要的是,您将网站托管在自己的 VPS 上。 安装非常简单。 我将向您展示在 CentOS 6 上逐步安装 Ntopng。

在 CentOS 6 上安装 Ntopng

步骤 1. 首先,我们需要在我们的系统中添加 EPEL 存储库。

## RHEL/CentOS 6 64-Bit ## # wget https://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm # rpm -ivh epel-release-6-8.noarch.rpm
## RHEL/CentOS 6 32-Bit ## # wget https://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm # rpm -ivh epel-release-6-8.noarch.rpm

步骤 2. 在 CentOS 6 上安装 Ntopng。

yum update yum install redis hiredis yum install pfring n2disk nProbe ntopng ntopng-data nbox

步骤 3. 配置 Ntopng。

接下来,我们需要为 ntopng 创建配置文件。 在本文中,我们使用 nano 作为文本编辑器。 你可以使用你喜欢的文本编辑器来创建 ntopng 配置文件:

#nano /etc/ntopng/ntopng.start  ##Put these lines##  --local-networks 192.168.0.0  ## give your local IP Ranges here. --interface 1

步骤 4. 启动 ntopng 和 Redis 服务器。

service redis start service ntopng start

步骤 5. 配置 IPTables 或防火墙。

-A INPUT -m state --state NEW -m tcp -p tcp --dport 3000 -j ACCEPT

步骤 6. 访问 Ntopng。

如果一切顺利,现在您可以通过键入来测试您的 Ntopng 应用程序 https://your-domain.com:3000. 您将看到 ntopng 登录页面。 第一次,您可以使用 user ‘admin’和密码’admin’。

恭喜! 您已成功安装 Ntopng。 感谢您使用本教程在 centos 6 系统上安装 Ntopng 服务器监控。 如需其他帮助或有用信息,我们建议您查看 Ntopng 官方网站.