无法安装Tomcat 7作为Windows服务 [英] Can't install Tomcat 7 as a Service in Windows

查看:1083
本文介绍了无法安装Tomcat 7作为Windows服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图安装Tomcat作为一个服务的Windows Server 2008。

I'm trying to install tomcat as a service in Windows Server 2008.

我在搜索计算器并不能找到任何回答这个问题,我可以看到其他相关的问题,这些问题个个都是不一样的(涉及到code错误0,我的是code错误1 ),或者没有有效的答案,所以我决定创建这个问题。

I searched in stackoverflow and can't find any answer to this problem, i can see other related questions which all of them are not the same (are related to code error 0, mine is code error 1) or have not valid answers, so i decided to create this question.

我用它来创建服务:

https://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html#Installing_services

tomcat7 //IS//Tomcat7 --DisplayName="Apache Tomcat 7" \

该命令后,我可以在服务列表中看到的Apache Tomcat 7的服务,问题是,它被停止,如果我尝试启动它,我可以看到这个错误:

After the command, i can see in my Services list the Apache Tomcat 7 service, the problem is that it is stopped, if i try to start it, i can see this error:

Windows could not start the Apache Tomcat 7 on Local Computer. For
more information, review the System Event Log. If this is a
non-Microsoft service, contact the service vendor, and refer to
service-specific error code 1.

在系统事件查看器,我可以看到该日志此错误:

In the System Event Viewer i can see this log for this error:

The Apache Tomcat 7 service terminated with service-specific error Incorrect function..

我用java 64位,我既tomcat的32位和64位的测试,在这两个我有同样的问题。我也tryed打开cmd.exe的具有管理员权限的和我有同样的问题...

I am using java 64 bits and i tested with both tomcat 32 and 64 bits, in both i have the same problem. I also tryed to open cmd.exe with administrator permission and i have the same problem...

感谢您的帮助。

FYI:如果我开始的startup.bat手动tomcat的,它开始正确

推荐答案

我解决了它安装简单与其他方法的服务:

I solved it simply installing the service with other method:

service.bat install

此命令将卸载该服务:

service.bat uninstall

另外要启动它并启用自动启动,则必须输入到Windows(SERVICIOS西班牙文版)的服务管理器并启动该服务,并启用自动启动。

Also to start it and to enable autostart, you must enter to the Services Manager of Windows (Servicios in spanish version) and start the service and enable autostart.

如果您发现CAND在Tomcat中/ bin目录service.bat文件,阅读本:

If you cand find service.bat file in tomcat/bin directory, read this:

apache-tomcat-[version].zip or .tar.gz
       Base distribution. These distributions do not include the Windows service wrapper nor the compiled APR/native library for Windows.

apache-tomcat-[version]-windows-x86.zip
       32-bit Windows specific distribution that includes the Windows service wrapper and the compiled APR/native library for use with 32-bit JVMs on both 32 and 64 bit Windows platforms.

apache-tomcat-[version]-windows-x64.zip
       64-bit Windows specific distribution that includes the Windows service wrapper and the compiled APR/native library for use with 64-bit JVMs on x64 Windows platforms.

这篇关于无法安装Tomcat 7作为Windows服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆