64位CentOS 6.4安裝配置流量監(jiān)控工具ntopng

ntopng是網(wǎng)絡(luò)流量實時監(jiān)控顯示工具,能夠自動從網(wǎng)絡(luò)上識別有用的信息,不少人在安裝的時候出現(xiàn)了不少問題,下面小編就給大家介紹下CentOS 6.4如何安裝ntopng,一起來了解下吧。
64位CentOS 6.4安裝網(wǎng)絡(luò)監(jiān)控 ntopng
1、配置默認yum源
實驗使用阿里的鏡像
1、備份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.def
2、下載新的CentOS-Base.repo 到/etc/yum.repos.d/
CentOS 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
3、之后運行yum makecache生成緩存
2、安裝epel源及給國內(nèi)鏡像
1、下載安裝
wget http://dl.Fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
chmod u+x epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm
2、備份(如有配置其他epel源)
mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
mv /etc/yum.repos.d/epel-testing.repo /etc/yum.repos.d/epel-testing.repo.backup
3、下載新repo 到/etc/yum.repos.d/
epel(RHEL 6)
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
3、安裝依賴庫
yum install libpcap-devel glib2-devel GeoIP GeoIP-devel libxml2-devel libxml2-devel redis wget rrdtool
下載安裝libzmq3,網(wǎng)站為:http://rpm.pbone.net/index.php3/stat/4/idpl/23532429/dir/centos_6/com/libzmq3-3.2.2-5.1.x86_64.rpm.html
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
chmod u+x libzmq3-3.2.2-5.1.x86_64.rpm
rpm -ivh libzmq3-3.2.2-5.1.x86_64.rpm
解決如下出錯:
?。踨oot@net1 ~]# rpm -ivh ntopng-1.2.2-8420.x86_64.rpm
warning: ntopng-1.2.2-8420.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 7921df34: NOKEY
error: Failed dependencies:
librrd.so.4()(64bit) is needed by ntopng-1.2.2-8420.x86_64
libzmq.so.3()(64bit) is needed by ntopng-1.2.2-8420.x86_64
rrdtool 》= 1.3.8 is needed by ntopng-1.2.2-8420.x86_64
4、安裝及配置ntopng
1、下載
網(wǎng)站 :http://www.nmon.net/packages/rpm/x86_64/
wget http://www.nmon.net/packages/rpm/x86_64/ntopng/ntopng-1.2.2-8420.x86_64.rpm
wget http://www.nmon.net/packages/rpm/x86_64/ntopng-data/ntopng-data-1.2.2-8420.noarch.rpm
2、安裝
chmod u+x ntopng-1.2.2-8420.x86_64.rpm 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
5、配置ntopng
1、查看默認配置文件
?。踨oot@net1 ~]# cd /etc/ntopng/
[root@net1 ntopng]# ls
ntopng.conf.sample ntopng.start
注,ntopng.conf.sample 文件是配置文件樣例,ntopng.start是ntopng啟動時需要的配置文件(測試的ntopng版本此文件為空)。
[root@net1 ntopng]# cat ntopng.conf.sample
-G=/var/tmp/ntopng.gid
注,-G指定運行所用進程號文件。
修改后的內(nèi)容為:
?。踨oot@net1 ntopng]# cat ntopng.conf
-G=/var/tmp/ntopng.pid
--local-networks “10.1.1.0/24”
--interface eth1
--user nobody
--http-port 8888
注,--local-network “指定本地子網(wǎng)段”; --interface eth1 指定監(jiān)聽eth1網(wǎng)卡上的流量; --user z指定ntopng運行時使用的賬戶為nobody; --http-port 指定web服務(wù)端口為8888,如果不指定默認為3000。
6、啟動ntopng
注,在運行ntopng之前,要確認先啟動redis服務(wù),redis為ntopng提供鍵值存儲。我們這邊重新啟動一下redis服務(wù)。
service redis start
service ntopng start
7、測試訪問一下
http://IP:8888
默認的用戶名和密碼是admin。
上面就是CentOS 6.4安裝ntopng的介紹了,在安裝完ntopng后,記得要測試訪問,且在安裝前,需要配置yum源并進行相關(guān)備份。
相關(guān)文章
虛擬機安裝CentOS后沒有網(wǎng)絡(luò)怎么辦
虛擬機安裝CentOS后沒有網(wǎng)絡(luò)了不能上網(wǎng),該怎么設(shè)置網(wǎng)絡(luò)呢?下面我們就來看看這個問題的解決辦法,詳細請看下文圖文介紹2024-01-18虛擬機怎么安裝CentOS? 安裝CentOS操作系統(tǒng)的保姆級圖文教程
虛擬機想要安裝CentOS操作系統(tǒng),但是CentOS操作系統(tǒng)已經(jīng)停止維護了,該怎么安裝呢?詳細請看下文圖文教程2024-01-18Centos7.8怎么更新openssh? Centos升級openssh的技巧
Centos7.8怎么更新openssh?Centos7.8系統(tǒng)想要安裝openssh,該怎么安裝呢?下面我們就來看看Centos升級openssh的技巧2023-09-02Centos7.8怎么更新openssl? CentOS升級OpenSSL的技巧
Centos7.8怎么更新openssl?Centos7.8系統(tǒng)想要升級OpenSSL,該怎么升級呢?詳細請看下文介紹2023-09-02- centos7沒有圖形化操作可能對很多人來說都不太習(xí)慣,下面我們來為centos7安裝圖形化界面,本文以安裝 GNOME 圖形化為例,需要的朋友可以參考下2023-06-29
- 今天小編在安裝RHEL7的時候,一步留神沒有安裝圖形化桌面,下面分享一下安裝圖形化桌面的過程,需要的朋友可以參考下2023-06-29
CentOS7各個版本鏡像下載地址及版本說明(包括Everything版)
下載CentOS-7.0-1406的時候,有很多可選則的版本,對于普通用戶來說,不知道選擇哪個好,下面做一下簡單介紹,需要的朋友可以參考下2023-06-01Centos 7怎么手動配置ip地址? Centos7配置IP地址的技巧
Centos 7怎么手動配置ip地址?Centos 7系統(tǒng)想要自己配置ip地址,該怎么操作呢?下面我們就來看看Centos7配置IP地址的技巧2023-05-17- 這篇文章主要介紹了Centos 7 壓縮與解壓縮命令小結(jié),需要的朋友可以參考下2023-03-28
- 由于centos8 在2022年停止服務(wù),后繼版本為8-steam。在使用阿里云的 centos8 的 yum 時報錯,這篇文章主要介紹了CentOS8使用阿里云yum源異常的解決方法,需要的朋友可以參考2022-04-19