Automatically start Tomcat on startup in Ubuntu

Apache Tomcat is not configured with autostart by default in Ubuntu. So, custom init script is required to configure Tomcat for autostart on startup.

Create the init script in /etc/init.d/tomcat8 with the contents as per below.

Init script contents:

Note: Please change {tomcat_root} with your Tomcat installation folder path.

Change its permissions and add the correct symlinks automatically:

And from now on it will be automatically started and shut down upon entering the appropriate run levels.

It could be also controlled with justservice tomcat8 <stop|start|restart> like Apache control commands.

Using above process any server script can be created and configured to start on startup.

Comments

comments

2 thoughts on “Automatically start Tomcat on startup in Ubuntu

  1. of course like your web-site but you need to check the spelling on several of your posts. A number of them are rife with spelling issues and I find it very bothersome to tell the truth nevertheless I’ll definitely come back again.

  2. A formidable share, I simply given this onto a colleague who was doing slightly analysis on this. And he in truth purchased me breakfast because I discovered it for him.. smile. So let me reword that: Thnx for the treat! But yeah Thnkx for spending the time to discuss this, I really feel strongly about it and love reading more on this topic. If attainable, as you become expertise, would you mind updating your blog with extra details? It’s highly helpful for me. Huge thumb up for this blog post!

Comments are closed.