...
1、由于跨库服务不能直接通过systemctl方式设置开机自启,需要添加启动脚本unionserver.sh
cd <跨库联合查询部署目录> cd SmartbiUnionServer/
vi unionserver.sh
代码块 | ||
---|---|---|
| ||
#!/bin/bash PRG="$0" PRGDIR=`dirname "$PRG"` cd $PRGDIR Current_Dir=$(cd `dirname $0`; pwd) case "$1" in 'start') nohup sh ${Current_Dir}/run.sh > /dev/null 2>&1 & ;; 'stop') kill -9 $(ps -ef | grep "SmartbiUnionServer" | grep "log.properties" | awk '{print $2}') ;; 'restart') kill -9 $(ps -ef | grep "SmartbiUnionServer" | grep "log.properties" | awk '{print $2}') nohup sh ${Current_Dir}/run.sh > /dev/null 2>&1 & ;; *) echo "Usage: |
并添加执行权限
chmod +x <跨库联合查询部署目录>x SmartbiUnionServer/unionserver.sh
2、添加开机自启文件
...