利用 Ntop 监控系统网络

1. 下载软件

libpcap网络数据包捕获函数包

wget http://www.tcpdump.org/release/libpcap-1.3.0.tar.gz

wget http://ftp.gnu.org/pub/gnu/gdbm/gdbm-latest.tar.gz

wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.7.tar.gz

wget http://www.python.org/ftp/python/2.7.4/Python-2.7.4.tgz

wget http://www.maxmind.com/download/geoip/api/c/GeoIP.tar.gz

wget http://nchc.dl.sourceforge.net/project/ntop/ntop/Stable/ntop-5.0.1.tar.gz

 

 

2. 安装软件

yum -y install zlib libxml2-devel zlib-devel flex byacc libtool subversion         编译 libpcap 与 ntop 需要的支持

tar zxvf libpcap-1.3.0.tar.gz

cd libpcap-1.3.0

make

make install

 

tar zxvf gdbm-latest.tar.gz

cd gdbm-1.10

./configure

make

make install

 

tar zxvf rrdtool-1.4.7.tar.gz

cd rrdtool-1.4.7

./configure

make 

make install

 

tar zxvf GeoIP.tar.gz

cd GeoIP-1.4.8/

./configure

make 

make install

 

tar zxvf Python-2.7.4.tgz

cd Python-2.7.4

./configure --enable-shared

make all
make install
make clean
make distclean
/usr/local/bin/python2.7 -V
rm -rf /usr/bin/python
ln -s /usr/local/bin/python2.7 /usr/bin/python
 
vi /usr/bin/yum
#!/usr/bin/python
改成
#!/usr/bin/python2.4
 

tar zxvf ntop-5.0.1.tar.gz

cd ntop-5.0.1

./autogen.sh

make

make install

 

创建ntop 目录

mkdir /usr/local/var/ntop

chmod -R 777 /usr/local/var/ntop/

创建用户组与用户

groupadd ntop

useradd -g ntop -s /bin/true -M ntop

 

初始化ntop 创建用户 密码

ntop -P /usr/local/share/ntop/ -u ntop -A

-----------------------------------------------------------------

Please enter the password for the admin user: 

Please enter the password again: 

Thu Apr 18 14:08:41 2013  Admin user password has been set

Thu Apr 18 14:08:41 2013  Admin password set...

-----------------------------------------------------------------

启动ntop

ntop -i eth0

第一次启动的时候也需要配置一次 admin 密码

 

 

http://localhost:3000 

 

访问页面

你可能感兴趣的:(ntop)