如何在Ubuntu 16.04上安装Ntopng
Anne655
・3 分钟阅读
介绍
Ntopng是一个开源工具,用于监视服务器上的不同网络协议,它是原始NTOP的下一代版本,Ntospng提供了一个用户友好的Web界面来获取流量信息和系统网络状态。
在本教程中你会学习如何在Ubuntu 16.04上安装Ntopng。
前提条件
- 新部署的Ubuntu 16.04服务器实例,
- 在服务器上设置有sudo权限的非root用户,
步骤1更新系统
启动前,使用以下命令将系统更新为最新的稳定状态:
sudo apt-get update -y
sudo apt-get upgrade -y
sudo shutdown -r now
重新引导后,使用sudo用户登录。
步骤2:安装Ntopng
Ubuntu 16.04存储库中有ntopng包,你可以通过运行以下命令轻松安装它:
sudo apt-get install ntopng
步骤3:配置Ntopng
配置文件位于/etc/ntopng.conf
。
sudo nano /etc/ntopng.conf
根据需要更改文件中的设置:
# DO NOT REMOVE the following option, required for daemonization.
-e=
# * Interfaces to sniff on: one interface per line, prefix with -i=
# If none is specified, ntopng will try to auto-detect the best interface.
-i=eth0
# * Port on which ntopng will listen for the web-UI.
-w=3000
完成后保存文件,然后,重新启动ntopng
服务:
sudo systemctl restart ntopng
要查看所有可用的接口和选项,请使用ntopng -h
选项:
sudo ntopng -h
步骤4:更新防火墙
如果你运行的是防火墙如ufw那么需要为Ntopng打开端口3000.
sudo ufw allow 3000
第5步测试Ntopng
是时候测试Ntopng了 打开你喜爱的网页浏览器,并且键入URL http://your-server-ip:3000
,如果你正确地遵循了这些说明你会看到Ntopng登录页面,对于第一次登录,可以使用用户名admin
。和密码
admin 登录Ntopng
你的Ntopng应用程序现在可以使用了 。