close
##Don't use libtool-2.2.2.tar.gz, ntop make will failed
wget http://ftp.gnu.org/gnu/libtool/libtool-1.5.tar.gz
wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.2.27.tar.gz 
wget http://ftp.gnu.org/gnu/automake/automake-1.9.6.tar.gz
wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.62.tar.gz
wget http://nchc.dl.sourceforge.net/sourceforge/ntop/ntop-3.3.tar.gz

## rrdtool need libpcap-devel libpng-devel libart_lgpl-devel zlib-devel freetype-devel
## ntop need libtool, automake, autoconf gcc-c++  gdbm-devel; automake need autoconf
yum -y install gcc gcc-c++ httpd  gdbm-devel libpcap-devel libpng-devel libart_lgpl-devel zlib-devel freetype-devel 

tar zvxf rrdtool-1.2.27.tar.gz 
cd rrdtool-1.2.27
./configure
make
make install
cd ..

ln  -s  /usr/local/rrdtool-1.2.27/bin/rrdtool   /usr/local/bin/rrdtool
ln  -s  /usr/local/rrdtool-1.2.27   /usr/local/rrdtool

tar zxvf libtool-1.5.tar.gz
cd libtool-1.5
./configure
make
make install
cd ..

tar zxvf autoconf-2.62.tar.gz
cd autoconf-2.62
./configure
make
make install
cd ..

tar zxvf automake-1.9.6.tar.gz
cd automake-1.9.6
./configure
make
make install
cd ..

tar zxvf ntop-3.3.tar.gz
cd ntop-3.3
./autogen.sh
make
make install
cd..

chmod -R a+rw  /usr/local/var/ntop

service httpd restart
chkconfig httpd on

firefox http://localhost:3000 &

#killall ntop : FAILED
ProcessID="`ps aux | grep ntop | awk '{print $2}' `"
for i in $ProcessID
do
  echo $i
  kill -9 $i
done

ntop

cd
ntop-3.3
cp packages/RedHat/ntop.conf.sample /etc/ntop.conf
cp
packages/RedHat/ntop.init /etc/init.d/ntop
chmod 755 /etc/init.d/ntop
chkconfig --add ntop

------------------------------------------------------------------------------------------------------------------------------------
因為是自己 complier ,所以 ntop 在 /usr/local/bin ,所以必須編輯 /etc/init.d/ntop 裡的prog="/usr/bin/ntop"改成 prog="/usr/local/bin/ntop" 如下

vi /etc/init.d/ntop
      prog="/usr/local/bin/ntop"
      pids=`ps axf | grep '\/usr\/local\/bin\/ntop' | awk '{ printf(" %s", $1) }; END { print "" }'`

------------------------------------------------------------------------------------------------------------------------------------
Ntop 官方網址
http://www.ntop.org/
Ntop 參數說明網址(英文)
http://www.ntop.org/ntop-man.html
Ntop下載網址
http://sourceforge.net/project/showfiles.php?group_id=17233
Ntop FAQ 網址
http://sourceforge.net/docman/display_doc.php?docid=27680&group_id=17233






arrow
arrow
    全站熱搜
    創作者介紹
    創作者 里歐 的頭像
    里歐

    里歐's 布拉格

    里歐 發表在 痞客邦 留言(0) 人氣()