• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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: 28319
210
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
 
Bras cause cancer. And tiny ads:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic