Install tomcat server

Source: Internet
Author: User

Tomcat is a lightweight application server that consumes less system resources and has good scalability and supports load balancing.

1. Install jdkjavaDevelopmentkit first)

Http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html # download the corresponding version of jdk [root @ zhu1 ~] # Tar zxvf jdk-7u40-linux-i586.tar.gz [root @ zhu1 ~] # Mv jdk1.7.0 _ 40 // usr/local/jdk

2. Set Environment Variables

[Root @ zhu1 ~] # Vim/etc/profile # Add the following lines at the end: export JAVA_HOME =/usr/local/jdkexport CLASSPATH = $ JAVA_HOME/lib: $ JAVA_HOME/jre/libexport PATH = $ PATH: $ JAVA_HOME/bin

3. Test

[Root @ zhu1 ~] # Source/etc/profile [root @ zhu1 ~] # Java-versionjava version "1.7.0 _ 40" Java (TM) SE Runtime Environment (build 1.7.0 _ 40-b43) Java HotSpot (TM) Client VM (build 24.0-b56, mixed mode) # This interface is displayed, indicating that jdk is successfully installed.

4. install tomcat

[root@zhu1 ~]# wget http://mirror.esocc.com/apache/tomcat/tomcat-7/v7.0.42/bin/apache-tomcat-7.0.42.tar.gz[root@zhu1 ~]# tar zxvf apache-tomcat-7.0.42.tar.gz[root@zhu1 ~]# mv apache-tomcat-7.0.42 /usr/local/tomcat

5. Set tomcat Environment Variables

[root@zhu1 ~]# vim /etc/profileexport CATALINA_HOME=/usr/local/tomcat

6. Test

[root@zhu1 bin]# ./catalina.sh startUsing CATALINA_BASE:   /usr/local/tomcatUsing CATALINA_HOME:   /usr/local/tomcatUsing CATALINA_TMPDIR: /usr/local/tomcat/tempUsing JRE_HOME:        /usr/local/jdkUsing CLASSPATH:       /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar

7. Start tomcat to view the port

[root@zhu1 bin]# ./startup.shUsing CATALINA_BASE:   /usr/local/tomcatUsing CATALINA_HOME:   /usr/local/tomcatUsing CATALINA_TMPDIR: /usr/local/tomcat/tempUsing JRE_HOME:        /usr/local/jdkUsing CLASSPATH:       /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar[root@zhu1 bin]# netstat -lntp | grep 8080tcp        0      0 :::8080                     :::*                        LISTEN      10614/java

8. Access

650) this. width = 650; "style =" width: 835px; height: 137px; "title =" 2013-09-23_153726.jpg "src =" http://www.bkjia.com/uploads/allimg/131228/05105CG0-0.jpg "width =" 831 "height =" 327 "alt =" 153756238.jpg"/>

You can see the kitten.

This article is from the "Lang taosha" blog, please be sure to keep this source http://caisangzi.blog.51cto.com/6387416/1300288

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.