Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Turning jboss or glassfish into linux daemon/service

 
K. Tsang
Bartender
Posts: 3348
12
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy all, I have CentOS linux installed and glassfish app server installed to /opt/glassfish path. In CentOS the services or daemons can be started using command "service <name> start".

Now how to make glassfish into a linux service so that I can start/stop it using "service glassfish start/stop" command?

I read the asadmin create-service help thing and apparently I would need Solaris 10 commands or Solaris stuff. Is there another method to achieve this like without having Solaris commands?

Currently I have a shell script to start/stop glassfish but if I want to start glassfish when system boots I can't do that yet. Any suggestions are helpful.

Thanks
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18008
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are a few differences between Linux and Solaris, such as where to find logfiles, but in general you could take the Linux initscripts and port them to Solaris fairly easily. I think that there's actually an initscript included in the bin directory of JBoss.

Initscripts still work under the latest versions of Solaris, although for maximum effectiveness, it's good to plug into the "srv" subsystem, which is intended to replace the old init system. The main difference is that srv config files specify prerequisite services, so that, for example, JBoss won't attempt to start if the network didn't init properly.
 
K. Tsang
Bartender
Posts: 3348
12
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tim for your comments. I looks more complicated than it sounds. I shall keep it as it using my shell script to start/end the server for now
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic