Install jdk and tomcat in CentOS
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.