• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Turning jboss or glassfish into linux daemon/service

 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 27807
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Been there. Done that. Went back for more. But this time, I took this tiny ad with me:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic