Showing
1 changed file
with
58 additions
and
0 deletions
BoxFishVote项目打包部署操作流程.md
0 → 100644
1 | +#BoxFishVote项目的打包部署 | ||
2 | + | ||
3 | +--- | ||
4 | +## 打包 | ||
5 | + | ||
6 | ++ 进入项目所在的根目录 | ||
7 | + cd [your project base path] | ||
8 | ++ 执行打包命令 | ||
9 | + mvn clean package | ||
10 | ++ 打包成功后,会在项目根目录下的target目录里生成jar包 | ||
11 | + xxxxx-x.x.jar | ||
12 | + | ||
13 | +*** | ||
14 | +## 部署 | ||
15 | + | ||
16 | +- 上传jar包到服务器 | ||
17 | + | ||
18 | +> | ||
19 | +- 进入target目录 | ||
20 | + cd target | ||
21 | +- 用scp命令把jar包上传到服务器,scp 文件名 用户名@服务器ip:上传路径 | ||
22 | +**\[scp BoxFishVote-1.0.jar root@114.55.0.135:/opt\]** | ||
23 | +- 输入服务器登陆密码,等到上传完毕 | ||
24 | + | ||
25 | +- 建立软连接 | ||
26 | + | ||
27 | +> | ||
28 | +- 用ssh登陆服务器 | ||
29 | +**\[ssh root@114.55.0.135\]** | ||
30 | + | ||
31 | +> | ||
32 | +- ln -s /路径/xxxx-x.x.jar /etc/init.d/自定义名字 | ||
33 | +**\[ln -s /opt/BoxFishVote-1.0.jar /etc/init.d/boxfish-vote\]** | ||
34 | + | ||
35 | +--- | ||
36 | + | ||
37 | +##运行项目 | ||
38 | + | ||
39 | +- 启动 | ||
40 | + | ||
41 | +> | ||
42 | +- service | ||
43 | +**boxfish-vote** | ||
44 | +start | ||
45 | + | ||
46 | +- 停止 | ||
47 | + | ||
48 | +> | ||
49 | +- service | ||
50 | +**boxfish-vote** | ||
51 | +stop | ||
52 | + | ||
53 | +- 重启 | ||
54 | + | ||
55 | +> | ||
56 | +- service | ||
57 | +**boxfish-vote** | ||
58 | +restart |
-
Please register or login to post a comment