Merge "Change PTL informatin in INFO"
[bottlenecks.git] / testsuites / rubbos / rubbos_scripts / 1-1-1 / scripts / HTTPD_install.sh
1 #!/bin/bash
2 ##############################################################################
3 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
4 #
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
10
11 cd /bottlenecks/rubbos/rubbos_scripts/1-1-1
12 source set_bottlenecks_rubbos_env.sh
13
14 echo "INSTALLING APACHE on $HOSTNAME"
15
16 echo "Adding new user apache begin"
17 useradd apache
18 groupadd apache
19 usermod -G apache apache
20 echo "Adding new user apache end"
21
22 mkdir -p $BOTTLENECKS_TOP
23 chmod 755 $BOTTLENECKS_TOP
24 mkdir -p $RUBBOS_TOP
25 chmod 755 $RUBBOS_TOP
26 mkdir -p $RUBBOS_APP
27 chmod 755 $RUBBOS_APP
28
29 # apache
30 tar zxf $SOFTWARE_HOME/$HTTPD_TARBALL --directory=$RUBBOS_APP
31 cd $HTTPD_INSTALL_FILES 
32 ./configure --prefix=$HTTPD_HOME --enable-module=so --enable-so --with-mpm=worker >/dev/null
33 make >/dev/null
34 make install >/dev/null
35
36 # mod jk
37 tar zxf $SOFTWARE_HOME/$MOD_JK_TARBALL --directory=$RUBBOS_APP
38 tar zxf $SOFTWARE_HOME/$JAVA_TARBALL --directory=$RUBBOS_APP
39 cd $MOD_JK_INSTALL_CONFIGURE
40 ./configure --with-apxs=$HTTPD_HOME/bin/apxs --enable-jni --with-java-home=$JAVA_HOME >/dev/null
41 make >/dev/null
42 make install >/dev/null
43
44 echo "APACHE IS INSTALLED on $HOSTNAME"