Set up snort in linux

Source: Internet
Author: User
Set up snort in linux-Linux Enterprise Application-Linux server application information. For details, refer to the following section. 1. install apache

Tar zxvf apache-(Version) ------- decompress apache

Enter the extract directory

. /Configure -- prefix =/usr/local/apache -- enable-so -- enable-rewrite

Make

Make install

/Usr/local/apache/bin/apachectl start APACHE

Http://XXX.XXX.XXX.XXX (Server IP address) test APACHE

2. Install mysql

Groupadd mysql

Useradd-g mysql

Tar zxvf mysql-(Version) --------- decompress mysql

Enter the extract directory

. /Configure -- prefix =/usr/local/mysql -- with-charset = gb2312/gbk

Make

Make install

Enter the supportsfiles directory

Cp my_medium.cnf/etc/my. cnf

/Usr/local/mysql/bin/mysql_install_db -- user = mysql

Chown-R root/usr/local/mysql

Chown-R mysql/usr/local/mysql/var

Chgrp-R mysql/usr/local/mysql

/Usr/local/mysql/share/mysql/bin/mysql. server start MYSQL

/Usr/local/mysql/bin/mysqladmin-u root password XXXX

/Usr/local/mysql/bin/mysql-u root-p

Password:

Mysql>

3. install PHP

Tar zxvf php-(Version)

Enter the extract directory

. /Configure -- prefix =/usr/local/php -- with-apxs2 =/usr/local/apache/bin/apxs \

-- With-mysql =/usr/local/mysql \

-- With-config_file_path =/usr/local/php \

Make

Make install

Cp php. ini_dist/usr/local/lib/php. ini

Vi/usr/local/lib/php. ini

Change the 365 rows off to on

Vi/usr/local/apache/conf/httpd. conf

Add index. php after DireltoryIndex

AddType applicontion/X-httpd-php. php

Vi/usr/local/apache/htdocs/test/php


Phpinfo ()

?>

Restart APACHE

Http://XXX.XXX.XXX.XXX/test.php

4. Install pcre

Tar zxvf pcre-(Version)

Enter the extract directory

. /Configure

Make

Make install

5. Install snort

Tar zxvf snort-(Version)

Enter the extract directory

. /Configure -- with-mysql =/usr/local/mysql

Make

Make install

6. Install the snort rule repository

Tar zxvf snort rules-(Version)

Generate four directories: etc, doc, rules, and so. rules.

Mkdir/etc/snort

Mkdir/etc/snort/rules

Mkdir/var/log/snort

Cp-R rules/*/etc/snort/

Cp etc/*/etc/snort

Vi/etc/snort. conf

Change row 46 to var HOME_NET XXX. XXX. XXX.0/24.

Change row 111 to var Rules_PATH/etc/snort/rules.

Change row 764 to output database: log, mysql, user = root, password = XXXX (same as the password), dbname = snort

Host = localhost

Remove lines 863--874 #

7. Create an snort Database

. /Mysql-u root-p

Mysql> create database snort;

> Grant INSERT, SELECT on root. * to snort @ localhost

> Exit

./Mydql-u root-p </usr/local/src/snort-(Version)/schemas/create_mysql snort

Mysql> use snort

Mysql> show tables

8. Install adodb

Tar zxvf adodb-(Version)

Cp adodb/usr/local/apache/htdocs

9. Install jpgraph

Tar zxvf jpgraph-(Version)

Move the extracted directory to/usr/local/apache/htdocs and change it to jpgraph.

10. Install acid

Tar zxvf acid-(Version)

Move the extracted directory to/usr/local/apache/htdocs and change it to acid

Vi/acid/acid_conf.php

$ DBlib_Path = '/usr/local/apache/htdocs/adodb ';

$ Alert_dbname = "snort ";

$ Alert_host = "localhost ";

$ Alert_port = "";

$ Alert_user = "root ";

$ Alert_password = "xxxxx (same as above )";

$ Archive_dbname = "snort ";

$ Archive_host = "localhost ";

$ Archive_port = "";

$ Archive_user = "root ";

$ Archive_password = "xxxxx (same as above )";

$ CharlLib_path = "/usr/local/apache/htdocs/jpgraph/src ";

$ Charl_file_format = "png ";

11. http://xxx.xxx.xxx.xxx/acid Testing

Note: Install the compilation tool before installation.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.