将3个压缩包拷贝到root/ntop中:
M v *.tar.gz ntop
进入 ntop 目录将压缩包解压到 /usr/src 下:
tar fvxz libpcap-0.8.3.tar.gz -C /usr/src
tar fvxz rrdtool-1.1.13.tar.gz -C /usr/src
tar fvxz ntop-3-3 .tar.gz -C /usr/src
进入 /usr/src 目录,进入 /libpcap-0.8.3 目录,执行文件 ./configure
会报错: configure: error: Your operating system's lex is insufficient to compile
libpcap. flex is a lex replacement that has many advantages, including
being able to compile libpcap. For more information, see
http://www.gnu.org/software/flex/flex.html .
说明缺少必要的软件包 flex 盘镜像 mount /dev/cdrom /mnt/cdrom
安装 flex 软件包: yum install flex
安装完成后,再次执行 ./configure, 此时可以正常执行
编译并编译安装: make&&make instal
make: yacc :命令未找到
需要安装 byacc 包: yum install byacc
再次编译,此时可以编译成功, libpcap-0.8.3 安装完成!
安装 rrdtool-1.2.13:
进入目录 /usr/src/rrdtool-1.2.13
执行文件 ./configure – prefix=/usr/local/, 将 rrdtool 包安装到 Local 下
报错信息: configure: error: Please fix the library issues listed above and try again.
查找出需要安装的包并通过 yum 安装: yum install libart-lgpl-devel libxml2-devel pango-devel pango libpng-devel freetype freetype-devel
再次执行 ./configure – prefix=/usr/local/ ,此时再次报错 需要安装 libart_lgpldevel 包: yum install libart_lgpldevel
再次执行 ./configure-prefix=/usr/local ,可以成功执性
编译并编译安装: make&&make install
安装 ntop-3.3 :
进入目录 /usr/src/ntop-3.3
N top 中有自动执行脚本,自动生成文件并自动配置。并将 mysql 屏蔽
执行: ./autogen.sh – disable-mysql 报错:
1. Testing gnu tools....
You must have libtool installed to compile ntop.
Download the appropriate package for your distribution, or get the
source tarball from ftp://ftp.gnu.org/pub/gnu/libtool
We require version 1.4 or higher
We recommend version 1.5 or higher
You must have automake installed to compile ntop.
Download the appropriate package for your distribution, or get the
source tarball from ftp://ftp.gnu.org/pub/gnu/automake
We recommend version 1.6.3 or higher
You must have autoconf installed to compile autogen.sh.
Download the appropriate package for your distribution, or get the
source tarball from ftp://ftp.gnu.org/pub/gnu/autoconf
We recommend version 2.53 or higher
需要安装 libtool 包: yum install libtool
再次执行 报错 :
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
缺失 C++ 编译库,安装 c++ 编译库文件: yum install gcc-c++
再次执行 ./autogen.sh --disable-mysql
成功!
编译并编译安装: make&&make install
安装完成!