Java Environment TOMCAT+JDK under Linux

Source: Internet
Author: User



System Environment: CentOS 6.5
Jdk:jdk-7u60-linux-x64.tar.gz
Tomcat:apache-tomcat-7.0.54.tar.gz


1: Set up the installation directory
# Mkdir/doiido/soft
# Mkdir/doiido/apps
# Mkdir/doiido/server


2: Upload jdk-7u60-linux-x64.tar.gz to/doiido/soft
# cd/doiido/soft/
# tar ZXVF jdk-7u60-linux-x64.tar.gz
# mv Jdk1.7.0_60//doiido/server/


3: Set the JDK you just installed as the default JDK
# update-alternatives--install/usr/bin/java Java/doiido/server/jdk1.7.0_60/bin/java 300
# update-alternatives--install/usr/bin/javac Javac/doiido/server/jdk1.7.0_60/bin/javac


4: Setting Environment variables
# Vi/etc/profile
#在最后加入如下参数
Java_home=/doiido/server/jdk1.7.0_60
Path= $Java _home/bin: $PATH
Classpath=.: $Java _home/lib/tools.jar: $Java _home/lib/dt.jar
Export Java_home PATH CLASSPATH


5: Activate configuration
# Source/etc/profile


6: Check the Java version to see if it is configured properly
# java-version


7: Upload apache-tomcat-7.0.54.tar.gz to/doiido/soft
# Cd/doiido/soft
# tar ZXVF apache-tomcat-7.0.54.tar.gz
# MV Apache-tomcat-7.0.54/doiido/apps/tomcat7


8: Set Tomcat permissions
# cd/doiido/apps/tomcat7/bin/
# chmod 777 *.sh


9: Start Tomcat
# sh startup.sh


10: Firewall Port Open
#/sbin/iptables-i input-p TCP--dport 8080-j ACCEPT
#/etc/rc.d/init.d/iptables Save


11: Set Boot Boot
# echo "/doiido/apps/tomcat7/bin/startup.sh" >>/etc/rc.local

This is the time to visit.


Java Environment TOMCAT+JDK under Linux

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.