Apache tomcat启动

问题描述 投票:0回答:3

我试图通过命令提示符启动tomcat服务器,但它显示的

CATALINE_HOME
变量未设置。我已经通过控制面板设置了变量,然后也出现了同样的错误。

如果我直接转到

starttup.bat
文件并尝试运行它,它只会闪烁并运行。所以我尝试在最后添加暂停命令,然后当我运行时我得到

using CATALINA _BASE :"C:\apache-tomcat-7.0.26"
using CATALINA _HOME:"C:\apache-tomcat-7.0.26"
using CATALINA _TMPDIR :"C:\apache-tomcat-7.0.26\temp"
using JRE_HOME :"C:\programfiles\java\jre"
using CLASSPATH :"C:\apache-tomcat-7.0.26\bin\bootstrap.jar;"C:\apache-tomcat-7.0.26\bin\tomcat-juli.jar

这是最近的目录内容。

    ... 17 more
Dec 12, 2012 3:59:17 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Dec 12, 2012 3:59:17 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 445 ms
Dec 12, 2012 3:59:17 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Dec 12, 2012 3:59:17 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.26
Dec 12, 2012 3:59:17 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.26\webapps\docs
Dec 12, 2012 3:59:17 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.26\webapps\examples
Dec 12, 2012 3:59:17 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.26\webapps\host-manager
Dec 12, 2012 3:59:17 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.26\webapps\manager
Dec 12, 2012 3:59:17 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.26\webapps\ROOT
Dec 12, 2012 3:59:17 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Dec 12, 2012 3:59:17 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 468 ms
Dec 12, 2012 4:01:06 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-8080"]
Dec 12, 2012 4:01:06 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["ajp-bio-8009"]
Dec 12, 2012 4:01:06 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Dec 12, 2012 4:01:06 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["ajp-bio-8009"]
Dec 12, 2012 4:01:06 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-bio-8080"]
Dec 12, 2012 4:01:06 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-8080"]
Dec 12, 2012 4:01:06 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-bio-8009"]
tomcat batch-file
3个回答
0
投票

这可能是因为该进程已经在后台运行。如有必要,请致电

shutdown.bat
停止。

否则您应该能够通过

http://localhost:8080/html/manager
访问该经理。 在此之前,您可能需要先配置用户/密码,然后重新启动 tomcat。

请参阅 tomcat 文档 了解更多信息。


0
投票

你必须先定义两个变量

  1. Java_Home
  2. CATALINA_HOME

以下是您可以使用的bat文件 这里

%TOMCAT_LOC%
=你的tomcat路径(请不要包含bin)

echo Stopping Tomcat App Server
cd /D %TOMCAT_LOC%
set JAVA_HOME=C:\Program Files\jdk echo java Path
set CATALINA_HOME=%TOMCAT_LOC%
call %TOMCAT_LOC%\bin\shutdown.bat
echo Stopped Tomcat 

-1
投票

您可以移动到包含批处理文件的路径(tomcat/bin),然后运行批处理文件

C:\Users>cd C:pache-tomcat-6.0.35 中

C:pache-tomcat-6.0.35>startup.bat

© www.soinside.com 2019 - 2024. All rights reserved.