5 Replies Latest reply on Jun 25, 2004 11:35 PM by mikefinn

    run jboss in linux background

    zhebincong

      i install jboss3.2 in my redhat8,i go to the bin directory of jboss,the type "run -c all" command,the jboss start,but after it finish the starting,i find that the jboss run in "preemptive" mode,i can't do any other thing,if i press "ctr+c" the jboss stop.
      who can tell me how i can start the jboss in background,then i can do the other job such as copy file........... in the frontground?

      the next question is how can i config the linux launch the jboss during the booting procedure automatically?

      thank you!

        • 1. Re: run jboss in linux background
          ghoyle

          Try running the redhat startup script that comes with the distribution its called
          jboss_init_redhat.sh
          or you could run run.sh - c all &
          Not sure why you could not copy a file though, surely you just needed to open another terminal window.

          It is possible to start jboss as a daemon process that starts at linux boot up.
          Essentially you need to creat a jboss script which you will store in your /etc/init.d directory and making links to this script in /etc/init.d/rc3.d and /etc/init.d/rc5.d for starting and stopping jboss.
          Lool at the other examples in your init.d directory to see how to creat your jboss script.

          G

          • 2. Re: run jboss in linux background
            carpy1970

            If you look at the FAQ, there's a section entitled "Start JBoss on boot with Linux?" that, strangley enough, tells you how to start jboss on boot with Linux.....

            • 3. Re: run jboss in linux background
              carpy1970

              PS, if you follow this approach you can also start/stop jboss any time using the service command.

              • 4. Re: run jboss in linux background
                jledhead

                I am using a debian machine and can't quite get this working.

                I am trying to setup a nightly build to run a script that is going to stop jboss, run the build, start jboss

                If i try and use the init scripts like suggested above and in the FAQ it asks for a password, that won't really work for a nightly build.

                I am also trying to use ./run.sh -c & and it goes like normal except that it outputs everything to the console. If I throw that in the script it is going to appear as if the script is running.....and running......

                anyone have any other ideas.

                • 5. Re: run jboss in linux background
                  mikefinn


                  ./run.sh -c all & will still direct output to the console. You could redirect like:
                  $ ./run.sh -c all > /dev/null 2>&1
                  this will send stdout and stderr to the bitbucket

                  or you can do:
                  $ nohup run.sh -c all &
                  this will prevent the HUP signal from terminating your run.sh process, and the stdout output will go to a file called nohup.out in curr dir.