linux下,安装snort,输入 ./configure --prefix=/usr/local/snort --enable-mysql=/usr/
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux下,安装snort,输入 ./configure --prefix=/usr/local/snort --enable-mysql=/usr/相关的知识,希望对你有一定的参考价值。
出现:
configure: WARNING: unrecognized options: --with-mysql
查看了./configure --help,关于--with有如下:
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
both]
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot=DIR Search for dependent libraries within DIR
(or the compiler's sysroot if not specified).
--with-libpcap-includes=DIR libpcap include directory
--with-libpcap-libraries=DIR libpcap library directory
--with-libpfring-includes=DIR libpfring include directory
--with-libpfring-libraries=DIR libpfring library directory
--with-libpcre-includes=DIR libpcre include directory
--with-libpcre-libraries=DIR libpcre library directory
--with-openssl-includes=DIR openssl include directory
--with-openssl-libraries=DIR openssl library directory
--with-dnet-includes=DIR libdnet include directory
--with-dnet-libraries=DIR libdnet library directory
--with-daq-includes=DIR DAQ include directory
--with-daq-libraries=DIR DAQ library directory
--with-intel-soft-cpm-includes=DIR Intel Soft CPM include directory
--with-intel-soft-cpm-libraries=DIR Intel Soft CPM library directory
--with-librzb-api=DIR librazorback_api directory
的确没有--with-mysql,这要怎么办呢?
可是,mysql已经装了……为什么在--with里看不到啊?
参考技术B 没有就没有,难道你还能添加?追问mysql已经安装了,但是没有--with-mysql项,那是要重装mysql,还是哪个软件当初安装前没配置好,总要解决啊
snort安装
在官网(http://www.snort.org/dl/)上下载的文件(snort-2.8.3.2.tar.gz) 但找的书啊什么的,安装都是.EXE的安装,这个包解压出来没看到有EXE文件啊,请教下,这个到底怎么装?详细说明下吧高手。
参考技术A 1。在官网(http://www.snort.org/dl/)2。选择 Binaries: (Click to view binaries »)
3。选择 win32/
4. 选择 Snort_2_8_3_2_Installer.exe
5。然后下载,安装。
6。snort 要和winpcap 4_0_1 一起用的,即先下载 winpcap, install and run, 然后再装snort.
7. snort 安装以后,是在dos command 里面运行的,即 c:\snort\bin\snort.
8. 由于snort 是基于linux设计的,所以在 c:\snort\ect\snort.con 文件是要用notepad++修改成window 的格式才能工作的。
9。具体问题发邮件到:jack772882@126.com, 我可以发 conf file 给你,哈哈老师刚教的,现买现卖了。
10. winpcap 可以在 http://www.winpcap.org/install/default.htm
下载。本回答被提问者采纳 参考技术B 本文讲述Linux平台(这里是redhat 9.0)下snort的安装与配置,最后为snort配置一个ACID的web入侵事件数据库分析控制台。在Linux环境下需要事先安装多种软件构建支持环境才能使用snort。表1列出了相关软件及它们的作用。
表1 安装snort所需软件
软件名称 下载网站 作用
Apache http://httpd.apache.org/ Linux下Aapche服务器
PHP http://php.net/ PHP脚本支持
MySQL http://www.mysql.cn/ 数据库支持
libpcap http://www.tcpdump.org/ 网络抓包工具
Snort http://www.snort.org Windows下的Snort安装包
ACID http://www.cert.org/kb/acid 基于PHP的入侵检测数据库分析控制台
ADOdb http://adodb.sourceforge.net 为PHP提供统一的数据库连接函数
JpGraph http://www.aditus.nu/jpgraph PHP所用图形库
1.安装zlib1.1.4
tar -xzvf zlib-xx.tar.gz
cd zlib-xx
/configure;
make install
cd ..
2.安装LibPcap0.7.2
tar -xzvf libpcap.tar.gz
cd libpcap-xx
/configure
Make
make install
cd ..
3.安装MySQL4.0.12
tar -xzvf mysql-xx.tar.gz
cd mysql-xx
/configure --prefix=/usr/local/mysql
Make
make install
cd scripts
/mysql_install_db
chown -R root /usr/local/mysql
chown -R mysql /usr/local/mysql/var
chgrp -R mysql /usr/local/mysql
cd ./support-files/my-medium.cnf /etc/my.cnf
向/etc/ld.so.conf中加入两行:/usr/local/mysql/lib/mysql
/usr/local/lib
载入库,执行
ldconfig –v
测试mysql是否工作:
4.安装Apache2.0.45和PHP4.3.1
tar -zxvf httpd-2.0.xx.tar.gz
cd httpd_2.xx.xx
/configure --prefix=/www --enable-so
make
make install
cd ..
tar -zxvf php-4.3.x.tar.gz
cd php-4.3.x
/configure --prefix=/www/php --with-apxs2=/www/bin/apxs --with-config- filepath=/www/php --enable-sockets --with-mysql=/usr/local/mysql --with-zlibdir=/
usr/local --with- gd
cp php.ini-dist /www/php/php.ini
编辑httpd.conf(/www/conf):
加入两行
LoadModule php4_module modules/libphp4.so
AddType application/x-httpd-php .php
httpd.conf中相关内容如下:
#
# LoadModule foo_module modules/mod_foo.so
LoadModule php4_module modules/libphp4.so
# AddType allows you to tweak mime.types without actually editing it, or ?$
# make certain files to be certain types.
#
AddType application/x-tar .tgz
AddType image/x- icon .ico
AddType application/x-httpd-php .php
测试一下Apache和PHP:
5.安装 Snort2.0
5.1建立snort配置文件和日志目录
mkdir /etc/snort
mkdir /var/log/snort
tar -zxvf snort-2.x.x.tar.gz
cd snort-2.x.x
/configure --with-mysql=/usr/local/mysql
Make
make install
5.2安装规则和配置文件
cd rules (在snort安装目录下)
cp * /etc/snort
cd ./etc
cp snort.conf /etc/snort
cp *.config /etc/snort
5.3修改snort.conf(/etc/snort/snort.conf)
var HOME_NET 10.2.2.0/24
var RULE_PATH ./rules 修改为 var RULE_PATH /etc/snort/
改变记录日志数据库:
output database: log, mysql, user=root password=your_password
dbname=snort host=localhost
5.4设置snort为自启动:
在snort安装目录下
cd /contrib.
cp S99snort /etc/init.d/snort
vi /etc/init.d/snort
修改snort如下:
CONFIG=/etc/snort/snort.conf
#SNORT_GID=nogroup (注释掉)
#8194;$SNORT_PATH/snort -c ?$CONFIG -i ?$IFACE ?$OPTIONS
chmod 755 /etc/init.d/snort
cd /etc/rc3.d
ln -s /etc/init.d/snort S99snort
ln -s /etc/init.d/snort K99snort
cd /etc/rc5.d
ln -s /etc/init.d/snort S99snort
ln -s /etc/init.d/snort K99snort
6 在mysql中建立snort数据库,结果如下:
7.安装ADOdb
cp adodb330.tgz /www/htdocs/
cd /www/htdocs
tar -xzvf adodb330.tgz
rm -rf adodb330.tgz
8.安装JgGraph
cp jpgraph-1.11.tar.gz /www/htdocs
cd /www/htdocs
tar -xzvf jpgraph-1.xx.tar.gz
rm -rf jpgrap-1.xx.tar.gz
cd jpgraph-1.11
rm -rf README
rm -rf QPL.txt
9.安装配置数据控制台ACID
cp acid-0.0.6b23.tar.gz /www/htdocs
cd /www/htdocs
tar -xvzf acid-0.9.6b23.tar.gz
rm -rf acid-0.9.6b23.tar.gz
cd /www/htodcs/acid/
编辑acid_conf.php,修改相关配置如下:
#8194;$DBlib_path = "/www/htdocs/adodb";
#8194;$alert_dbname = "snort";
#8194;$alert_host = "localhost";
#8194;$alert_port = "";
#8194;$alert_user = "root";
#8194;$alert_password = "Your_Password";
/* Archive DB connection parameters */
#8194;$archive_dbname = "snort";
#8194;$archive_host = "localhost";
#8194;$archive_port = "";
#8194;$archive_user = "root";
#8194;$archive_password = "Your_Password ";
And a little further down
#8194;$ChartLib_path = "/www/htdocs/jpgraph-1.11/src";
/* File format of charts ('png', 'jpeg', 'gif') */
#8194;$chart_file_format = "png";
进入web界面:
http://yourhost/acid/acid_main.php
点"Setup Page"链接 ->Create Acid AG
访问http://yourhost/acid将会看到ACID界面。 参考技术C 有windows和linux版本的,你要下载对应的呀
以上是关于linux下,安装snort,输入 ./configure --prefix=/usr/local/snort --enable-mysql=/usr/的主要内容,如果未能解决你的问题,请参考以下文章