/ 中存储网

Apache服务器编译安装模块的脚本

2014-04-13 10:31:01 来源:kejihao
把以下代码一个sh文件中,运行它,就自动安装apache的所有模块了(注意路径名,包名)

#!/bin/sh

APACHE_SRC_DIR=”/home/httpd-2.2.3″

echo apache2-install

cd /home;

tar vxfz httpd-2.2.3.tar.gz

cd $APACHE_SRC_DIR/srclib/apr

./configure –prefix=/usr/local/apr12/

make clean

make

make install

cd $APACHE_SRC_DIR/srclib/apr-util

./configure –prefix=/usr/local/apr12-util/ –with-apr=/usr/local/apr12/

make clean

make

make install

cd $APACHE_SRC_DIR

./configure –prefix=/usr/local/apache22 –with-apr=/usr/local/apr12 –with-apr-util=/usr/local/apr12-util –with-mpm=worker –enable-so –enable-mods-shared=all –enable-proxy=shared –enable-proxy-balancer=shared –enable-proxy-http=shared –enable-proxy-ajp –enable-deflate –enable-cache –enable-disk-cache –enable-mem-cache

make clean

make

make install