简体   繁体   中英

tomcat wont start up on linux machine

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.

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

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

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"

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.

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

JRE_HOME is missing a / at the start of it.

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

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.

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

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

I should have been

/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.

  1. First download the Linux tomcat version.
  2. Unzip it.
  3. Go to the tomcat bin folder.
  4. Run the startup.sh for start the tomcat server
  5. Shutdown.sh for using to stop the tomcat

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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