中国IT动力,最新最全的IT技术教程
最新100篇 | 推荐100篇 | 专题100篇 | 排行榜 | 搜索 | 在线API文档 | 网通镜像
首 页 | 程序开发 | 操作系统 | 软件应用 | 图形图象 | 网络应用 | 精文荟萃 | 教育认证 | 硬件维护 | 未整理篇 | 站长教程
ASP JS PHP工程 ASP.NET 网站建设 UML J2EESUN .NET VC VB VFP 网络维护 数据库 DB2 SQL2000 Oracle Mysql
服务器 Win2000 Office C DreamWeaver FireWorks Flash PhotoShop 上网宝典 CorelDraw 协议大全 网络安全 微软认证
硬件维护  CPU  主板  硬盘  内存  显卡  显示器  键盘鼠标  声卡音箱  打印机  机箱电源  BIOS  网卡  C#  Java  Delphi  vs.net2005
  当前位置:> 操作系统 > Linux > Linux应用
RedHat linux 9系统下构建小型入侵检测系统(2)
作者:佚名 时间:2007-10-08 14:38 出处:ChinaITLab  责编:月夜寒箫
              摘要:RedHat linux 9系统下构建小型入侵检测系统(2)
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
            注:apache根目录为 /www
            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为自启动:
cp /www/bin/apachectl /etc/init.d/httpd
            cd /etc/rc3.d
            ln -s /etc/init.d/httpd S85httpd
            ln -s /etc/init.d/httpd K85httpd
            cd /etc/rc5.d
            ln -s /etc/init.d/httpd S85httpd
            ln -s /etc/init.d/httpd K85httpd
            
测试一下 PHP:
cd /etc/init.d
            /httpd start
            
在/www/htdocs下建立文件 test.php
cd /www/htdocs
            vi test.php
            加入
            lt;?php
            hpinfo();
            ?>
            
用浏览器访问http://IP_address/test.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 (修改为你的内部网网络地址,我的是
192.168.0.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
            (去掉原文件中的 -g ?$SNORT_GID )
            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
            
关闭本页
 
首页 | 投资与合作 | 服务条款 | 隐私政策 | 收藏本站 | 设为首页 | 新用户注册 | 免责声明 | 使用帮助
Copyright ©2005-2008 chinaitpower.com All rights reserved. www.chinaitpower.com 版权所有