CentOS installation and configuration: Tomcat 7

Source: Internet
Author: User

CentOS installation and configuration: Tomcat 7

1. Download tomcat
Download the latest tomcat version.
Cd/usr/local/src
Wget http://mirror.bit.edu.cn/apache/tomcat/tomcat-7/v7.0.50/bin/apache-tomcat-7.0.59.tar.gz

Ii. Unzip and install tomcat
Tar zxvf apache-tomcat-7.0.59.tar.gz

Music apache-tomcat-7.0.59.tar.gz tomcat7

3. Configure Environment Variables
Vi/etc/profile

Export JAVA_HOME =/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64
Export JRE_HOME =/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre
Export CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar
Export PATH = $ PATH: $ JAVA_HOME/bin


Cd/usr/local/tomcat7/bin

Vi catalina. sh

#! /Bin/sh

Export TOMCAT_HOME =/usr/local/tomcat7

Export CATALINA_HOME =/usr/local/tomcat7



Use the following command to give the File Execution permission and make the configuration take effect

# Source/etc/profile

# Cd/usr/local/tomcat7/bin

# Chmod 777 *.*


4. Configure tomcat

(1) Add tomcat to start automatically

Echo "source/etc/profile">/etc/rc. d/rc. local
Echo "/usr/local/tomcat1/bin/startup. sh">/etc/rc. d/rc. local

It should be noted that rc. local is executed before/etc/profile, so the JAVA environment variable is not available,
So add the code: source/etc/profile before startup. sh so that you can

V. Test

# Cd/usr/local/tomcat1/bin

#./Startup. sh is displayed as follows:

This article is from the "Linux is belong to you" blog, please be sure to keep this source http://jwh5566.blog.51cto.com/7394620/1629113

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.