The other day I installed a Tomcat server in Red Hat 8 for a client. The client had to reboot the server and couldn’t find a way to start it. I found a way to start Tomcat at boot time in Red Hat 8.

As usual, I needed to go for a walk around New York City in Brooklyn before taking on this one.

First, we need to create a startup script file for Tomcat in:


You can name this file tomcat and enter the below:

export CATALINA_HOME="/usr/local/tomcat"
case "$1" in
            echo $"Starting Tomcat"
            sh $CATALINA_HOME/bin/
           echo $"Stopping Tomcat"
           sh $CATALINA_HOME/bin/
           sh $CATALINA_HOME/bin/
           sh $CATALINA_HOME/bin/
         echo $"Usage: $0 {start|stop|restart}"
 exit 1
exit $ERROR

Assigned the permissions below:

chomod 755 tomcat

Next, create a symbolic link of the tomcat script inside the rc.d directory:

ln -s /etc/init.d/tomcat /etc/rc.d/rc6.d/K24tomcat 
ln -s /etc/init.d/tomcat /etc/rc.d/rc0.d/K28tomcat
ln -s /etc/init.d/tomcat /etc/rc.d/rc3.d/S80tomcat
ln -s /etc/init.d/tomcat /etc/rc.d/rc2.d/S81tomcat
ln -s /etc/init.d/tomcat /etc/rc.d/rc5.d/S81tomcat

Go ahead and reboot your server and see if Tomcat starts automatically.

You can always contact me if you have any questions. Also, remember to visit my ITPro Helper shop where I created unique T-Shirts and coffee mugs designs.

Leave a comment

Your email address will not be published. Required fields are marked *