Skip to content

Commit 71cdea3

Browse files
Merge pull request #42 from geekidea/dev
💻 1.2.3.RELEASE CentOS快速安装项目运行环境,快速构建/运维部署/启动项目
2 parents 6cbaa7f + 88d01cf commit 71cdea3

File tree

3 files changed

+19
-24
lines changed

3 files changed

+19
-24
lines changed

deploy/deploy.sh

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

26-
# 版本库路径
27-
PROJECT_REPO="https://github.com/geekidea/spring-boot-plus.git"
28-
# 项目名称
29-
PROJECT_NAME="spring-boot-plus"
30-
# 当前时间
31-
NOW=$(date --date='0 days ago' "+%Y-%m-%d-%H-%M-%S")
32-
echo "${NOW}"
33-
3426
# 1. 下载或更新spring-boot-plus版本库
3527
# 先判断当前目录下是否有spring-boot-plus目录
3628
# 如果有,则执行git pull
3729
# 如果没有,则clone
38-
if [ ! -d "/spring-boot-plus" ]; then
39-
git clone ${PROJECT_REPO}
30+
if [ ! -d "spring-boot-plus" ]; then
31+
git clone https://github.com/geekidea/spring-boot-plus.git
4032
else
33+
cd spring-boot-plus
4134
git pull
4235
fi
4336

4437
# 2. maven打包
45-
cd $(PROJECT_NAME)
4638
mvn clean package -Ptest
4739

4840
# 3. 停服
49-
# cd到项目源代码同级目录
50-
cd ../
51-
# 停服
52-
sh ${PROJECT_NAME}-server/bin/shutdown.sh
41+
cd ..
42+
43+
if [ -d "spring-boot-plus-server" ]; then
44+
sh spring-boot-plus-server/bin/shutdown.sh
45+
fi
5346

54-
# 4. 移动spring-boot-plus-server-assembly.tar.gz到项目同级目录下
55-
# 备份上一次的server
56-
echo "${NOW}"
57-
mv ${PROJECT_NAME}-server ${PROJECT_NAME}-server-"${NOW}"
58-
# 移动最新打包的server到项目同级目录下
59-
mv ${PROJECT_NAME}/target/${PROJECT_NAME}-server-assembly.tar.gz ../../
47+
# 4. 复制spring-boot-plus-server-assembly.tar.gz到项目同级目录下
48+
cp spring-boot-plus/target/spring-boot-plus-server-assembly.tar.gz spring-boot-plus-server-assembly.tar.gz
6049

6150
# 5. 运行spring-boot-plus
62-
tar -zxvf ${PROJECT_NAME}-server-assembly.tar.gz
63-
cd ${PROJECT_NAME}-server/bin
51+
tar -zxvf spring-boot-plus-server-assembly.tar.gz
52+
cd spring-boot-plus-server/bin
6453
sh restart.sh
6554

6655
# 6. 访问项目

docs/bin/install/download-install-all.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,14 @@
2222
# date: 2019-8-29
2323
#======================================================================
2424

25-
25+
# 下载脚本
2626
wget -O install-all.sh https://raw.githubusercontent.com/geekidea/spring-boot-plus/master/docs/bin/install/install-all.sh
2727
wget -O install-jdk.sh https://raw.githubusercontent.com/geekidea/spring-boot-plus/master/docs/bin/install/install-jdk.sh
2828
wget -O install-git.sh https://raw.githubusercontent.com/geekidea/spring-boot-plus/master/docs/bin/install/install-git.sh
2929
wget -O install-maven.sh https://raw.githubusercontent.com/geekidea/spring-boot-plus/master/docs/bin/install/install-maven.sh
3030
wget -O install-redis.sh https://raw.githubusercontent.com/geekidea/spring-boot-plus/master/docs/bin/install/install-redis.sh
3131
wget -O install-mysql.sh https://raw.githubusercontent.com/geekidea/spring-boot-plus/master/docs/bin/install/install-mysql.sh
32+
wget -O mysql_spring_boot_plus.sql https://raw.githubusercontent.com/geekidea/spring-boot-plus/master/docs/db/mysql_spring_boot_plus.sql
3233

34+
# 执行安装所有
3335
sh install-all.sh

docs/bin/install/install-mysql.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,7 @@ mysql -uroot -p${PWD}
6363
# 使用新密码登陆
6464
# exit
6565
# mysql -uroot -pSpringbootplus666!
66+
67+
# 导入spring-boot-plus数据库脚本
68+
# use mysql;
69+
# source /root/mysql_spring_boot_plus.sql;

0 commit comments

Comments
 (0)