zoukankan      html  css  js  c++  java
  • centos7 编译ntopng源码

    先安装编译所需的开发工具

    yum groupinstall Development Tools

    yum install tcl

    yum install libpcap libpcap-devel

     yum install libgnomeui-devel(glib 安装 Linux平台下最常用的C语言函数库,它具有很好的可移植性和实用性。)

    安装Redis:

    yum -y install epel-release

    1、执行autogen.sh

    2、执行./configure

    3、提示执行以下命令

    Please do cd ..; git clone https://github.com/ntop/nDPI.git; cd nDPI; ./autogen.sh; make; cd ../ntopng

    4、执行之后再次执行./configure

    提示安装libcurl-dev

    执行:yum install curl-devel

    5、再次执行./configure 又遇到错误

    SQLite 3.x missing (libsqlite3-dev): please install it and try again

    执行:

    yum install sqlite-devel

    6、make执行过程中还会遇到一些错误,是因为configure或者makefile文件没有执行权限,对这些文件加上执行权限即可

    7、mysql.h找不到

    虽然已经装了mysql-libs,还要安装mysql开发包。

    yum install mysql-devel

    Please do not forget to download GeoIP databases doing: /usr/bin/gmake geoip

     还需要libxml2 包

    执行make install 之后有这么一段话

    Make sure you have already run 'make geoip' to also install geoip dat files
    While we provide you an install make target, we encourage you
    to create a package and install that
    rpm - do 'make build-rpm'
    deb - do 'cd packages/ubuntu;./configure;make
    mkdir -p /usr/local/share/ntopng /usr/local/man/man8 /usr/local/bin
    cp ntopng /usr/local/bin
    cp ./ntopng.8 /usr/local/man/man8
    cp -r ./httpdocs /usr/local/share/ntopng
    cp -Lr ./scripts /usr/local/share/ntopng # L dereference symlinks
    find /usr/local/share/ntopng -name "*~" | xargs /bin/rm -f
    find /usr/local/share/ntopng -name ".git" | xargs /bin/rm -rf

  • 相关阅读:
    Day 20 初识面向对象
    Day 16 常用模块
    Day 15 正则表达式 re模块
    D14 模块 导入模块 开发目录规范
    Day 13 迭代器,生成器,内置函数
    Day 12 递归,二分算法,推导式,匿名函数
    Day 11 闭包函数.装饰器
    D10 函数(二) 嵌套,命名空间作用域
    D09 函数(一) 返回值,参数
    Day 07 Day08 字符编码与文件处理
  • 原文地址:https://www.cnblogs.com/earendil/p/6643771.html
Copyright © 2011-2022 走看看