常见service启动脚本如下:
#! /bin/bash
nohup java -DCONFIG_HOME=/home/weblogic/service/config -Denv=DEV -Dapp.id=ddowe -Ddev_meta=http://10.10.10.111:8065 -Dapollo.cluster=default -Ddubbo.registry.file=/home/weblogic/service/dubbo-registry-junit.cache -jar service-0.0.1-SNAPSHOT.jar >/home/weblogic/logs/service.log 2>&1 &
解释:
#! /bin/bash
脚本开始格式.
nohup
不挂断运行命令,当账户退出或终端关闭时,程序仍然运行.
-DCONFIG_HOME=/home/weblogic/service/config
配置文件存放目录.