罪と罰++二律背反


./configure \
--enable-mbstring \
--enable-mbstr-etc-trans \
--enable-mbregex \
--enable-zend-multibyte \
--with-pgsql \
--with-apxs=/usr/sbin/apxs \
--with-gd=/usr \
--with-ttf=/usr \
--enable-gd-native-ttf \
--with-free-type-dir=/usr \
--with-jpeg-dir=/usr/lib \
--with-png-dir=/usr/lib \
--with-zlib-dir=/usr/lib \
--prefix=/usr/local/php \
--enable-sockets \
--with-mysql=/usr/local/mysql \
--with-gd 
make
make install
cat /usr/local/httpd/conf/http.conf | grep php
# LoadModule php4_module        modules/libphp4.so
# AddType application/x-httpd-php .php 
rpm -qa|grep pcap
rpm -qa|grep pcre
apt-get install pcre*
./configure --prefix=/usr/local/snort --with-mysql=/usr/local/mysql # となっていたが
./configure --prefix=/usr/local/snort --with-mysql=/usr/include/mysql # にしてみた
make
make install
cp -Rp ./snort-2.1.1/etc /usr/local/snort/conf
cp -Rp ./snort-2.1.1/rules /usr/local/snort/rules
# vi /usr/local/snort/conf/snort.conf
output database: log,mysql,user=root password=snort dbname=snort_db 
cp ./snort-2.1.1/contrib/S99snort /etc/init.d/snort
chmod 755 /etc/init.d/snort
ln -s /etc/init.d/snort /etc/rc3.d/S99snort
ln -s /etc/init.d/snort /etc/rc3.d/K99snort
/usr/local/mysql/bin/mysqladmin - u root -u root password ROOT_PASS
/usr/local/mysql/bin/mysql -u root -p
create database snort_db
connect snort_db
# ACID用テーブル
source ./snort-2.1.1/contrib/create_mysql
# ACID用エクストラテーブル
system gzip -d ./snort-2.1.1/contrib/snortdb-extra.gz
source ./snort-2.1.1/contrib/snortdb-extra
# 
grant INSERT,SELECT on snort_db.* to snort@localhost;
grant UPDATE on snort_db.sensor to snort@localhost;
#
grant CREATE,INSERT,SELECT,UPDATE,DELETE on snort_db.* to acid@localhost;
#
set password for 'snort'@'localhost' = password('snort_pass');
set password for 'acid'@'localhost' = password('acid_pass');
tar zxvf ./jpgraph-1.14.tar.gz
mv ./jpgraph-1.14 /usr/local/php/include/jpgraph
tar zxvf ./adodb421.tgz 
mv ./adodb /usr/local/php/include/adodb
# /usr/local/httpd/acid/acid_conf.php
$DBlib_path="/usr/local/php/include/adodb";
$DBtype="mysql";
$alert_dbname="snort_db";
$alert_host="localhost";
$alert_port="";
$alert_user="acid";
$alert_password="acid_pass"; # mysqlのacidユーザ
$ChartLib_path="/usr/local/httpd/jpgraph/src";
$chart_file_format="png";
# ユーザの追加
#htpasswd -c /var/www/htpass/acid_user USER_NAME
# httpd.confで認証
Alias /ACID/ /var/www/acid/
<Directory /var/www/acid/ >
       DirectoryIndex acid_main.php
       AuthType Basic
       AuthName "ACID"
       AuthUserFile /var/www/htpass/acid_user
       Require valid-user
       AllowOverride None
</Directory>

トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS