views:

314

answers:

2

Hello Everyone,

I have Jboss 5 installed/configured. I would like the ability to have Jboss auto start when my VM boots up. I see in my Jboss bin directory I have a startup script jboss_init_redhat.sh

I am assuming I have to get that script into my /etc/rc.d/init.d/jboss file

Then I am stuck, what is my next step?

Thank you for helping a beginner

+3  A: 

According to How do I Start JBoss on boot with Linux? on JBoss Community Wiki, your task is to:

  • create a user for JBoss (recommended) so that JBoss can be restricted to accessing only the files and system resources that it has permission to access via the "jboss" user.
  • create a script called /etc/rc.d/init.d/jboss
  • create a link called /etc/rc3.d/S84jboss
    • optionally /etc/rc5.d/S84jboss and /etc/rc4.d/S84jboss
  • create a link called /etc/rc6.d/K15jboss
    • create the K15 link in /etc/rc1.d, /etc/rc2.d, /etc/rc0.d

For the 2nd step, you can indeed use the jboss_init_redhat.sh file that ships with JBoss. For more information, check the link given above, it details each step.

Pascal Thivent
Thank you. When they say "create a link called /etc/rc3.d/S84jboss" does that mean I have to first create a file S84jboss THEN create the link?
Jared
No, `/etc/rc3.d/S84jboss` is the name of the link. Actually, `cd` into /etc/rc3.d and type `ln -s ../init.d/jboss S84jboss`
Pascal Thivent
Works. Thank you Pascal!!
Jared
A: 

The stock init script is very primitive; here's my take at a better one: https://jira.jboss.org/jira/browse/JBPAPP-3194

neu242