JDK:
Add the execution permission and execute the command. By default, the command is decompressed to the current directory:
Chmod U + x jdk-6u13-linux-i586.bin
/Jdk-6u13-linux-i586.bin
Environment variable:
Add environment variables to the profile. If the write to (/etc/profile) takes effect for all users, if it takes effect for only one user, write it to (/home/username/profile ).
Export java_home =/usr/Java/jdk1.6.0 _ 13
Export Path = $ path: $ java_home/bin: $ java_home/JRE/bin
Export classpath =.:/usr/Java/jdk1.6.0 _ 13/lib:/usr/Java/jdk1.6.0 _ 13/JRE/lib: $ classpath
View:
Echo $ path
Echo $ classpath
If not, run:
Source/etc/profile
Test:
Java-version
(Before installation, the default value is gcj. The constraints are displayed for uninstallation. Therefore, no matter whether the environment variable is configured)
Tomcat:
Unzip the package:
Tar-zxvf apache-tomcat-6.0.18.tar.gz
Environment variable: vi. bashrc
Export java_home =/usr/Java/jdk1.6.0 _ 13
Export classpath = $ classpath: $ java_home/lib: $ java_home/JRE/lib
Export Path = $ java_home/bin: $ java_home/JRE/bin: $ path: $ homr/bin
Export catalina_base =/usr/local/Apache-Tomcat-6.0.18
Export catalina_home =/usr/local/Apache-Tomcat-6.0.18
Make the same effect:
Source. bashrc
If you want to start it at startup, add:
/Usr/local/Apache-Tomcat-6.0.18/bin/startup. Sh