[研究] NTOP 3.3.8 (yum)(CentOS 5.4 x86)
2010/03/16
Lu
官方網站
http://www.ntop.org/DAG : pmforge-release RPM packages for Red Hat, CentOS and Fedora
http://www.wretch.cc/blog/ysy26/8266442預設情況下,CentOS 5.4 x86 的 yum 沒有 ntop 可以安裝,但是安裝了 rpmforge 後,就可以使用 yum 安裝 ntop 和相依套件。
安裝步驟:
代碼:
wget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.i386.rpm
yum -y install ntop
#設定密碼
ntop -A
#啟動
ntop &
或
/usr/bin/ntop -d -L -u ntop --skip-version-check --use-syslog=daemon
或
/usr/bin/ntop -i "eth0,eth1" -d -L -u ntop --skip-version-check --use-syslog=daemon
說明
* -i "eth0,eth1" : Specifies the network interface or interfaces to be used by ntop for network monitoring. Here you are monitoring eth0 and eth1.
* -d : Run ntop as a daemon.
* -L : Send all log messages to the system log (/var/log/messages) instead of screen.
* -u ntop : Start ntop as ntop user
* -P /usr/local/var/ntop : Specify where ntop stores database files. You may need to backup database as part of your disaster recovery program.
* --skip-version-check : By default, ntop accesses a remote file to periodically check if the most current version is running. This option disables that check.
* --use-syslog=daemon : Use syslog daemon.
測試:
請在安裝 ntop 的本機上用瀏覽器開啟 (如果要在非本機測試,請關閉 firewall 或開放 port 3000)
http://localhost:3000/ 
ntop 的設定檔是 /etc/ntop.conf,但是小弟測試是不能用 (就算把所有參數或任一參數註解掉也不行)
代碼:
[root@localhost html]# service ntop start
Starting ntop: Processing file /etc/ntop.conf for parameters...
Mon Feb 22 10:12:04 2010 NOTE: Interface merge enabled by default
Mon Feb 22 10:12:04 2010 Initializing gdbm databases
FATAL ERROR: Unrecognized/unprocessed ntop options...
, --user ntop, , --db-file-path /var/ntop, , , , --use-syslog, , , , , , ,
run ntop --help for usage information
Common problems:
-B "filter expressions" (quotes are required)
--use-syslog=facilty (the = is required)
[FAILED]
[root@localhost html]#
開啟防火牆
代碼:
vi /etc/sysconfig/iptables
在最後的 REJECT 之前增加
代碼:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3000 -j ACCEPT
重啟動 firewall
代碼:
service iptables restart
開機自動啟動
代碼:
vi /etc/rc.local
增加
代碼:
/usr/bin/ntop -d -L -u ntop -P /usr/local/var/ntop --skip-version-check --use-syslog=daemon
停止
代碼:
killall ntop
(完)
_________________
天道循環,生死不昧,真空妙有,還於本然
諦聽我們的靈魂之聲,所有飄零的靈魂,此世虛幻,此生一夢,生者必死
勢不可去盡,話不可說盡,福不可享盡,規矩不可行盡,凡事太盡,緣分勢必早盡
貼圖空間
http://www.imageshack.us http://www.imagehosting.comviewtopic.php?t=8816