Monday, June 16, 2014

Make Tomcat Startup by default in Fedora 20

So today I got tired of starting up tomcat manually, and decided to make it start by default at boot. After doing a bit of digging on the intertubes I found that if you create a script in /etc/rc.d called rc.local that is executable fedora will run it on boot. So I created the file and added the following lines:


#!/bin/sh
cd /home/sean/Public/apache-tomcat-8.0.8/bin
su sean ./catalina.sh start

Since root will be the user at startup I wrapped the catalina.sh command in a switch user command to my user. Thus it is started in a sandbox for my user.

No comments:

Post a Comment