在 LINUX 上将 Tomcat 作为服务启动
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9156425/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Starting Tomcat as a service on LINUX
提问by VamsiKrishna
I have to use Tomcat to deploy my webapplication. I have copied the installable files and was able to install tomcat. I have very limited privilages on the linux system. I need to make tomcat run as a system service. Can anyone help?
我必须使用 Tomcat 来部署我的 web 应用程序。我已经复制了可安装文件并且能够安装 tomcat。我在 linux 系统上的特权非常有限。我需要让 tomcat 作为系统服务运行。任何人都可以帮忙吗?
However, when I logged out and logged in to the Linux machine, Tomcat was still running. Is it that we need not worry to restart Tomcat at every login. Any help needed
但是,当我注销并登录Linux机器时,Tomcat仍在运行。是不是我们不用担心每次登录都要重启Tomcat。需要任何帮助
Thanks, vamsi
谢谢,瓦姆西
采纳答案by souser
Based on what you have mentioned above, looks like tomcat is already running in the background. If you want tomcat to run as a service, use the steps here http://www.spaceprogram.com/knowledge/tomcat_init_d.html
根据您上面提到的内容,看起来 tomcat 已经在后台运行。如果您希望 tomcat 作为服务运行,请使用此处的步骤 http://www.spaceprogram.com/knowledge/tomcat_init_d.html
It is possible that tomcat was started as a background process, which explain why it was still running when you logged off and back in. The advantage of setting it up as a service is that when the server restarts, upon startup it will also startup tomcat.
有可能tomcat是作为后台进程启动的,这就解释了为什么当您注销并重新登录时它仍在运行。 将其设置为服务的好处是当服务器重新启动时,它也会在启动时启动tomcat .