apache2+php+mysql+mod_secu+mod_evasive+mod_gzip+snmp+rrdtool+cacti 不指定

freebird , 2006/02/22 15:05 , Linux , 评论(0) , 阅读(3526) , Via 本站原创 | |
下载:
apache2
http://www.apache.org/dist...
mysql4:
http://mysql.oss.eznetsols...
php4:
http://cn.php.net/distribu...

mod_security
http://www.modsecurity.org...



mod_evasive



http://www.nuclearelephant...



mod_gzip



http://w.yi.org/ftp/incomi...




rrdtool



http://people.ee.ethz.ch/~...



cacti



http://www.cacti.net/downl...







step 1:[基本环境:apache+mysql+php]安装








1、mysql 安装: [注意:cacti-0.8.6.g版本不支持MYSQL5]
# tar zxvf mysql-4.1.15.tar.gz
# cd mysql-4.1.15
# groupadd mysql          



# useradd -g mysql mysql  
# ./configure --prefix=/usr/local/mysql



# make
# make install
# cp support-files/my-medium.cnf /etc/my.cnf
# cd /usr/local/mysql
# bin/mysql_install_db --user=mysql
# chown -R root .
# chown -R mysql var
# chgrp -R mysql .
# bin/mysqld_safe --user=mysql &

2、apache 2 安装:

# tar jxvf httpd-2.0.55.tar.bz2
# cd httpd-2.055
# vi config.sh 写入内容如下:



代码:




#!/bin/bash



HTTPD_ROOT="/usr/local/apache2"







./configure --prefix=$HTTPD_ROOT  



--enable-so  



--enable-rewrite  



--enable-info  



--enable-cgid  



--enable-mime-magic  



--enable-vhost-alias  



--enable-deflate  



--enable-expires  



--with-mpm=prefork





# sh config.sh
上面过程等同于直接
./configure --prefix=/usr/local/apache2  



--enable-so  



--enable-rewrite  



--enable-info  



--enable-cgid  



--enable-mime-magic  



--enable-vhost-alias  



--enable-deflate  



--enable-expires
写一个config.sh方便今后查看和升级再编译。
# make
# make install

3、安装php4
# tar jxvf php-4.4.1.tar.bz2
# cd php-4.4.1
# vi config.sh 写入内容:



代码:




#!/bin/bash



PHP_ROOT=/usr/local/php/



./configure --prefix=$PHP_ROOT  



           --with-apxs2=/usr/local/apache2/bin/apxs  



           --with-mysql=/usr/local/mysql  



           --enable-mbstring  



           --with-curl  



           --enable-debug  



           --enable-inline-optimization -q  



           --with-jpeg-dir=/usr/local/  



           --with-png-dir  



           --enable-thread-safety  



           --enable-ctype  



           --with-bz2  



           --with-zlib  



           --with-gd  



           --with-kerberos  



           --with-gettext  



           --enable-force-cgi-redirect  



           --with-iconv  



           --enable-gd-native-ttf  



           --enable-sockets  



           --with-snmp  



           --enable-ucd-snmp-hack




#sh config.sh
# make
# make install
#cp php.ini-dist /usr/local/php/lib/php.ini




4、安装modsecurity(mod_security 可以加强apache的安全性特别是在防sql 注入上。)
# tar zxvf modsecurity-apache-1.9.tar.gz
# cd modsecurity-apache-1.9/apache2/
# /apache2/bin/apxs -cia mod_security.c





5、安装mod_evasive 防DDOS攻击
# tar zxvf  mod_evasive_1.10.1.tar.gz
# cd  mod_evasive_1.10.1
#/apache/bin/apxs -i -a -c mod_evasive20.c
# /usr/local/apache/bin/apxs -i -a -c mod_evasive20.c
内文分页: [1] [2] [3] [4]
Tags:
发表评论

昵称

网址

电邮

打开HTML 打开UBB 打开表情 隐藏 记住我 [登入] [注册]