Install Tomcat 7.0.42 in Ubuntu

Source: Internet
Author: User

Frome Http://askubuntu.com/questions/339169/how-to-install-tomcat-7-0-42-on-ubuntu-12-04-3-lts

Note : Visit this question if your want to know why it's not in the repositories: why Don ' t the Ubuntu repositories has the latest versions of software?

Prerequisite : Need to has Java installed, and we need its path. Java is usually installed under  /USR/LIB/JVM . Once You has installed Java, you can run the command  update-alternatives--config Java  to show you The exact path; Look at the first entry, the one with a , *  next to it. You can hit , Enter  to exit this screen). We only need the directory after  /jvm/. On my machine, the directory was  /usr/lib/jvm/java-7-openjdk-i386/. This answer'll assume that's the Java directory, but you should change the commands accordingly.

  1. wget http://mirror.atlanticmetro.net/apache/tomcat/tomcat-7/v7.0.42/bin/apache-tomcat-7.0.42.tar.gz

    • This would download Tomcat 7.0.42 to your the current directory.
  2. tar xzvf apache-tomcat-7.0.42.tar.gz

    • This would extract the files.
  3. sudo mv apache-tomcat-7.0.42 /usr/local

    • This moves Tomcat to /usr/local . You can choose any path to want. The remaining commands would assume you had used this path.
  4. nano ~/.bashrc-This would open up a text editor. Go to the end of the file ( Alt + / ) and add the following lines:

    Export Catalina_home=/usr/local/apache-tomcat-7.0.42export java_home=/usr/lib/jvm/java-7-openjdk-i386/

    Remember: This is the path to my Java. Change it to your installed Java.

  5. . ~/.bashrc

    • This would apply the changes we made.
  6. sudo $CATALINA_HOME/bin/startup.sh-You should see something like this:

    Using catalina_base:   /usr/local/apache-tomcat-7.0.42using catalina_home:   /usr/local/ Apache-tomcat-7.0.42using catalina_tmpdir:/usr/local/apache-tomcat-7.0.42/tempusing JRE_HOME:        /usrUsing CLASSPATH:       /usr/local/apache-tomcat-7.0.42/bin/bootstrap.jar:/usr/local/apache-tomcat-7.0.42/bin/ Tomcat-juli.jar

    and no errors.

You're done. Point your browser to and you should see the http://localhost:8080 Tomcat page:

ShareImprove this answer

Install Tomcat 7.0.42 in Ubuntu

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.