如何在linux中启动tomcat服务器?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19852730/
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
how to start the tomcat server in linux?
提问by
i tried to install
我试着安装
1.yum install -zxvf apache-tomcat-6.0.47.tar.gz then
2. export TOMCAT_HOME=/home/mpatil/softwares/apache-tomcat-6.0.37
3. [root@localhost mpatil]# echo $TOMCAT_HOME
/home/mpatil/softwares/apache-tomcat-7.0.47
while starting tomcat by using this command
使用此命令启动 tomcat 时
4.[root@localhost mpatil]# /startup.sh
bash: /startup.sh: No such file or directory
i don't know why it showing like this.
我不知道为什么它显示这样。
my file in
我的文件在
5.[root@localhost mpatil]# find /home -type f -name apache-tomcat-6.0.37.tar.gz
/home/mpatil/Downloads/apache-tomcat-6.0.37.tar.gz
what i tried before this is is correct or not? --please tell me my question is how to start a tomcat server in linux.Please tell me..
我之前尝试过的方法是正确的还是错误的?--请告诉我我的问题是如何在linux中启动tomcat服务器。请告诉我..
采纳答案by linux_fanatic
The command you have typed is /startup.sh
, if you have to start a shell script you have to fire the command as shown below:
您输入的命令是/startup.sh
,如果您必须启动 shell 脚本,则必须按如下所示启动命令:
$ cd /home/mpatil/softwares/apache-tomcat-7.0.47/bin
$ sh startup.sh
or
$ ./startup.sh
Please try that, you also have to go to your tomcat's bin-folder (by using the cd-command) to execute this shell script. In your case this is /home/mpatil/softwares/apache-tomcat-7.0.47/bin
.
请尝试一下,您还必须转到 tomcat 的 bin 文件夹(通过使用 cd 命令)来执行此 shell 脚本。在您的情况下,这是/home/mpatil/softwares/apache-tomcat-7.0.47/bin
.
回答by Omar Faroque Anik
if you are a sudo user i mean if you got sudo access:
如果您是 sudo 用户,我的意思是如果您有 sudo 访问权限:
sudo sh startup.sh
otherwise: sh startup.sh
否则: sh startup.sh
But things is that you have to be on the bin directory of your server like
但事情是你必须在你的服务器的 bin 目录上,比如
cd /home/nanofaroque/servers/apache-tomcat-7.0.47/bin
cd /home/nanofaroque/servers/apache-tomcat-7.0.47/bin
回答by Jason
Use ./catalina.sh start
to start Tomcat. Do ./catalina.sh
to get the usage.
使用./catalina.sh start
启动Tomcat。做得到./catalina.sh
用法。
I am using apache-tomcat-6.0.36.
我正在使用 apache-tomcat-6.0.36。
回答by Jason
Go to your Tomcat Directory with : cd/home/user/apache-tomcat6.0
使用以下命令转到您的 Tomcat 目录: cd/home/user/apache-tomcat6.0
sh bin/startup.sh.>> tail -f logs/catelina.out.>>
sh bin/startup.sh.>> tail -f logs/catelina.out.>>
回答by Anand Dwivedi
cd apache-tomcat-6.0.43 ====: Go to Tomcat Directory
sh bin/startup.sh =====: Start the tomcat on Linux
sh bin/shutdown.sh ======:Shut Down the tomcat on Linux
tail -f logs/catelina.out ====: Check the logs
回答by Neeraj Gahlawat
Go to the appropriate subdirectory of the EDQP Tomcat installation directory. The default directories are:
转至 EDQP Tomcat 安装目录的相应子目录。默认目录为:
On Linux: /opt/server/tomcat/bin
在 Linux 上:/opt/server/tomcat/bin
On Windows: c:\server\tomcat\bin
在 Windows 上:c:\server\tomcat\bin
Run the startup command:
运行启动命令:
On Linux: ./startup.sh
在 Linux 上:./startup.sh
On Windows: % startup.bat
在 Windows 上:% startup.bat
Run the shutdown command:
运行关机命令:
On Linux: ./shutdown.sh
在 Linux 上:./shutdown.sh
On Windows: % shutdown.bat
在 Windows 上:% shutdown.bat
回答by vinas
I know this is old question, but this command helped me!
我知道这是个老问题,但是这个命令帮助了我!
Go to your Tomcat Directory
Just type this command in your terminal:
转到您的 Tomcat 目录
只需在终端中输入以下命令:
./catalina.sh start