Redhat linux 9.0 installation of JDK and Tomcat5
First, JDK installation
1. Get JDK, address: https://sun.java.com Download j2sdk-1_4_2_06-linux-i586.bin
2. Place J2SDK-1_4_2_06-Linux-i586.bin under the directory you want to install (such as / usr / local)
3. Set J2SDK-1_4_2_06-Linux-i586.bin has executable permissions [root @ VLINUX local] # chmod x j2sdk-1_4_2_06-linux-i586.bin
4. Install JDK [root @ vlinux local] # ./j2sdk-1_4_2_06-linux-i586.bin After reading the license, enter Yes, complete the installation
5. At this point, you can see the full-loading directory / USR / local, the file directory J2SDK1.4.2_06 can be added to the convenience setting [root @ VLINUX local] # ln -s /usr/local/j2sdk1.4.2_06 / usr / local / jdk
6. Set environment variables [root @ VLinux local] # vi /etc/profile.d/java.sh INSERT The following statement: # set java environment export java_home = / usr / local / jdk export path = $ PATH: $ java_home / bin Export classpath = $ java_home / lib saved exit setting permissions are as follows: [Root @ VLINUX LOCAL] # chmod 755 /etc/profile.d/java.sh
7. Restart system [root @ VLinux local] # reboot
8. Login system test [root @ VLinux root] # Which java display: / usr / local / jdk / bin / java test success 2, Tomcat5 installation 1. Get Tomcat5, address: http://jakarta.apache.org/site /BININDEX.CGI Download JAKARTA-TOMCAT-5.0.28.tar.gz
2. Put Jakarta-Tomcat-5.0.28.tar.gz under the directory you want to install (such as / usr / local)
3. Unzip [root @ VLinux root] # tar -xvfz jakarta-tomcat-5.0.28.tar.gz
4. At this point, you can see the full-loading directory / usr / local with file directory JAKARTA-TOMCAT-5.0.28 for convenient settings, you can add software connection [root @ VLinux local] # ln -s / usr / local / jakarta -tomcat-5.0.28 / usr / local / Tomcat
5. Open /usr/local/tomcat/bin/catalina.sh Add to join two rows under the above annotation [root @ VLINUX LOCAL] # vi /usr/local/tomcat/bin/catalina.sh # Add below the above annotation Two lines: java_home = / usr / local / jdk catalina_home = / usr / local / tomcat 6. Run Tomcat [root @ VLinux local] # /usr/local/tomcat/bin/startup.sh
7. Enter: http:// Yourip: 8080 / If you see Tomcat The cat page is OK.