去掉tomcat自启动

发布于 2024-11-04 20:19:10 字数 84 浏览 4 评论 0原文

当我运行ubuntu时,我安装的tomcat服务器会自动运行,我必须手动将其关闭。我希望tomcat不要在启动时自动启动。如何禁止tomcat开机自启动?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

-残月青衣踏尘吟 2024-11-11 20:19:10

->首先:找出服务的名称。例如: tomcat 或 tomcat6

比: 试试这个:

sudo update-rc.d tomcat 删除

您可以使用以下工具:

sudo sysv-rc-conf

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

如果这不起作用,下一个将起作用

1.) 找出当前的运行级别

runlevel

2.) 从运行级别目录(重新)移动启动脚本
/etc/rcX.d(其中 X 是当前运行级别的编号) 示例:

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

脚本以 S 和数字开头(例如 S90tomcat),这意味着:S=stratscript for tomcat,从位置 90 开始。

只需删除或移动该脚本。

3.) 最后还要删除停止脚本(Kill Script),它看起来像 /etc/rcX.d/Kyytomcat,其中 yy 是 0-99 之间的数字,X 是运行级别,你仍然知道。

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

看看这个
http://www.unixtutorial.org/2009/01 /disable-service-startup-in-ubuntu/

-> 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/

孤云独去闲 2024-11-11 20:19:10

我使用这个安装了tomcat 教程和以下解决方案对我有用。

编辑 tomcat.conf

   sudo vim /etc/init/tomcat.conf

我将启动运行级别值更改为

    start on runlevel []

停止自动启动

    sudo initctl stop tomcat

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
空城仅有旧梦在 2024-11-11 20:19:10

当 Ubuntu 操作系统重新启动时,Apache Tomcat 服务器将自动启动。可以通过输入以下两个命令之一来更改此程序设置。

sudo systemctl启用tomcat9

sudo systemctl禁用tomcat9

< img src="https://i.sstatic.net/lsB0j.png" alt="在此处输入图像描述">

来源:https://linuxhint.com/install_apache_tomcat_server_ubuntu/

When the Ubuntu OS reboots, the Apache Tomcat Server will start automatically. This program setting can be changed by entering one of the following two commands.

sudo systemctl enable tomcat9

OR

sudo systemctl disable tomcat9

enter image description here

source: https://linuxhint.com/install_apache_tomcat_server_ubuntu/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文