CentOS Install Tomcat

Source: Internet
Author: User

First, install the JDK1. Place the JDK according to your preference, I put it under/usr/java #cd/usr#mkdir java#cd#tar zxvf jdk-7u71-linux-x64.gz-c/usr/java 2. Add environment variable #vi/ Etc/profile at the end of the file plus java_home=/usr/java/jdk1.7.0_71jre_home= $JAVA _home/jrepath= $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 Save exit execution make changes effective #source/etc/profile see if installation succeeded #java-version Install TOMCAT1. Place the tomcat position according to your preference, I put it under/usr/tomcat # cd/usr#mkdir Tomcat#cd#tar zxvf APACHE-TOMCAT-7.0.56.TAR.GZ#MV apache-tomcat-7.0.56/*/usr/tomcat/2. Configure Tomcat#cd/usr/tomcat/bin#vi catalina.sh Enter export Tomcat_home=/usr/tomcat at the end
Export Catalina_home=/usr/tomcat # Source/etc/profile
# Cd/usr/tomcat/bin
# chmod 777 * * 3. Join the boot #echo "Source/etc/profile" >>/etc/rc.d/rc.local

#echo "/usr/tomcat/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 code before startup.sh: Source/etc/profile so you can 4. Test #/usr/tomcat/bin /startup.sh open a browser to access HTTP.//Your ip:8080

CentOS Install Tomcat

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.