Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove tomcat autostart

Tags:

When I run ubuntu, the tomcat server I have installed runs automatically and I have to switch it off manually. I want tomcat not to start automatically on boot. How to disable tomcat's startup on boot?

like image 684
ddelizia Avatar asked May 02 '11 09:05

ddelizia


People also ask

How do I stop Tomcat from starting automatically?

Copy the script to the /etc/rc. d/init. d directory after modifying the JAVA_HOME and CATALINA_HOME environment variables to fit your system. Then, set the new tomcat service to start and stop automatically by using chkconfig , as shown earlier in this section.

How do I completely remove Tomcat from Ubuntu?

So basically, you downloaded a tar. gz archive and unpacked it to /opt/tomcat. So cd /opt and sudo rm -rf tomcat should 'uninstall' it.

How do I automatically start Tomcat in Windows 10?

Starting Tomcat Automatically on a Windows Machine You can configure the server to start automatically either through the tomcat6w.exe tray program, or by editing the preferences for "Apache Tomcat" in the Services configuration pane, located in the Administrative Tools section of the Windows Control Panel.


2 Answers

-> first: find out the name of the service. for example: tomcat or tomcat6

Than: try this:

sudo update-rc.d tomcat remove

You can use the following tool:

sudo sysv-rc-conf

http://dotgiri.com/2009/08/31/alternative-for-chkconfig-in-ubuntu-sysv-rc-conf-enable-or-disable-services-at-startup/

If this doesn't work, the next will work

1.) find out your current runlevel

runlevel

2.) (re)move the startscript from the runlevel directory /etc/rcX.d (wher X is the number of the current runlevel) Example:

mv /etc/rc5.d/S90tomcat /etc/rc5.d/disable.S90tomcat

The script starts with S and an Number (for example S90tomcat), which means: S=stratscript for tomcat, Start at position 90.

Simply delete or move that script.

3.) Finally also remove the stop-Script (Kill Script) which looks like /etc/rcX.d/Kyytomcat where yy is an number between 0-99 and X is the runlevel, you still know.

mv /etc/rc5.d/K01tomcat /etc/rc5.d/disable.K01tomcat

Look at this http://www.unixtutorial.org/2009/01/disable-service-startup-in-ubuntu/

like image 187
The Bndr Avatar answered Sep 25 '22 11:09

The Bndr


I installed tomcat using this tutorial and following solution worked for me.

Edit tomcat.conf

   sudo vim /etc/init/tomcat.conf

I changed start on runlevel value to

    start on runlevel []

Stop autostart

    sudo initctl stop tomcat
like image 37
Anastazie Sedlakova Avatar answered Sep 23 '22 11:09

Anastazie Sedlakova