I. install jdk1. download jdk-6u24-linux-i586.bin2. move the file to the virtual machine shared folder/mnt/hgfs/VM-CentOS-shared3. move the file to usr/local. run. /jdk-6u24-linux-i586.bin5. add the following environment variable vi/etc/profile: exportJAVA_HOME =/usr/l 1. install jdk
1. download jdk-6u24-linux-i586.bin
2. move the file to the virtual machine shared folder/mnt/hgfs/VM-CentOS-shared
3. move the file to usr/local
4. run./jdk-6u24-linux-i586.bin
5. set the environment variable vi/etc/profile
Add as follows:
Export JAVA_HOME =/usr/local/jdk1.6.0 _ 24
Export PATH =.: $ JAVA_HOME/bin: PATH
Save profile
6. verify
Java
Javac
7. Complete
2. install tomcat
1. download apache-tomcat-6.0.44.tar.gz
2. share the shared folder to/mnt/hgfs/VM-CentOS-shared through the virtual machine
3. copy tomcat to usr/local
4. tar-zxvf apache-tomcat-6.0.44.tar.gz unzip the installation file and unzip it
5. go to/usr/local/apache-tomcat-6.0.44/bin.
Run./startup. sh
6. Verify. Open firefox and enter http: // localhost: 8080 to go to the tomcat main interface.
You can also use the built-in tomcat examples for verification.
Enter http: // localhost: 8080/examples to view examples such as the servlet that comes with tomcat.