Hyperscan 5.4.0 安装教程 (CentOS7环境)

参考:Getting Started — Hyperscan 5.4.0 documentationhttp://intel.github.io/hyperscan/dev-reference/getting_started.html

目录

1.下载

2.安装环境配置

2.1 硬件需求

2.2 软件需求

3.安装

3.1 创建构建目录

3.2 设置编译选项

3.3 构建hyperscan

 4.安装完成测试


1.下载

https://github.com/intel/hyperscan/releases

2.安装环境配置

2.1 硬件需求

Supplemental Streaming SIMD Extensions 3 (SSSE3)

2.2 软件需求

(1) 编译器要求 :

    GCC, v4.8.1 or higher

  • 查看gcc版本,(Centos7 自带gcc4.8.5)
gcc --version
  • 在线下载、升级gcc
yum install gcc
  • 离线下载gcc

GCC mirror sites- GNU Projecthttps://gcc.gnu.org/mirrors.html

(2)系统要求:

Ubuntu 14.04 LTS or newer  

RedHat/CentOS 7 or newer

(3)编译需要依赖

Dependency

Version

Notes

CMake

>=2.8.11

Ragel

6.9

Python

2.7

Boost

>=1.57

Boost headers required

Pcap

>=0.8

Optional: needed for example code only

a. CMake

  • 查看CMake版本 (Centos7 自带cmake version 2.8.12.2)
cmake -version
  • 在线下载、升级CMake

yum install cmake
  • 离线下载CMake

Download | CMakehttps://cmake.org/download/b. Ragel

  • 查看Ragel版本 (Centos7 系统没有ragel ,需要安装)
ragel -v
  • 离线下载、安装Ragel

下载地址:http://www.colm.net/files/ragel/ragel-6.10.tar.gzhttp://www.colm.net/files/ragel/ragel-6.10.tar.gzhttp://www.colm.net/files/ragel/ragel-6.10.tar.gz

解压后编译安装:

./configure  && make && make install 

c. Python

  • 查看Python 版本 (Centos7 自带Python 2.7.5
python -V
  • 离线下载Python:

Download Python | Python.orgThe official home of the Python Programming Languagehttps://www.python.org/downloads/d. Boost

  • 下载地址:

JFroghttps://boostorg.jfrog.io/artifactory/main/release/1.77.0/source/boost_1_77_0.tar.gz

  • 头文件拷贝、链接

boost解压后的/boost目录链接到(也可以拷贝)hyperscan解压后的/include/boost目录

ln -s boost_1_77_0/boost /include/boost

注意:链接的目录均需要绝对目录

e. Pcap

  • 下载地址:

https://www.tcpdump.org/release/libpcap-1.10.1.tar.gzhttps://www.tcpdump.org/release/libpcap-1.10.1.tar.gz

  • 解压后编译安装:
./configure && make && make install

3.安装

3.1 创建构建目录

cd 
mkdir 
cd 

3.2 设置编译选项

cmake [-G ] [options] 
  • 编译类型为发布版本,并生成so库:
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=on 
  • 其他编译选项参考:

Getting Started — Hyperscan 5.4.0 documentationhttp://intel.github.io/hyperscan/dev-reference/getting_started.html#cmake-configuration

Getting Started — Hyperscan 5.4.0 documentationhttp://intel.github.io/hyperscan/dev-reference/getting_started.html#build-type

3.3 构建hyperscan

cmake --build . 

或者

make -j 
make install

 4.安装完成测试

  • 查看是否生成so库
cd ./build/lib 
  • 运行单元测试用例
bin/unit-hyperscan

你可能感兴趣的:(hyperscan,hyperscan5.4.0,Centos7)