Terry.Li-彬

          虛其心,可解天下之問;專其心,可治天下之學;靜其心,可悟天下之理;恒其心,可成天下之業。

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            143 隨筆 :: 344 文章 :: 130 評論 :: 0 Trackbacks
          https://github.com/fly2wind/TSShellScript

          #!/bin/sh
          ########################################################################################
          #
          # Install Ejabberd Server
          #
          # Shawn Ma
          #
          ########################################################################################
          # Define
          TARGET=apache-tomcat-7.0.34.tar.gz
          SOURCE=http://mirror.bjtu.edu.cn/apache/tomcat/tomcat-7/v7.0.34/bin/$TARGET

          # Create a build directory
          mkdir -p /opt/install/tomcat && cd /opt/install/tomcat

          # Prepare for compilation source
          curl -o $TARGET $SOURCE
          mkdir -p tmp && tar -zxvf $TARGET -C tmp

          # Install build dependencies
          yum install -y gcc gcc-c++ make cmake autoconf automake
          yum install -y apr-devel openssl-devel

          # Create a User Group
          groupadd tomcat
          useradd -r -g tomcat tomcat

          # Compile and deploy
          mkdir -p /opt/server/web && mv tmp/* /opt/server/web/tomcat && cd /opt/server/web/tomcat/bin
          tar -zxvf tomcat-native.tar.gz && cd tomcat-native-1.1.24-src/jni/native/
          ./configure \
          --with-apr=/usr/bin/apr-1-config \
          --with-java-home=/opt/environment/java/1.7.0 \
          --with-ssl=yes \
          --prefix=/opt/server/web/tomcat
          make
          make install

          cd /opt/server/web/tomcat
          curl -o conf/server.xml https://raw.github.com/fly2wind/TSShellScript/master/tomcat/conf/server.xml
          curl -o conf/tomcat-users.xml https://raw.github.com/fly2wind/TSShellScript/master/tomcat/conf/tomcat-users.xml
          curl -o conf/wrapper.conf https://raw.github.com/fly2wind/TSShellScript/master/tomcat/wrapper/wrapper.conf
          curl -o lib/wrapper.jar https://raw.github.com/fly2wind/TSShellScript/master/tomcat/wrapper/wrapper.jar
          curl -o lib/wrapper.so https://raw.github.com/fly2wind/TSShellScript/master/tomcat/wrapper/libwrapper.so
          curl -o bin/tomcat https://raw.github.com/fly2wind/TSShellScript/master/tomcat/wrapper/tomcat

          # Postinstallation setup
          cd /opt/server/web/tomcat
          chown -R tomcat .
          chgrp -R tomcat .
          chown -R root .
          chown -R tomcat conf webapps work temp logs

          # Configuration
          curl -o /etc/init.d/tomcat https://raw.github.com/fly2wind/TSShellScript/master/tomcat/init/tomcat
          chmod a+x /etc/init.d/tomcat

          # Additional
          chkconfig --add tomcat
          chkconfig tomcat on

          posted on 2013-01-09 15:01 禮物 閱讀(1148) 評論(0)  編輯  收藏 所屬分類: Linux
          主站蜘蛛池模板: 孝义市| 南漳县| 和静县| 公主岭市| 宁津县| 内黄县| 屯门区| 宜春市| 溆浦县| 宜良县| 青龙| 宁明县| 宕昌县| 清河县| 香港 | 滨海县| 吴桥县| 扎赉特旗| 东港市| 房山区| 深泽县| 云林县| 黑水县| 通海县| 新邵县| 土默特右旗| 青铜峡市| 贞丰县| 图们市| 翼城县| 泸定县| 长沙县| 手游| 诏安县| 桃园县| 周宁县| 阳东县| 红原县| 林周县| 宜川县| 女性|