Apache+tomcat脚本快速安装(最新版本)

#!/bin/sh
#############2013-01-08###########
yum install openssl* -y
DIR=/usr/local/src/
###########wget#################
cd $DIR
wget http://apache.dataguru.cn//httpd/httpd-2.4.3.tar.gz
wget http://mirror.bit.edu.cn/apache/apr/apr-util-1.4.1.tar.gz
wget http://mirror.bit.edu.cn/apache/apr/apr-1.4.6.tar.gz
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.31.tar.gz
cd $DIR
##########install apr############
tar -zxvf apr-1.4.6.tar.gz;
cd $DIR/apr-1.4.6;
sed -i '/$RM "$cfgfile"/s/^/#/' /usr/local/src/apr-1.4.6/configure ;
./configure --prefix=/usr/local/apr/ ;
make && make install;
##########install pcre#############
cd $DIR
tar zxvf pcre-8.31.tar.gz;
cd $DIR/pcre-8.31;
./configure --prefix=/usr/local/pcre ;
make && make install;
###########install Apache###########
cd $DIR;
tar zxf httpd-2.4.3.tar.gz ;
rm -rf $DIR/apr-1.4.6;
rm -rf $DIR/apr-util-1.4.1 ;
tar -zxvf $DIR/apr-1.4.6.tar.gz ;
tar -zxvf $DIR/apr-util-1.4.1.tar.gz ;
mv $DIR/apr-1.4.6 $DIR/httpd-2.4.3/srclib/apr ;
mv $DIR/apr-util-1.4.1 $DIR/httpd-2.4.3/srclib/apr-util;
cd /usr/local/src/httpd-2.4.3 ;
./configure --prefix=/usr/local/apache --enable-so --enable-deflate=shared --enable-ssl=shared --enable-expires=shared --enable-deflate=shared --enable-ssl=shared --enable-expires=shared --enable-headers=shared --enable-rewrite=shared --enable-static-support --with-included-apr --with-mpm=prefork --enable-cache --enable-file-cache --with-pcre=/usr/local/pcre --with-lnduded-apr --with-included-apr --enable-rewrite=shared;
make && make install;
###############install Tomcat#############
cd $DIR
wget http://www.apache.org/dist/tomcat/tomcat-7/v7.0.34/src/apache-tomcat-7.0.34-src.tar.gz;
wget http://www.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.37-src.tar.gz;
tar -zxvf tomcat-connectors-1.2.37-src.tar.gz
cd $DIR/tomcat-connectors-1.2.37-src/native;
./configure --with-apxs=/usr/local/apache/bin/apxs;
make ;
cp ./apache-2.0/mod_jk.so /usr/local/apache/modules/ ;
cd $DIR ;
tar -zxvf apache-tomcat-7.0.34-src.tar.gz ;
mv apache-tomcat-7.0.34 /usr/local/tomcat/
#####################cp##################################
cp /root/workers.properties /usr/local/apache/conf/extra/
cp /root/mod_jk.conf /usr/local/apache/conf/extra/
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值