CentOS Install JDK7 and Tomcat

Source: Internet
Author: User
Tags apache download

First, install the JDK7

1. Download JDK7 from Oracle to the CentOS desktop: jdk-7u71-linux-x64.rpm

2. Copy it to the/usr directory:

CP '/home/shenzhun/desktop/jdk-7u71-linux-x64.rpm '/usr/

3. Enter the/usr directory and give it permission to run the installation:

Cd/usr

chmod 777 jdk-7u71-linux-x64.rpm

RPM-IVH jdk-7u71-linux-x64.rpm

Run:

  

4. Configure Environment variables:

Vi/etc/profile

Append the following content:

Export java_home=/usr/java/jdk1.7.0_71
Export classpath=.: $JAVA _home/jre/lib/rt.jar: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
Export path= $PATH: $JAVA _home/bin

5. Remove the default installed JDK:

Rpm-qa|grep JDK

Yum-y Remove Java Java-1.6.0-openjdk-1.6.0.0-1.24.1.10.4.el5

Results:

  

6. Run Javac, Java, and java-version to verify that the JDK7 is installed successfully.

Second, installation TOMCAT7

1. Go to Apache download apache-tomcat-7.0.57.tar.gz to Desktop

2. Unzip the tar zxvf apache-tomcat-7.0.29.tar.gz

3. Move the directory to/tomcat: MV '/home/shenzhun/desktop/apache-tomcat-7.0.57 '/tomcat

4. Rename to TOMCAT7:MV APACHE-TOMCAT-7.0.57/TOMCAT7

5. Enter the Tomcat7/bin directory and run "sh startup.sh" or "./startup.sh" to start Tomcat:

  

CentOS Install JDK7 and 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.