bash Linux后台启动weblogic服务器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16604358/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Starting weblogic server in background in Linux
提问by chaitanya
I have installed Weblogic Server 10.3.6, and I use the below script to start my server:
我已经安装了 Weblogic Server 10.3.6,我使用下面的脚本来启动我的服务器:
user_projects/domains/my_domain/bin/startWebLogic.sh
I found below command to start the server in background:
我发现下面的命令在后台启动服务器:
nohup startWebLogic.sh &
But when I use this command I am getting this output:
但是当我使用这个命令时,我得到了这个输出:
-bash-3.2$ nohup ./startWebLogic.sh &
[2] 25379
-bash-3.2$ nohup: appending output to `nohup.out'
So here I have to press Enter to come out of this and go to new line. Now my requirement is that when I run the command then the server should start and I have to come out of this to a new line, like:
所以在这里我必须按 Enter 才能退出并转到新行。现在我的要求是,当我运行命令时,服务器应该启动,我必须从这个到一个新行,例如:
-bash-3.2$ nohup ./startWebLogic.sh &
[2] 25379
-bash-3.2$ nohup: appending output to `nohup.out'
-bash-3.2$
Can someone please help me in this. I am using bash shell.
有人可以帮助我吗?我正在使用 bash shell。
回答by agathodaimon
nohup startWebLogic.sh < /dev/null &> /dev/null &
Try to avoid leaving file descriptors attached. So < /dev/null would be good to apply too.
尽量避免附加文件描述符。所以 < /dev/null 也适用。
回答by Adriano
This answer is just to add a point other answers.
这个答案只是补充一点其他答案。
That you reported is not an error. Just was not properly set up the new line in the terminal, you can continue working without making the second "enter".
您报告的不是错误。只是没有在终端中正确设置新行,您可以继续工作而无需进行第二次“输入”。