Deploy the development environment JDK 6 + Tomcat 6 + MyEclipse6 in RedHat5

Source: Internet
Author: User
In other Linux versions, I use readhat5 and JDK 6, Tomcat 6, and MyEclipse6 to install JDK (1). the downloaded binfile can be directly run in Linux to change the permission: # Install the chmod755jdk-1.6.0_23-linux-i586.rpm.bin :#. /& nbs

In other Linux versions, I use readhat5 and JDK 6, Tomcat 6, and MyEclipse6.

Install JDK
(1) The downloaded binfile can be run directly in Linux.
Change permissions:

  1. # Chmod755Jdk-1.6. 0_23-linux-i586.rpm.bin
Install:
  1. #./Jdk-1.6. 0_23-linux-i586.rpm.bin
After this step is complete, a file for the jdk-1.6.0_23-linux-i586.rpm is generated
Install:
  1. # Rpm-ivh jdk-1.6. 0_23-linux-i586.rpm
Installed in/usr/java/jdk1.6.0 _ 23 by default
(2) Set environment variables in/etc/profile
Add the following content to the file header. modify the configuration according to the actual installation path:
  1. JAVA_HOME=/Usr/java/jdk1.6.0 _ 23
  2. JRE_HOME=/Usr/java/jdk1.6.0 _ 23/jre
  3. PATH= $ PATH: $ JAVA_HOME/bin: JRE_HOME/bin
  4. CLASSPATH=.: $ JAVA_HOME/lib/jt. jar: $ JAVA_HOME/lib/tools. jar: $ JRE_HOME/lib
  5. Export JAVA_HOME JRE_HOME PATH CLASSPATH
Press Esc, And then: wq save and exit
Make environment variables take effect
  1. # Source/etc/profile

# Echo $ JAVA_HOME

(The JDK directory is displayed)
In addition, many times, the following command is used to check whether the command takes effect.
  1. # Java-version
However, if you have installed Java before, printing is not the current version. We need to modify the reference of the java command.
Path:
  1. # Cd/usr/bin
Delete the application. Enter y when prompted:
  1. # Rm java

Add a new connection:

  1. # Ln-s/usr/java// Usr/java/jdk1.6.0 _ 23/java
Note:
If your java version is incorrect, it may cause exceptions when installing other software, such:

Cocould not find a valid configuration for intro part and Unable to locate the application's 'main' class

Download tomcat Linux
1. Download apache-tomcat-6.0.29.tar.gz
// Extract
2)

  1. # Tar-zxvf apache-tomcat-6.0.29.Tar.gz
3) copy the extracted file and add apache-tomcat-6.0.29 to a directory.
Copy the file to the bin directory in the folder.
4) start Tomcat
  1. #./Startup. sh
5) stop the service
  1. #./Shutdown. sh
Note:
If the process cannot be stopped, you can use Linux to kill the process. Run the kill command to terminate the process. -9 indicates that the process is forced to stop immediately.
  1. # Ps-ef | grep java
  2. # Kill-9[PID]
First, install Eclipse. Don't confuse it. MyEclipse is just a plug-in of Eclipse.
Download Eclipse Linux
1)download eclipse-sdk-3.3.1.1-linux-gtk.tar.gz
2) decompress
  1. # Tar-zxvf eclipse-SDK-3.3.1.1-Linux-gtk.tar.gz
3) copy the decompressed file and add eclipse to a directory.
4) Run eclipse in the copied directory

Install MyEclipse
Download MyEclipse Linux
1) download MyEclipse_6_0_1GA_E3_3_1_Installer.bin
2) Run and install

  1. #./MyEclipse_6_0_1GA_E3_3_1_Installer.bin
The installation page is the same as that in Windows. When selecting the Eclipse path, select the copied Eclipse path.
Installation path select a path based on the actual situation
After installation, run Eclipse again or run MyEclipse. sh under MyEclipse to open MyEclipse.

Enter the verification code below.
Configure Tomcat, select window-preferences in eclipse, select Myeclipse-Servers-Tomcat6 in the pop-up window
Select the Tomcat copy path and configure JDK 6, then select "Enable" on the Tomcat server, and Apply in the lower right corner to exit.

Create a project test for testing
Add the following content to index. jsp of the created web project:

  1. <% @ PageLanguage="Java" Import="Java. util .*" PageEncoding=UTF-8"%>
  2. >
  3. <Html>
  4. <Head>
  5. <Title>My service testing Title>
  6. Head>
  7. <Body>
  8. <% = System. getProperty ("java. version") %>
  9. Body>
  10. Html>
Access: http: // localhost: 8080/test/
Page output: 1.6.0 _ 23. This is the Java version used by the current service.
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.