简体   繁体   English

通过命令提示符启动和停止tomcat

[英]start and stop tomcat via command prompt

Im currently using tomcat 6.0.18 . 我目前正在使用tomcat 6.0.18 I have installed tomcat server and set the CATALINA_HOME variable in the environment variables. 我已经安装了tomcat服务器,并在环境变量中设置了CATALINA_HOME变量。 Inside the tomcat installation location under the bin folder, there is no startup.bat or shutdown.bat file available. bin文件夹下的tomcat安装位置中,没有可用的startup.batshutdown.bat文件。 There are only two exe files: tomcat6.exe & tomcat6w.exe . 只有两个exe文件: tomcat6.exetomcat6w.exe I would like to know how to start the tomcat server via command prompt. 我想知道如何通过命令提示符启动tomcat服务器。

I tried executing the below command 我尝试执行以下命令

C:\Apache Software Foundation\Tomcat6.0\bin>tomcat6.exe start 

The start command works fine. start命令运行正常。 But I'm unable to stop the server using the command 但是我无法使用以下命令停止服务器

C:\Apache Software Foundation\Tomcat6.0\bin>tomcat6.exe stop 

But the stop command does not stop the server. 但是stop命令不会停止服务器。 It only starts the tomcat server. 它只启动tomcat服务器。

Both the commands 'tomcat6.exe start' & 'tomcat6.exe stop' starts the tomcat server. “ tomcat6.exe start”和“ tomcat6.exe stop”这两个命令都会启动tomcat服务器。 I would like to know what options should I use to stop the tomcat server via command prompt. 我想知道应该使用哪些选项来通过命令提示符停止Tomcat服务器。

Any help on this is much appreciated. 任何帮助对此表示感谢。 Thanks in Advance. 提前致谢。

如果tomcat服务器是64位并且系统是32位服务器将无法启动...在配置时还要检查系统类型

I have installed tomcat using the following steps on windows.. 我已经在Windows上使用以下步骤安装了tomcat。

Step1: uninstall current tomcat 第一步:卸载当前的tomcat

step2: go to https://tomcat.apache.org/download-60.cgi and download the zipped version and extract it somewhere in your drive you want to install .Their is no need for installation using 步骤2:转到https://tomcat.apache.org/download-60.cgi并下载压缩版本,并将其解压缩到要安装的驱动器中的某个位置。无需使用
exe , as you can directly extract and run exe,因为您可以直接提取并运行

step3: set the CATALINA_HOME , try to run startup.bat , if JAVA_HOME is properly set , It should start running . 第三步:设置CATALINA_HOME,尝试运行startup.bat,如果正确设置了JAVA_HOME,它将开始运行。

step4: Well If you face any problems while starting .bat file(for windows) try running the file using command prompt , It will show you error if any 步骤4:好吧,如果您在启动.bat文件(对于Windows)时遇到任何问题,请尝试使用命令提示符运行文件,如果有的话,它将显示错误。

hope that helps!!. 希望能有所帮助!

In your bin directory there is a file called startup which is an executable. 在bin目录中,有一个名为startup的文件,该文件是可执行文件。 Please execute that. 请执行。

In your bin directory there is a file called startup which is an executable. 在bin目录中,有一个名为startup的文件,该文件是可执行文件。 Please execute that.After you have run that please check the following url http://localhost:8080/ . 请执行该命令。运行后,请检查以下URL http:// localhost:8080 / If you have installed tomcat successfully then you will get a message. 如果您已经成功安装了tomcat,那么您将收到一条消息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM