Linux/Centos安装ntop中文版
一:安装环境
yum install libpcap libpcap-devel libpng gdbm gdbm-devel glib libxml2-devel pango pango-devel gd dos2unix libtool-ltdl libtool-ltdl-devel gcc libtool rrdtool-devel
检测下:
yum install -y libpcap* freetype* libpng* gdbm* libart_lgpl* libtool* rrdtool* libev* rrdtool-devel
安装ntop中文版:
wget http://www.netexpert.cn/ntop/ntopchs.zip
unzip -d ntop ntopchs.zip
cd ntop
chmod +x autogen.sh
dos2unix autogen.sh
./autogen.sh
提示:# configure: error: cannot run /bin/sh ./config.sub
解决方法
sudo ln -s -f /usr/share/libtool/config/config.guess config.guess
sudo ln -s -f /usr/share/libtool/config/config.sub config.sub
dos2unix Makefile.in
dos2unix config.h.in
dos2unix address.c
dos2unix Makefile
dos2unix depcomp
dos2unix mkinstalldirs
dos2unix GeoIP-1.4.8/libGeoIP/Makefile
sed -i 's/lua\.lo//g' Makefile
make
提示# /usr/bin/ld: cannot find -lGeoIP
GeoIP重新编译安装
chmod +x mkinstalldirs
make install
新建运行用户配置目录权限:
useradd -M -s /sbin/nologin ntop
chown -R ntop:ntop //usr/local/share/ntop
chown -R ntop:ntop /usr/local/var/ntop
设置ntop管理员密码:
1
ntop -A
运行ntop:
/usr/local/bin/ntop -d -u ntop -i eth0
-d 后台运行
-u 运行用户
-i 监控网卡