ntop的安装
ntop3.3的部署1.安装rrdtool
tar zxvf rrdtool-1.2.23.tar.gz -C /usr/src
cd /usr/srcrdtool-1.2.23
rpm -Uvh libart_lgpl-devel-2.3.17-4.i386.rpm
cp freetype2.pc/usr/lib/pkgconfig/
注释:由于我的freetype2是安装在/usr/local/freetype的目录下的,所以要把freetype2.pc拷贝到相关目录,不然configure通不过的,同时这里不能通过建立符号连接的方法解决
./configure –prefix=/usr/local/rrdtool
make
make install
2.安装libpcap-1.0.0.tar.gz
tar -zxvf libpcap-1.0.0.tar.gz -C /usr/src
./configure
make
make install
3.安装ntop
tar zxvf ntop-3.3.tar.gz-C /usr/src
./autogen.sh
make
make install
4.配置ntop文件
cp packages/RedHat/ntop.conf.sample /etc/ntop.conf
cp packages/RedHat/ntop.init /etc/init.d/ntop
chkconfig --add 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 "" }'`
chmod 644 /etc/ntop.conf
vi /etc/ntop.conf
--db-file-path /var/log/ntop
--interface eth0
--trace-level 3
--http-server 3000
5.第一次运行时会出错
用service ntop start启动ntop出错,提示你看docs/1STRUN.txt,第一次运行时注意事项
第一次运行,必须加“admin password”等参数,运行用户必须为root
mkdir /var/log/ntop
useradd -s /sbin/nologin -d /dev/null ntop
chown -R ntop.ntop /var/log/ntop
/usr/local/ntop/bin/ntop -P /var/log/ntop -u root -A
参数说明:
-P db文件的路径
-u ntop的运行用户(run user)
-A 设定admin密码
创建ntop的运行用户ntop
这条命令同时还在/var/log/ntop目录下创建了ntop_pw.dbprefsCache.db文件
service ntop start
页:
[1]