站内搜索
广告
一个网络入侵检测系统的实现
作者:    来源:    点击:    日期:2007-8-5 12:07:27   
  3) 编辑/etc/snort.conf文件在output plugin 段中加入如下一行:
  output database: alert, mysql, user=root passWord=abc123
   dbname=snort host=localhost 
  
  3、 安装Apache
  
  1) 安装MM库
  
    
  #gzip -d -c mm-1.1.3.tar.gz tar xvf -
  #cd mm-1.1.3
  #./configure
  #make
  #make install 
  
  MM库被按照缺省配置安装在/usr/local目录下。
  
  2) 安装OpenSSL
  #gzip -d -c openssl-0.9.6d.tar.gz tar xvf -
  #cd openssl-0.9.6d
  #./config
  #make
  #make test
  #make install 
  OpenSSL按照缺省设置安装在/usr/local目录下。
  
  3) 为Apache扩展mod_ssl代码
  #gzip -d -c apache-1.3.24.tar.gz tar xvf -
  #gzip -d -c mod_ssl-2.8.8-1.3.24.tar.gz tar xvf -
  #cd mod_ssl-2.8.8-1.3.24
  #./configure --with-apache=apache-1.3.24 
  该命令运行成功之后,会有提示说明已经成功扩展了Apache的源代码。
  
  4) 安装Apache
  #cd ../apache-1.3.24
  #SSL_BASE=/usr/local EAPI_MM=/usr/local ./configure -enable-module=so      --enable-module=ssl      --prefix=/usr/local
  #make
  #make certificate
  #make install 
  
  其中,make certificate命令是为mod_ssl生成所需的安全证书,按照提示输入相应信息即可。这样,Apache就被安装在了/usr/local目录下。
  
  4、 安装PHP
  首先安装为PHP提供既时生成PNG和JPG图象功能的GD库:
  #gzip -d -c gd-1.8.4.tar.gz tar xvf -
  #cd gd-1.8.4
  #make
  #make install 
  
  按照缺省配置,将其安装到/usr/local目录下。接下来开始正式安装PHP:
  
  #gzip -d -c php-4.0.6.tar.gz tar xvf -
  #cd php-4.0.6
  #./configure -with-mysql=/usr/local      --with-apxs=/usr/local/bin/apxs      --with-gd=/usr/local
#make
  #make install 
  此处采用的是PHP的Apache动态模块DSO安装模式,完成之后,将会在/usr/local/libexec目录下生成Apache DSO模块libphp4.so。然后,还需将源码树中的PHP缺省配置文件php.ini-dist拷贝到/etc目录下并更名为php.ini;最后为了通知Apache启用PHP模块,编辑Apache的配置文件httpd.conf加入如下两行: 

  AddType application/x-httpd-php .php
  LoadModule php4_module libexec/libphp4.so 
  
  至此完成PHP的安装。
  
  5、 安装ACID
  
  该部分的安装工作具体包括三个软件包:adodb200.tar.gz、phplot-4.4.6.tar.gz和acid-0.9.6b21.tar.gz。安装过程十分简单,只需分别将这三个软件包解压缩并展开在Apache服务器的文档根目录下即可,具体操作如下所示:
  #cd /usr/local/htdoCS
  #gzip -d -c adodb200.tar.gz tar xvf -
  #gzip -d -c phplot-4.4.6.tar.gz tar xvf -
  #gzip -d -c acid-0.9.6b21.tar.gz tar xvf -
  #chown -R root:other *
  #chmod -R 755 * 
  然后开始配置工作,转到acid-0.9.6b21目录下编辑ACID的配置文件:acid_conf.php给下列变量赋值:
  $Dblib_path="../adodb200"
  $DBtype="mysql"
  $alert_dbname="snort"
  $alert_host="localhost"
  $alert_port="3306"
  $alert_user="root"
  $alert_password="abc123"
  $archive_dbname="snort_archive"
  $archive_host="localhost"
  $archive_port="3306"
  $archive_user="root"
  $archive_password="abc123"
  $ChartLib_path="../phplot-4.4.6"
  $Chart_file_format="png"
  $portscan_file="/var/log/snort/portscan.log" 
  至此,网络入侵检测系统的软件安装工作结束。 

首页 上一页 [1] [2] [3]  下一页 尾页 
一个网络入侵检测系统的实现 评论