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 禮物 閱讀(1138) 評論(0)  編輯  收藏 所屬分類: Linux
          主站蜘蛛池模板: 福贡县| 黄龙县| 金华市| 武定县| 德阳市| 宿州市| 波密县| 太仆寺旗| 诏安县| 宾阳县| 靖边县| 青海省| 宁武县| 常州市| 如皋市| 岳西县| 扎兰屯市| 会宁县| 哈密市| 普格县| 长寿区| 眉山市| 舞阳县| 大连市| 东乡| 郸城县| 长岭县| 天气| 毕节市| 黑龙江省| 博客| 淳安县| 根河市| 登封市| 屯门区| 万荣县| 石城县| 南充市| 沐川县| 黄骅市| 浑源县|