Configure JRE, JDK, eclipse, and tomcat 7.0.5 in Ubuntu 10.10

Source: Internet
Author: User
Tags gtk

1. Install JDK

1.1, to the official website to download the relevant JDK, download here is the jdk-6u23-linux-i586.bin.

Website: http://www.oracle.com/technetwork/java/javase/downloads/index.html

 

1.2 create a "Java folder" in the "Administrator personal folder" (I .e., location-> main folder-> administrator );

Place the downloaded jdk-6u23-linux-i586.bin in this Java folder.

(The path can be modified according to your actual situation. Here we use the Java folder under administrator as an example.
)

 

1.3 open the terminal (Application> attachment> Terminal)

Input: sudo sh jdk-6u23-linux-i586.bin.

(The user password to be entered may be encountered)

 

2. Set system variables in the java_home Environment

2.1. Here, CTRL + H can be used to view hidden files. It is a useful shortcut key.

Input: sudo gedit/etc/environment

Add:

Export java_home =/home/Administrator/Java/jdk1.6.0 _ 23

Export jre_home =/home/Administrator/Java/jdk1.6.0 _ 23/JRE

Export classpath = $ classpath: $ java_home/lib: $ java_home/JRE/lib

That is

 

2.2. Similarly, modify the second file

Input: sudo gedit/etc/profile

Add the following statement before umask 022:

Export java_home =/home/Administrator/Java/jdk1.6.0 _ 23

Export jre_home =/home/Administrator/Java/jdk1.6.0 _ 23/JRE

Export classpath = $ classpath: $ java_home/lib: $ java_home/JRE/lib

Export Path = $ java_home/bin: $ java_home/JRE/bin: $ path: $ home/bin

That is

 

2.3 log out of the user and check the JDK version.

Input: Java-version

That is

(JRE and JDK are successfully installed)

 

3. Install eclipse.

3.1, to the official website to download the relevant eclipse, Here download is the eclipse-jee-helios-SR1-linux-gtk.tar.gz (javaee ).

Website: http://www.eclipse.org/downloads/

 

3.2. Place the downloaded eclipse-jee-helios-SR1-linux-gtk.tar.gz in the Java folder and decompress it.

Run the decompressed eclipse, that is

 

 

4. Install tomcat7.05

4.1, go to the official website to download related tomcat, download here is the apache-tomcat-7.0.5.tar.gz.

Website: http://tomcat.apache.org/

 

4.2 put the downloaded apache-tomcat-7.0.5.tar.gz in the Java folder, decompress and name it tomcat7 (if you like to execute command line, you can execute

(Decompress) sudo tar zxvf APACHE-Tomcat-7.0.5

(Named tomcat7) sudo mv apache-Tomcat-7.05 tomcat7

Command)

 

4.3 bind files (CD Java/tomcat7/bin) under Tomcat 7 on the terminal)

(Here we use the vim editor or gedit, that is, enter sudo gedit Catalina. Sh)

Input: sudo Vim Catalina. Sh

In

Cygwin = false

Os400 = false

Darwin = false

Case "'uname'" in

Cygwin *) cygwin = true ;;

Os400 *) os400 = true ;;

Darwin *) Darwin = true ;;

Add:

Java_home =/home/Administrator/Java/jdk1.6.0 _ 23

Java_opts = "-server-xms512m-xmx1024m-XX: permsize = 600 m-XX: maxpermsize = 600 m-DCOM. Sun. Management. jmxremote"

 

Port 4.4 and tomcat7.0.5 (the default port of tomcat7.0.5 is 8080). If a conflict occurs, modify the port in the following file.

In the tomcat7/CONF/server. xml file:

<Connector Port = "9090" protocol = "HTTP/1.1"

Connectiontimeout = "20000"

Redirectport = "8443" type = "regxph" text = "yourobjectname"/>

Change to 9090, or use 9090 here ).

 

4.5. the Java/tomcat7/bin folder has been entered.

Input: sudo./starup. Sh

Start Tomcat 7.

If

Using catalina_base:/home/Administrator/Java/tomcat7

Using catalina_home:/home/Administrator/Java/tomcat7

Using catalina_tmpdir:/home/Administrator/Java/tomcat7/temp

Using jre_home:/home/Administrator/Java/jdk1.6.0 _ 23

Using classpath:/home/Administrator/Java/tomcat7/bin/Bootstrap. jar:/home/Administrator/Java/tomcat7/bin/tomcat-juli.jar

.

That is

Run http: // localhost: 9090:

 

4.6 if you want to disable Tomcat 7

Input: sudo./shutdown. Sh

From: http://www.cnblogs.com/yongfeng/archive/2010/12/14/1906004.html

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.