作业

 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 install
 
编译报错:
make: yacc:命令未找到
make: *** [grammar.c] 错误 127
需要安装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/,此时再次报错: configure: error: Please fix the library issues listed above and try again.  需要安装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
再次执行 ./autogen.sh --disable-mysql  报错:
     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
安装完成!

你可能感兴趣的:(p安装nto)