1 Star 0 Fork 1.3K

ShauKang/qiwen-file

forked from 奇文社区/qiwen-file 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
install.sh 1.55 KB
一键复制 编辑 原始数据 按行查看 历史
echo.young 提交于 2021-05-26 17:39 . [deploy] 适配centos 上部署行为
#/*************************************************
#* install.sh write by echo at Changsha. Hunan, 2021年 05月 24日 星期一 11:33:25 CST
#*************************************************/
#!/bin/sh
function echo_dbg_p(){
echo "echo_dbg, $@"
}
function usage(){
echo -e "usages: $0 [H|h|help] [-h] [-s]
[H|h|help]: check the usages\n
[]"
}
#main
#maven install check
cmd_package=yum
if ! mvn -v >/dev/null;then
sudo $cmd_package install -y maven
fi
#java install check
if ! java -version &>/dev/null;then
sudo $cmd_package install -y java
fi
if ! mysql -V>/dev/null;then
sudo wget https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm;
sudo rpm -ivh mysql57-community-release-el7-9.noarch.rpm
sudo yum install -y mysql-server
fi
#build path check
#build_root_path=./
settingDir=file-common/src/main/resources/conf/settings.xml
mvn clean install -s $settingDir
sed -i "s#D:/temp_db#/tmp/#g" release/conf/config/application-dev.properties
echo_dbg_p "warning, PLS create mysql with name file, and set the password follow the file qiwen-file/file-web/src/main/resources/config/application-prod.properties"
case $1 in
H|h|help)
usage
;;
*)
# getopts :s:h表示这个命令接受2个带参数选项,分别是-h和-s
while getopts :s:h opt
do
case $opt in
s)
echo "-s=$OPTARG"
;;
:)
echo "-$OPTARG needs an argument"
;;
h)
echo "-h is set"
;;
*)
echo "-$opt not recognized"
;;
esac
done
;;
esac
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/shaukangt/qiwen-file.git
git@gitee.com:shaukangt/qiwen-file.git
shaukangt
qiwen-file
qiwen-file
master

搜索帮助