Install and uninstall tomcat in Linux jdk1.6

Source: Internet
Author: User
1. Download and install jdk1.6 1. Download the official address of jdk1.6: JDK 1) jdk-6u22-linux-i586.bin 2) jdk-6u22-linux-i586-rpm.bin 3, I downloaded jdk-6u22-linux-i586-rpm.bin 4, to all users to add executable permissions # chmod + x jdk-6u22-linux-i586-rpm.bin 5, execute the file, the command is as follows :#. /The jdk-6u22-linux-i586-rpm.bin will decompress some RPM packages after execution, where there is a jdk-6u22-linux-i586.rpm which is the main program package, next is to install this main package. 6. Switch to the root user, enter the jdk-6u22-linux-i586.rpm directory, execute the following command: rpm-IVH jdk-6u22-linux-i586.rpm installation software will automatically install JDK to the/usr/Java/jdk-1.6.0_22-fcs directory. 2. Configure environment variables after installing JDK. 1. Modify the user's environment variables. If the user using Java JDK is Oracle, edit the user's. bashrc file to set the environment variables. In. add the following to the bashrc file: # vi/home/Oracle /. bashrc export java_home =/usr/Java/jdk-1.6.0_22-fcs export classpath = $ classpath: $ java_home/lib: $ java_home/JRE/lib export Path = $ java_home/bin: $ java_home/JRE/bin: $ path: $ homr/bin Note: to change the file to take effect immediately, run $ source/home/Oracle /. bashrc will not take effect the next time you re-enter this user. If you do not configure environment variables in the/home/Oracle/. bashrc file, you can add the preceding configuration information to the/home/Oracle/. bash_profile file. 2. If all users want to share JDK environment variables, you can set them as follows. (But it is recommended that you do not use this method unless other users use other jkd files .) Add: # vi/etc/profile export java_home =/usr/Java/jdk-1.6.0_22-fcs export classpath = $ classpath: $ java_home/lib: $ java_home/JRE/lib export Path = $ java_home/bin: $ java_home/JRE/bin: $ path: $ homr/bin note: to change the file to take effect immediately, run # source/etc/profile. Otherwise, it will only take effect the next time you re-enter the user. Remember to add $ classpath to the classpath path: An error cannot be reported when the class file is interpreted and executed. 3. Uninstall JDK 1.6. Uninstall the JDK version that comes with the system: view the built-in JDK: # rpm-Qa | grep gcj. The following information is displayed: libgcj-4.1.2-44.el5 java-1.4.2-gcj-compat-1.4.2.0-40jpp.115 use the rpm-e -- nodeps command to delete the content found above: # rpm-e-nodeps java-1.4.2-gcj-compat-1.4.2.0-40jpp.115 2. Uninstall the jkd version of RPM installation view installed JDK: # rpm-Qa | grep JDK to see the following information: jdk-1.6.0_22-fcs uninstall: # rpm-e -- nodeps jdk-1.6.0_22-fcs ◆ 2. install Tomcat 1 download apache-tomcat-6.0.10.tar.gz 2) # tar-zxvf apache-tomcat-6.0.10.tar.gz; // unzip 3) # cp-r APACHE-Tomcat-6.0.10/usr/local/tomcat; // copy APACHE-Tomcat-6.0.10 to/usr/local/and rename it tomcat4) set catalina_home =/usr/local/tomcat5)/usr/local/tomcat/bin/startup in the environment variable. SH; // start Tomcat to display using catalina_base:/usr/local/tomcat using catalina_home:/usr/local/tomcat using catalina_temdir:/usr/local/tomcat/temp using java_home: /usr/Java/jdk1.6.0 _ 01

 

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.