Install JDK1.6.0 _ 18 and atat6.0.24 in Ubuntu9.10

Source: Internet
Author: User
Sorry, I don't know what's going on. The gz compression file is incomplete and cannot be opened using the archive manager. So I wrote a zip file.) 2. Install JDK1, move the jdk-6u18-linux-i586.bin to the directory you want to install it to, and I am installing it under/opt (if it is in a graphical operation interface, directly cut the jdk-6u18-linux

1. Download jdk-6u18-linux-i586.binand apache-tomcat-6.0.24.zip( .gz). I don't know what's going on. The following gz compression file is incomplete and cannot be opened by the archive manager. So I wrote a zip)

2. Install JDK

1, move the jdk-6u18-linux-i586.bin to the directory you want to install, I am installed under/opt (if it is in the graphical operation interface, directly cut jdk-6u18-linux-i586.bin, open the/opt directory, you may find that there is no paste option, which means the permission is not enough, you can open the terminal, run sudo mv jdk-6u18-linux-i586.bin/opt)

2. Input sudo cd/opt to the opt directory.

3, sudo. /jdk-6u18-linux-i586.bin, at this time, the supervisor will appear JDK installation protocol, press enter all the way until the prompt (yes/no) appears, enter YES, press enter, then, the jdk1.6.0 _ 18 directory is generated under/opt.

4. Set the environment variable sudo gedit/etc/profile. Add the following configuration at the bottom of the opened configuration file:

# Set java environment

JAVA_HOME =/opt/jdk1.6.0 _ 18

Export JRE_HOME =/opt/jdk1.6.0 _ 18/jre

Export CLASSPATH =.: $ JAVA_HOME/lib: $ JRE_HOME/lib: $ CLASSPATH

Export PATH = $ JAVA_HOME/bin: $ JRE_HOME/bin: $ PATH

Now, JDK has been installed successfully. After restarting, enter java-version on the terminal.

Java version "1.6.0 _ 18"

Java (TM) SE Runtime Environment (build 1.6.0 _ 18-b07)

Java HotSpot (TM) Server VM (build 16.0-b13, mixed mode)

3. install Tomcat 6.0.24

1. Decompress apache-tomcat-6.0.24.zip to create the apache-tomcat-6.0.24 directory.

2. Move the apache-tomcat-6.0.24 directory to/opt (using the same mv command)

3. Set the TOMCAT environment variable sudo gedit/etc/profile.

Add a line under the JDK environment variable added earlier.

Export CATALINA_HOME = "/opt/apache-tomcat-6.0.24"

4. Restart (changes to environment variables must be restarted to take effect)

5, $ sudo cd/opt/apache-tomcat-6.0.24/bin

$./Startup. sh

If the following message is displayed:

The BASEDIR environment variable is not defined correctly

This environment variable is needed to run this program

Indicates that the execution permission of the related. sh file used in startup. sh is insufficient.

6. For apache-tomcat-6.0.24. sh File Permission (at this time, your current path is still in/opt/apache-tomcat-6.0.24/bin. If not, add the path or enter this directory first)

$ Sudo chmod + x *. sh

7. Run startup. sh again. If the following prompt is displayed, the startup is successful.

Using CATALINA_BASE:/opt/apache-tomcat-6.0.24

Using CATALINA_HOME:/opt/apache-tomcat-6.0.24

Using CATALINA_TMPDIR:/opt/apache-tomcat-6.0.24/temp

Using JRE_HOME:/opt/jdk1.6.0 _ 18/jre

Using CLASSPATH:/opt/apache-tomcat-6.0.24/bin/bootstrap. jar

8. Enter http: // localhost: 8080/in the browser to view the familiar tomcat homepage.

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.