Lianghb

Created BoxFishVote项目打包部署操作流程 (markdown)

#BoxFishVote项目的打包部署
---
## 打包
+ 进入项目所在的根目录
cd [your project base path]
+ 执行打包命令
mvn clean package
+ 打包成功后,会在项目根目录下的target目录里生成jar包
xxxxx-x.x.jar
***
## 部署
- 上传jar包到服务器
>
- 进入target目录
cd target
- 用scp命令把jar包上传到服务器,scp 文件名 用户名@服务器ip:上传路径
**\[scp BoxFishVote-1.0.jar root@114.55.0.135:/opt\]**
- 输入服务器登陆密码,等到上传完毕
- 建立软连接
>
- 用ssh登陆服务器
**\[ssh root@114.55.0.135\]**
>
- ln -s /路径/xxxx-x.x.jar /etc/init.d/自定义名字
**\[ln -s /opt/BoxFishVote-1.0.jar /etc/init.d/boxfish-vote\]**
---
##运行项目
- 启动
>
- service
**boxfish-vote**
start
- 停止
>
- service
**boxfish-vote**
stop
- 重启
>
- service
**boxfish-vote**
restart
... ...