mac 项目部署

news/2024/7/6 20:03:24
#!/bin/bash
cd /workspace/GW/mybitauto-operation
#替换环镜变量配置信息 src/main/resources/application.properties
sed -i '' 's/active=.*/active: prod/g' src/main/resources/application.properties


# git pull


mvn clean package


/usr/bin/expect <<-EOF
#参数设置
set timeout 1000
#sftp连接
spawn scp  mybitauto-admin/target/mybitauto-admin.jar root@11.12.11.11:/data/yy.mybitauto.com/yy.mybitauto.com.jar


#第一次sftp时需输入yes
expect {
    "(yes/no)?" {send "yes\r"; exp_continue}
    "password:" {
        send "Mybitauto@2018\r"
        }
}
expect "*#"
spawn ssh root@47.11.11.11
expect "*password:"
send "Mybitauto@2018\r"
expect "*#"
send "cd /data/yy.mybitauto.com/\r"
expect "*#"
send "rm -rf log.log\r"
send "ps aux | grep yy.mybitauto.com  | cut -c 9-15 | xargs kill -9\r"
send "nohup java -server -jar yy.mybitauto.com.jar --spring.profiles.active=prod>nohup.log 2>&1 &\r"
send "exit\r"
expect eof


EOF

http://www.niftyadmin.cn/n/1930034.html

相关文章

mac mysql编码问题吗_Mac环境mysql5.7.21 utf8编码问题及解决方案

1. 目标&#xff1a;将 mysql 的 character_set_server 的值由 latin1 更改为 utf8暂时性&#xff1a;SET character_set_serverutf8 即可&#xff0c;一次性。永久性&#xff1a;需要更改配置文件&#xff0c;见第2步骤。2. mysql 5.7.21 的 support-files里没有配置文件。新建…

23种设计模式 访问者设计模式

https://github.com/yzmaodeng/java-keypointknowledge/commit/4745c8012aebd0022ea779fcef25ce2bc10be1b6访问者模式把数据结构和作用于结构上的操作解耦合&#xff0c;使得操作集合可相对自由地演化。访问者模式适用于数据结构相对稳定算法又易变化的系统。因为访问者模式使得…

小强升职记思维导图_《小强升职记》学习笔记(思维导图)

原图是在XMind中制作的&#xff0c;比较大&#xff0c;所以分解成几张图片来进行梳理。主要框架主要框架分为四个主要部分&#xff1a;认知、方法和工具、问题、实践&#xff0c;进行要点整理。认知1 认知1.1 时间黑洞1.1.1 产生的原因1.1.2 时间的特性1.2 人生目标1.2.1 人生规…

linux上面是否有安装redis,redis启动

edis 支持 32 位和 64 位。这个需要根据你系统平台的实际情况选择&#xff0c;这里我们下载 Redis-x64-xxx.zip压缩包到 C 盘&#xff0c;解压后&#xff0c;将文件夹重新命名为 redis。打开一个 cmd 窗口 使用cd命令切换目录到 C:\redis 运行 redis-server.exe redis.windows.…

MySQL 创建注册页面_需要flask+mysql实现用户注册和登陆效果页面如何实现

首先&#xff0c;请不要用任何ORM(当然SQLAlchemy&#xff0c;Flask-SQLAlchemy也不要用)初学flask&#xff0c;于是参照http://dormousehole.readthedocs.org/en/latest/tutorial/introduction.ht...实际用到的关键代码在这里&#xff1a;https://github.com/mitsuhiko/flask/…

Windows远程连接linux中mysql数据库

我没有mysql并且没有把mysql配置到环境变量中&#xff0c;所以现在我要下载mysql 一.下载mysql Mysql官网下载地址&#xff1a;https://downloads.mysql.com/archives/installer 二.安装mysql 1. 选择设置类型 双击运行mysql-installer-community-8.0.26.msi&#xff0c;这…

安装openssl和openssl-devel error: zlib.h:no such file or directory

今天在编译openssl时&#xff0c;出现了 error&#xff1a; zlib.h:no such file or directory 去看了下出错的文件&#xff0c;里面这么一句#includec_zlib.c:25:19: fatal error: zlib.h: No such file or directory # include <zlib.h>搜索发现下面的文章得到解决http…

安装openssl和openssl-devel 施工

以下借鉴了他人的安装方法&#xff0c;并根据我自己的安装进行了修改1.下载wget https://www.openssl.org/source/openssl-1.0.2h.tar.gz2.解压tar zxf openssl-1.0.2h.tar.gz3.安装cd openssl-1.0.2h./config shared zlibbecause of configuration changes, you MUST do the f…