CentOS-6.4 Installation Configuration Tomcat7

Source: Internet
Author: User

First, download Tomcat
Download the latest version of Tomcat
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

MV Apache-tomcat-7.0.59.tar.gz TOMCAT7

Third, 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 have the file execute permissions and make the configuration effective

# Source/etc/profile

# Cd/usr/local/tomcat7/bin

# chmod 777 * *


Iv. Configuring Tomcat

(1) Adding Tomcat to boot

echo "Source/etc/profile" >>/etc/rc.d/rc.local
echo "/usr/local/tomcat1/bin/startup.sh" >>/etc/rc.d/rc.local

Here is a bit to explain, rc.local before/etc/profile execution, so will not get the Java environment variable,
So add the code before startup.sh: Source/etc/profile so you can

V. Testing

# Cd/usr/local/tomcat1/bin

#./startup.sh appears as normal

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/5D/10/wKioL1UhBFXw2pNkAAZxrN0aH6E173.jpg "title=" Tomcat "alt=" Wkiol1uhbfxw2pnkaazxrn0ah6e173.jpg "/>


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/5D/10/wKioL1UhB63jZNtPAAGj3RIXVyk733.jpg "title=" Tomcat2 "alt=" Wkiol1uhb63jzntpaagj3rixvyk733.jpg "/>

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

CentOS-6.4 installation Configuration Tomcat7

Related Article

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.