去掉tomcat自启动
当我运行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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
->首先:找出服务的名称。例如: tomcat 或 tomcat6
比: 试试这个:
您可以使用以下工具:
http://dotgiri.com/2009/08/31/alternative-for-chkconfig-in-ubuntu-sysv-rc-conf-enable-or-disable-services-at-startup/
如果这不起作用,下一个将起作用
1.) 找出当前的运行级别
2.) 从运行级别目录(重新)移动启动脚本
/etc/rcX.d(其中 X 是当前运行级别的编号) 示例:
脚本以 S 和数字开头(例如 S90tomcat),这意味着:S=stratscript for tomcat,从位置 90 开始。
只需删除或移动该脚本。
3.) 最后还要删除停止脚本(Kill Script),它看起来像 /etc/rcX.d/Kyytomcat,其中 yy 是 0-99 之间的数字,X 是运行级别,你仍然知道。
看看这个
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:
You can use the following tool:
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
2.) (re)move the startscript from the runlevel directory
/etc/rcX.d (wher X is the number of the current runlevel) Example:
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.
Look at this
http://www.unixtutorial.org/2009/01/disable-service-startup-in-ubuntu/
我使用这个安装了tomcat 教程和以下解决方案对我有用。
编辑 tomcat.conf
我将启动运行级别值更改为
停止自动启动
I installed tomcat using this tutorial and following solution worked for me.
Edit tomcat.conf
I changed start on runlevel value to
Stop autostart
当 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
source: https://linuxhint.com/install_apache_tomcat_server_ubuntu/