Deploying Tomcat on Linux (including configuration of the Java environment)

Source: Internet
Author: User

I. Upload the apache-tomcat-7.0.64.tar.gz andjdk-7u79-linux-x64.tar.gz to the directory/home/zwl/tomcat/command using the FTP tool

Because the Tomcat runtime requires a Java environment, the Java environment must be configured first.

  

One. Building a Java environment

1. Create a Java directory

Make Dir/usr/local/java

2. Move the JDK to the Java directory

MV JDK file /usr/local/java

  

3. Unzip the JDK file

Decompression jdk-7u79-linux-x64.tar.gz decompression

Tar zxvf jdk-7u79-linux-x64.tar.gz

  

4. Edit profile

in the unset I, Unset-f Pathmunge two lines before adding something:

java_home=/usr/java/jdk1.7.0_79
Jre_home=/usr/java/jdk1.7.0_79/jre
Path= $PATH: $JAVA _home/bin: $JRE _home/bin
Classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar: $JRE _home/lib
Export Java_home jre_home PATH CLASSPATH

5. Verify that the Java environment is configured to complete

Java-version, Javac-version appears the following information:

Java Version "1.7.0_79"

Javac 1.7.0_79

The Java environment configuration was successful.

  

Two. Build Tomcat

  

1. Create a Tomcat directory

mkdir apache-tomcat-8091

2. Move tomcat to the Tomcat directory

MV Tomcat file /home/tomcat/

3. Unzip the apache-tomcat-7.0.64.tar.gz file

    Tar zxvf apache-tomcat-7.0.64.tar.gz

  

4. Copy the project to Tomcat's WebApps directory and modify the configuration file in Tomcat's Conf folder

    

5. Start Tomcat

Go to the Bin directory of Tomcat and execute the start command

./start.sh

6. View Logs

Enter Tomcat's logs directory to view the log

Cat Catalina.out View Log, if no exception, can be accessed in the browser

Access format:/HTTP Access Destination IP: Access destination port/Access Target project name/xxxx/login.jsp

    

If the page appears, the deployment is complete!!!    

    

  

    

    

  

Deploying Tomcat on Linux (including configuration of the Java environment)

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.