2013年11月22日 星期五

NTOP 安裝紀錄

參考文件:


安裝CentOS 6.4 i386,並關閉 iptables 服務
yum install cairo-devel libxml2-devel pango-devel pango libpng-devel -y
yum install freetype freetype-devel libart_lgpl-devel wget gcc make -y
yum install perl-ExtUtils-MakeMaker -y
yum install graphviz -y

cd /usr/local/src/
wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.5.tar.gz
tar -zxvf rrdtool-1.4.5.tar.gz
cd rrdtool-1.4.5
./configure --prefix=/usr/local/rrdtool
make && make install

yum install libpcap libpcap-devel gdbm gdbm-devel -y
yum install libtool automake autoconf -y
yum install libevent libevent-devel -y
cd /usr/local/src/
wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP-1.4.8.tar.gz
tar -zxvf GeoIP-1.4.8.tar.gz 
cd GeoIP-1.4.8
./configure
make && make install



cd /usr/local/src/
yum install subversion python-devel -y
yum install python-setuptools -y


wget -c https://pypi.python.org/packages/source/M/Mako/Mako-0.7.2.tar.gz#md5=e3c0a677aa4216da9e89ef8fa76cbafb --no-check-certificate


easy_install Mako-0.7.2.tar.gz 
wget -c 
ftp://mirror.switch.ch/pool/1/mirror/epel/6/i386/gts-0.7.6-19.20111025.el6.i686.rpm
yum localinstall gts-0.7.6-19.20111025.el6.i686.rpm -y
wget 
http://www.graphviz.org/pub/graphviz/stable/redhat/el6/i386/os/graphviz-2.28.0-1.el6.i686.rpm 
yum localinstall graphviz-2.28.0-1.el6.i686.rpm  -y
wget http://sourceforge.net/projects/ntop/files/ntop/Stable/ntop-5.0.1.tar.gz/download
tar zxvf ntop-5.0.1.tar.gz
cd ntop-5.0.1
./autogen.sh --prefix=/usr/local/ntop
make && make install

useradd -M -s /sbin/nologin -r ntop
chown -R ntop:root /usr/local/ntop
chown -R ntop:ntop /usr/local/ntop/share/ntop

vi /etc/rc.local  加入下列這行
/usr/local/ntop/bin/ntop -P /var/log/ntop/ -d -L  -u ntop > /dev/null 2>&1 &
重開機後進 http://ip:3000
Edit Preferences
dot.path 改為 /usr/bin/dot