tomcat不能在linux机器上启动

时间:2021-07-17 13:36:59

I'm new to Linux but having spent a whole day I Installed Java and Tomcat. My goal is to host an App with this Linux box. I know it all works fine from my windows based machine, but it is my laptop so I'm planning to use the Linux Box as my dedicated server.

我是Linux新手,但是我花了一整天的时间安装Java和Tomcat。我的目标是用这个Linux盒子来托管一个应用程序。我知道它在我的windows电脑上运行良好,但它是我的笔记本电脑,所以我打算使用Linux Box作为我的专用服务器。

Following many many forums I've now got Tomcat 7 installed. However i cannot get it to start.

在许多论坛之后,我现在已经安装了Tomcat 7。但是我不能让它开始。

Changing to the tomcat directory and "./startup.sh" i get the following output:

切换到tomcat目录和“./startup”。sh"输出如下:

Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME:  /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: usr/lib/jvm/java-6-sun/
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar

That's the end of the output.

这是输出的末尾。

However localhost:8080 is not up, and in the tomcat log file is the error "eval: 1: usr/lib/jvm/java-6-sun//bin/java: not found"

但是,localhost:8080并不是向上的,在tomcat日志文件中是错误的“eval: 1: usr/lib/jvm/java-6-sun// java: not found”

Hopefully there is some expert here who can help me with this problem. Please note that I'm a novice when it comes to Linux.

希望这里有专家能帮助我解决这个问题。请注意,对于Linux,我是一个新手。

PS: My Linux version is Ubuntu 10.04 LTS - the Lucid Lynx

我的Linux版本是Ubuntu 10.04 LTS - Lucid Lynx

5 个解决方案

#1


5  

JRE_HOME is missing a / at the start of it.

JRE_HOME在开始时缺少a /。

Your CATALINA_HOME and CLASSPATH also looks wrong, with a local.tomcat instead of a local/tomcat and c\tomcat-juli instead of tomcat-juli

您的CATALINA_HOME和CLASSPATH也看起来是错误的,有本地的。用tomcat代替本地/tomcat,用c\tomcat-juli代替tomcat-juli

#2


5  

Try typing this on the command line:

尝试在命令行上输入这个:

$ export CATALINA_HOME=/usr/local/tomcat
$ export JRE_HOME=/usr/lib/jvm/java-6-sun
$ /usr/local/tomcat/bin/catalina.sh run

This will run Tomcat in the terminal you have open, so you can watch it do stuff. Press CTRL+C to quit it.

这将在已打开的终端中运行Tomcat,因此您可以看到它执行一些操作。按CTRL+C退出。

#3


1  

  1. First download the Linux tomcat version.
  2. 首先下载Linux tomcat版本。
  3. Unzip it.
  4. 解压缩它。
  5. Go to the tomcat bin folder.
  6. 转到tomcat bin文件夹。
  7. Run the startup.sh for start the tomcat server
  8. 启动运行。用于启动tomcat服务器
  9. Shutdown.sh for using to stop the tomcat
  10. 关闭。用于停止tomcat的sh

see the link, http://brigitzblog.blogspot.com/2011/11/linux-how-can-i-startstop-tomcat-server.html

看到这个链接时,http://brigitzblog.blogspot.com/2011/11/linux-how-can-i-startstop-tomcat-server.html

#4


1  

I'm just posting in case this will help someone else. I had my JAVA_HOME set to

我只是在发帖子,以防这对别人有帮助。我将JAVA_HOME设置为

/usr/lib/jvm/java-7-openjdk-i386/jre/bin/java

/usr/lib/jvm/java-7-openjdk-i386 / jre / bin / java

I should have been

我应该是

/usr/lib/jvm/java-7-openjdk-i386/jre

/usr/lib/jvm/java-7-openjdk-i386 / jre

without the /bin/java part at the end. This is because will look for bin/java in that path already and you don't need to specify it.

最后没有/bin/java部分。这是因为将在该路径中查找bin/java,您不需要指定它。

#5


0  

When I encountered something similar, the problems was with my Tomcat7 installation. I downgraded to Tomcat6 and it started working perfectly.

当我遇到类似的问题时,我的Tomcat7安装出现了问题。我降级为Tomcat6,它开始工作得很好。

#1


5  

JRE_HOME is missing a / at the start of it.

JRE_HOME在开始时缺少a /。

Your CATALINA_HOME and CLASSPATH also looks wrong, with a local.tomcat instead of a local/tomcat and c\tomcat-juli instead of tomcat-juli

您的CATALINA_HOME和CLASSPATH也看起来是错误的,有本地的。用tomcat代替本地/tomcat,用c\tomcat-juli代替tomcat-juli

#2


5  

Try typing this on the command line:

尝试在命令行上输入这个:

$ export CATALINA_HOME=/usr/local/tomcat
$ export JRE_HOME=/usr/lib/jvm/java-6-sun
$ /usr/local/tomcat/bin/catalina.sh run

This will run Tomcat in the terminal you have open, so you can watch it do stuff. Press CTRL+C to quit it.

这将在已打开的终端中运行Tomcat,因此您可以看到它执行一些操作。按CTRL+C退出。

#3


1  

  1. First download the Linux tomcat version.
  2. 首先下载Linux tomcat版本。
  3. Unzip it.
  4. 解压缩它。
  5. Go to the tomcat bin folder.
  6. 转到tomcat bin文件夹。
  7. Run the startup.sh for start the tomcat server
  8. 启动运行。用于启动tomcat服务器
  9. Shutdown.sh for using to stop the tomcat
  10. 关闭。用于停止tomcat的sh

see the link, http://brigitzblog.blogspot.com/2011/11/linux-how-can-i-startstop-tomcat-server.html

看到这个链接时,http://brigitzblog.blogspot.com/2011/11/linux-how-can-i-startstop-tomcat-server.html

#4


1  

I'm just posting in case this will help someone else. I had my JAVA_HOME set to

我只是在发帖子,以防这对别人有帮助。我将JAVA_HOME设置为

/usr/lib/jvm/java-7-openjdk-i386/jre/bin/java

/usr/lib/jvm/java-7-openjdk-i386 / jre / bin / java

I should have been

我应该是

/usr/lib/jvm/java-7-openjdk-i386/jre

/usr/lib/jvm/java-7-openjdk-i386 / jre

without the /bin/java part at the end. This is because will look for bin/java in that path already and you don't need to specify it.

最后没有/bin/java部分。这是因为将在该路径中查找bin/java,您不需要指定它。

#5


0  

When I encountered something similar, the problems was with my Tomcat7 installation. I downgraded to Tomcat6 and it started working perfectly.

当我遇到类似的问题时,我的Tomcat7安装出现了问题。我降级为Tomcat6,它开始工作得很好。