9

I have installed Weblogic Server 10.3.6, and I use the below script to start my server:

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:

-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.

chaitanya
  • 701
  • 4
  • 14
  • 26
  • 2
    google "weblogic as daemon" you will get help. – Kent May 17 '13 at 08:18
  • 8
    Try `nohup ./startWeblogic.sh >/dev/null 2>&1 &` or `nohup .startWeblogic.sh > nohup.out 2>&1 &` if you want stdout/stderr to be redirected to nohup.out – devnull May 17 '13 at 08:39
  • Thans a lot devnull, it worked. – chaitanya May 17 '13 at 10:52
  • I would avoid using redirecting sdtout/sdterr to a file, this will create a file with uncontrolled growth. It maybe OK with dev/test envs but not OK with production. – nomadus Jan 04 '21 at 02:41

2 Answers2

9
nohup startWebLogic.sh < /dev/null &> /dev/null &

Try to avoid leaving file descriptors attached. So < /dev/null would be good to apply too.

Kamil Budziewski
  • 22,699
  • 14
  • 85
  • 105
agathodaimon
  • 154
  • 1
  • 5
0

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".

Adriano
  • 259
  • 3
  • 5
  • This is not an answer, it should be a comment on the other answer. When you have a little more reputation you will be able to add comments. – AdrianHHH May 15 '14 at 20:59