zoukankan      html  css  js  c++  java
  • 布署脚本

      1 #!/bin/sh
      2 #set var
      3 dir_src="/home/s/projects/site/souche-site"
      4 dir_tomcat_home="/home/s/projects/site/tomcat-30082"
      5
      6 dir_tomcat_bin="$dir_tomcat_home/bin"
      7 dir_tomcat_webapps="$dir_tomcat_home/webapps"
      8 file_war="$dir_src/target/s-site.war"
      9 file_catalina_out="$dir_tomcat_home/logs/catalina.out"
     10 #git update
     11 cd $dir_src
     12 echo "git checkout..."
     13 git add .
     14 git reset —hard         把没有提交的分支给删除了
     15 #git stash 
     16 #git reset --hard
     17 git fetch              以免有的分支拉不下来
     18 #git checkout feature/freyr
     19 #git checkout develop
     20 #git checkout hotfix/duotu
     21 git checkout deploy-test
     22 git pull
     23 #sh eclipse.sh
     24 sh install.sh            
     25 sh script/config_server.sh load -Denv=dev -Dtoken=S0KimGG63z             执行架构组的配置
     26 #kill tomcat
     27 cd $dir_tomcat_home
     28
     29 ps -ef | grep tomcat-30082 | awk '{ print $2 }' | xargs kill -9        把tomcat的进行杀了
     30
     31 #clear tomcat webapps
     32 cd $dir_tomcat_webapps
     33 rm -rf *  
     34 #cp war
     35 echo "copy war file..."
     36 cp $file_war $dir_tomcat_webapps        复制包
     37 mv s-site.war ROOT.war             改名
     38 #start tomcat
     39 echo "start tomcat..."
     40 cd $dir_tomcat_bin
     41 sh startup.sh            启动
     42 tail -f $file_catalina_out      打印日志

  • 相关阅读:
    tomcat---基本知识点解读;配置文件详解
    nginx常用配置参数介绍-upstream
    nginx配置文件-详解
    nginx简单介绍
    GCC编译已经引入math.h文件提示cos,sin等函数未定义
    进程与进程间通信(3)
    进程与进程间通信(1)
    进程与进程间通信(2)
    primer_c++_迭代器
    primer_C++_3.5 数组
  • 原文地址:https://www.cnblogs.com/chengchengla1990/p/8033931.html
Copyright © 2011-2022 走看看