Skip to content

Commit c22d7d2

Browse files
Merge pull request #44 from geekidea/dev
💻 1.2.3.RELEASE CentOS快速安装项目运行环境,快速构建/运维部署/启动项目
2 parents e183902 + c745e18 commit c22d7d2

File tree

3 files changed

+69
-2
lines changed

3 files changed

+69
-2
lines changed

CHANGELOG.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,62 @@
11
# 更新日志 CHANGELOG
22

3+
##
4+
## [V1.2.3-RELEASE] 2019.09.09 :computer:
5+
### ⭐️ New Features
6+
# spring-boot-plusV1.2.3发布,CentOS快速安装环境/构建/部署/启动项目
7+
## 1. 下载安装脚本
8+
> 安装 `jdk`, `git`, `maven`, `redis`, `mysql`
9+
10+
```bash
11+
wget -O download-install-all.sh https://raw.githubusercontent.com/geekidea/spring-boot-plus/dev/docs/bin/install/download-install-all.sh
12+
```
13+
14+
## 2. 运行安装脚本
15+
```bash
16+
sh download-install-all.sh
17+
```
18+
19+
## 3. 修改MySQL密码
20+
```bash
21+
ALTER USER 'root'@'localhost' IDENTIFIED BY 'Springbootplus666!';
22+
exit
23+
mysql -uroot -pSpringbootplus666!
24+
```
25+
26+
## 4. 导入MySQL脚本
27+
```bash
28+
create database if not exists spring_boot_plus character set utf8mb4;
29+
use spring_boot_plus;
30+
source /root/mysql_spring_boot_plus.sql;
31+
show tables;
32+
exit
33+
```
34+
35+
## 5. 下载部署脚本 `deploy.sh`
36+
```bash
37+
wget -O deploy.sh https://raw.githubusercontent.com/geekidea/spring-boot-plus/dev/deploy/deploy.sh
38+
```
39+
40+
## 6. 执行脚本
41+
```bash
42+
sh deploy.sh
43+
```
44+
45+
## 7.访问项目
46+
> SpringBootAdmin管理页面
47+
48+
[http://localhost:8888](http://localhost:8888)
49+
50+
> spring-boot-plus Swagger文档页面
51+
52+
[http://localhost:8888/docs](http://localhost:8888/docs)
53+
54+
## 8. 查看项目运行日志
55+
```bash
56+
tail -f -n 1000 /root/spring-boot-plus-server/logs/spring-boot-plus.log
57+
```
58+
59+
360
## [V1.2.2-RELEASE] 2019.08.26 🏇
461
### ⭐️ New Features
562
- 拦截器启用禁用配置

deploy/deploy.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
# date: 2019-9-6
2424
#======================================================================
2525

26+
NOW=$(date --date='0 days ago' "+%Y-%m-%d-%H-%M-%S")
27+
echo "${NOW}"
28+
2629
# 1. 下载或更新spring-boot-plus版本库
2730
# 先判断当前目录下是否有spring-boot-plus目录
2831
# 如果有,则执行git pull
@@ -45,6 +48,13 @@ if [ -d "spring-boot-plus-server" ]; then
4548
fi
4649

4750
# 4. 复制spring-boot-plus-server-assembly.tar.gz到项目同级目录下
51+
# 备份之前的server
52+
53+
if [ ! -d "spring-boot-plus-server-back" ]; then
54+
mkdir spring-boot-plus-server-back
55+
fi
56+
mv spring-boot-plus-server spring-boot-plus-server-back/spring-boot-plus-server-back-"${NOW}"
57+
4858
cp spring-boot-plus/target/spring-boot-plus-server-assembly.tar.gz spring-boot-plus-server-assembly.tar.gz
4959

5060
# 5. 运行spring-boot-plus

src/bin/startup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ LOG_BACK_DIR="${LOG_DIR}/back/"
5757
LOG_STARTUP_PATH="${LOG_DIR}/${APPLICATION}_startup.log"
5858

5959
# 当前时间
60-
NOW=`date --date='0 days ago' "+%Y-%m-%d-%H-%M-%S"`
61-
NOW_PRETTY=`date --date='0 days ago' "+%Y-%m-%d %H:%M:%S"`
60+
NOW=$(date --date='0 days ago' "+%Y-%m-%d-%H-%M-%S")
61+
NOW_PRETTY=$(date --date='0 days ago' "+%Y-%m-%d %H:%M:%S")
6262

6363
# 启动日志
6464
STARTUP_LOG="================================================ ${NOW_PRETTY} ================================================\n"

0 commit comments

Comments
 (0)