开始安装:
1.安装MySQL,
#addgroup mysql
#adduser mysql
然后,以mysql身份登录,执行下列命令:
$gzip -d -c mysql-3.23.49.tar.gz tar xvf -
$cd mysql-3.23.49
$./configure
$make
$make install
2.安装openssl
#tar zxvf openssl*
#cd openssl
#./configure
#make
#make test
#make install
3.安装libpcap
#tar zxvf libpcap*
#cd libpcap-0.8.3
#./configure
如果出现:
configure: warning: cannot determine packet capture interface
configure: warning: (see INSTALL for more info)
说明需要编译系统内核,使其对CONFIG_PACKET支持
#make
#make install
4.安装snort
#tar zxvf snort*
#cd snort-2.2.0
#./configure --enable-flexresp --with-mysql=/usr/local/mysql --with-openssl=/usr/local/ssl
支持mysql,持openssl 还有更多的一些选项,可以参见tarball文档
如果出现:
ERROR! Libpcre header not found, go get it from
请http://www.pcre.org下载lib库安装即可。
如果出现:
ERROR! Libnet header not found
请http://www.packetfactory.net/projects/libnet/下载安装即可。
如果已经安装,可以用--with-libnet-* 选项
#make
#make install
5.安装apache
#./configure --prefix=/usr/local/apache --enable-so
#make
#make install
6.安装gd
首先安装为PHP提供既时生成PNG和JPG图象功能的GD库:
#gzip -d -c gd-2.0.28.tar.gz tar xvf -
#cd gd-2.0.28
#make
#make install
7.安装php
#gzip -d -c php-4.3.2.tar.gz tar xvf -
#cd php-4.3.2
#./configure -with-mysql=/usr/local/mysql \
--with-apxs=/usr/local/apache/bin/apxs \
--with-gd=/usr/local
#make
#make install
8.安装ACID
该部分的安装工作具体包括三个软件包:adodb452.tar.gz、phplot-5.0rc1.tar.gz和acid-0.9.6b23.tar.gz 。安装过程十分简单,只需分别将这三个软件包解压缩并展开在Apache服务器的文档根目录下即可,具体操作
如下所示:(本服务器的文档目录为/www/ids)
#cd /www/ids/
#gzip -d -c adodb452.tar.gz tar xvf -
#gzip -d -c phplot-5.0rc1.tar.gz tar xvf -
#gzip -d -c acid-0.9.6b23.tar.gz tar xvf -
然后开始配置工作,转到acid目录下编辑ACID的配置文件:acid_conf.php给下列变量赋值:
$Dblib_path="../adodb"
$DBtype="mysql"
$alert_dbname="snort"
$alert_host="localhost"
$alert_port="3306"
$alert_user="root"
$alert_password="123"
$archive_dbname="snort"
$archive_host="localhost"
$archive_port="3306"
$archive_user="root"
$archive_password="123"
$ChartLib_path="../phplot"
$Chart_file_format="png"
$portscan_file="/var/log/snort/portscan.log"
好,到此,所需软件安装完成,下面进入snort的设定与启动。