CentOS7.6安装suricata6.0.4

由于通过源码编译依赖开源库比较多,而官方又没有指定开源库的版本范围,导致编译过程遇到的问题较多,因此这里把编译过程中遇到的问题整理汇总。

1.安装依赖环境

yum install -y libpcap zlib libyaml libpcap-devel jansson-devel pcre-devel lua-devel libmaxminddb-devel epel-release libnetfilter_queue-devel nss-devel libyaml-devel zlib-devel luajit-devel 

yum install -y rustc cargo

2.安装PIP 

 yum -y install epel-release
yum -y install python-pip
pip install --upgrade pip

3.下载suricata源码

wget  https://www.openinfosecfoundation.org/download/suricata-6.0.4.tar.gz
 tar -xvf suricata-6.0.4.tar.gz

4.开始安装

./configure --disable-gccmarch-native --localstatedir=/var --prefix=/usr/ --sysconfdir=/etc --enable-lua --enable-geoip 

注意检查依赖库的版本号,我这里rustc版本为 1.58.1 

Suricata Configuration:
  AF_PACKET support:                       yes
  eBPF support:                            no
  XDP support:                             no
  PF_RING support:                         no
  NFQueue support:                         no
  NFLOG support:                           no
  IPFW support:                            no
  Netmap support:                          no
  DAG enabled:                             no
  Napatech enabled:                        no
  WinDivert enabled:                       no

  Unix socket enabled:                     yes
  Detection enabled:                       yes

  Libmagic support:                        no
  libnss support:                          yes
  libnspr support:                         yes
  libjansson support:                      yes
  hiredis support:                         no
  hiredis async with libevent:             no
  Prelude support:                         no
  PCRE jit:                                yes
  LUA support:                             yes
  libluajit:                               no
  GeoIP2 support:                          yes
  Non-bundled htp:                         no
  Old barnyard2 support:
  Hyperscan support:                       no
  Libnet support:                          no
  liblz4 support:                          no

  Rust support:                            yes
  Rust strict mode:                        no
  Rust compiler path:                      /root/.cargo/bin/rustc
  Rust compiler version:                   rustc 1.58.1 (db9d1b20b 2022-01-20)
  Cargo path:                              /root/.cargo/bin/cargo
  Cargo version:                           cargo 1.58.0 (f01b232bc 2022-01-19)
  Cargo vendor:                            yes

  Python support:                          yes
  Python path:                             /usr/bin/python2.7
  Python distutils                         yes
  Python yaml                              yes
  Install suricatactl:                     yes
  Install suricatasc:                      yes
  Install suricata-update:                 yes

  Profiling enabled:                       no
  Profiling locks enabled:                 no

  Plugin support (experimental):           yes

Development settings:
  Coccinelle / spatch:                     no
  Unit tests enabled:                      no
  Debug output enabled:                    no
  Debug validation enabled:                no

Generic build parameters:
  Installation prefix:                     /usr
  Configuration directory:                 /etc/suricata/
  Log directory:                           /var/log/suricata/

  --prefix                                 /usr
  --sysconfdir                             /etc
  --localstatedir                          /var
  --datarootdir                            /usr/share

  Host:                                    x86_64-pc-linux-gnu
  Compiler:                                gcc (exec name) / g++ (real)
  GCC Protect enabled:                     no
  GCC march native enabled:                no
  GCC Profile enabled:                     no
  Position Independent Executable enabled: no
  CFLAGS                                   -g -O2 -std=gnu99 -I${srcdir}/../rust/gen -I${srcdir}/../rust/dist
  PCAP_CFLAGS
  SECCFLAGS

To build and install run 'make' and 'make install'.

标准的make、make install步骤 

make
make install
make install-conf 

make install-rules

5.遇到的问题

找不到libhtp.so.2库,复制一份到/lib64/libhtp.so.2后解决

ldd /usr/bin/suricata
        linux-vdso.so.1 =>  (0x00007fffd93ec000)
        liblua-5.1.so => /lib64/liblua-5.1.so (0x00007f21f1e66000)
        libhtp.so.2 => 
        librt.so.1 => /lib64/librt.so.1 (0x00007f21f1a36000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f21f1734000)
 

参考资料

suricata官方安装步骤介绍:Suricata User Guide — Suricata 6.0.4 documentationicon-default.png?t=M0H8https://suricata.readthedocs.io/en/suricata-6.0.4/依赖库详细日志:

FreshPorts -- security/suricata: High Performance Network IDS, IPS and Security Monitoring engineicon-default.png?t=M0H8https://www.freshports.org/security/suricata

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值