Tag Archives: glassfish

Autostart Glassfish on startup in Ubuntu

To make the Glassfish Server auto start with startup, we need to setting up an init script, which helps us to manage all Glassfish Server startup events easily. And also make Glassfish start up automatically whenever Ubuntu is rebooting.

This script file is glassfish to be created at /etc/init.d/. For managing all Glassfish Server startup events, it ships with the asadmin tool. Use this tool in the startup script as follows,

  1. Create or edit glassfish file
  2. Paste the following lines in the file

Now, glassfish startup script is created. We need to add this file in startup to make Glassfish Server autostart during Ubuntu startup. Follow these steps,

  1. Make the startup script file executable
  2. Add this file to Ubuntu startup boot

That’s it. Now, restart Ubuntu and check if it really autostart the Glassfish Server.

You can also manage Glassfish Server startup events as follows,

  • Start the server
  • Stop the server
  • Restart the server