Linux操作系统下搭建snort工具

1、Linux操作系统下安装apache

tar zxvf apache-(版本号)------- 解压apache

进入解压目录。/configure --prefix=/usr/local/apache --enable-so --enable-rewrite

make

make install

/usr/local/apache/bin/apachectl start 启动APACHE

http://XXX.XXX.XXX.XXX(服务器IP地址) 测试APACHE

2、安装mysql

groupadd mysql

useradd -g mysql mysql

tar zxvf mysql-(版本号) --------- 解压mysql

进入解压目录

。/configure --prefix=/usr/local/mysql --with-charset=gb2312/gbk

make

make install

进入supportsfiles目录

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、安装PHP

tar zxvf php-(版本号)

进入解压目录

。/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

更改365行 off为on

vi /usr/local/apache/conf/httpd.conf

DireltoryIndex 后加index.php

AddType applicontion/X-httpd-php .php

vi /usr/local/apache/htdocs/test/php

phpinfo()

?>

重新启动APACHE

http://XXX.XXX.XXX.XXX/test.php

相关推荐