ntopng 是新一代網路流量監控分析工具,提供 Web 儀表板即時顯示流量統計、協議分佈、主機通訊矩陣等。本文記錄 CentOS 6.4 x86_64 完整部署流程:替換阿里雲 Yum 源、啟用 EPEL、安裝相依庫(含手動補裝 libzmq3)、RPM 安裝 ntopng、配置監聽介面與 Web 埠、啟動 Redis 與 ntopng 服務、驗證訪問。
$ mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.def
$ wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-6.repo
$ wget https://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
$ rpm -ivh epel-release-6-8.noarch.rpm
$ mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
$ wget -O /etc/yum.repos.d/epel.repo https://mirrors.aliyun.com/repo/epel-6.repo
$ yum makecache
$ yum install libpcap-devel glib2-devel GeoIP GeoIP-devel libxml2-devel redis wget rrdtool
$ wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/openSUSE/repositories/home:/jblunck:/messaging/CentOS_CentOS-6/x86_64/libzmq3-3.2.2-5.1.x86_64.rpm
$ rpm -ivh libzmq3-3.2.2-5.1.x86_64.rpm
若直接安裝 ntopng RPM 會報缺 libzmq.so.3、librrd.so.4、rrdtool >= 1.3.8。
$ wget https://www.nmon.net/packages/rpm/x86_64/ntopng/ntopng-1.2.2-8420.x86_64.rpm
$ wget https://www.nmon.net/packages/rpm/x86_64/ntopng-data/ntopng-data-1.2.2-8420.noarch.rpm
$ rpm -ivh ntopng-1.2.2-8420.x86_64.rpm
$ rpm -ivh ntopng-data-1.2.2-8420.noarch.rpm
$ cd /etc/ntopng
$ cat > ntopng.conf <<'EOF'
-G=/var/tmp/ntopng.pid
--local-networks "10.1.1.0/24"
--interface eth1
--user nobody
--http-port 8888
EOF
參數說明:
-G:PID 檔路徑--local-networks:指定本地網段(依實際環境修改)--interface:監聽網卡(ip link 確認名稱)--user:降權執行用戶--http-port:Web 介面埠(預設 3000)$ service redis start
$ service ntopng start
瀏覽器訪問 https://,預設帳密 admin/admin。

--interface 指定正確、網卡開啟混雜模式(ip link set eth1 promisc on)redis.conf bind 設定、防火牆 6379 埠ntopng-data 套件已安裝(含靜態資源)--disable-login、調整 --max-num-flows、使用專用監控介面