系统 : ubuntu 18.04
一、安装依赖包
apt update
apt -y install build-essential libpcap-dev libpcre3-dev libnet1-dev zlib1g-dev luajit hwloc libdnet-dev libdumbnet-dev bison flex liblzma-dev openssl libssl-dev pkg-config libhwloc-dev cmake cpputest libsqlite3-dev uuid-dev libcmocka-dev libnetfilter-queue-dev libmnl-dev autotools-dev libluajit-5.1-dev libunwind-dev autoconf automake libtool libffi-dev
二、安装daq
git clone https://github.com/snort3/libdaq.git
cd libdaq
./bootstrap
./configure
make
make install
三、安装gperftools
wget https://github.com/gperftools/gperftools/releases/download/gperftools-2.9/gperftools-2.9.0.tar.gz
cd gperftools/
tar xzf gperftools-2.9.0.tar.gz
cd gperftools-2.9.0
./configure
make
make install
四、安装snort3
git clone -b 3.1.20.0 https://github.com/snort3/snort3.git
cd snort3
./configure_cmake.sh --prefix=/usr/local --enable-tcmalloc
cd build
make
make install
四、配置软链
ldconfig
ln -s /usr/local/bin/snort /usr/sbin/snort
五、测试运行
snort -v
出现以下提示说明安装成功
--------------------------------------------------
o")~ Snort++ 3.1.20.0
--------------------------------------------------
--------------------------------------------------
Network Policy : policy id 0 :
--------------------------------------------------
Inspection Policy : policy id 0 :
--------------------------------------------------
pcap DAQ configured to passive.
--------------------------------------------------
host_cache
memcap: 8388608 bytes
Snort successfully validated the configuration (with 0 warnings).
o")~ Snort exiting