first, prepare the package that needs to be installed to download the Linux JDK and tomcat i download here is the Linux system suffix named tar.gz package1. Compression command: Command format: Tar-ZCVF Compressed file name. tar.gz The compressed file name can be switched to the current directory first. Both the compressed file name and the compressed file name can be added to the path. 2. Unzip command: Command format: Tar-zxvf Compressed file name. tar.gz The extracted files can only be placed in the current directory3. CD first. Go back to the home directory and enter ll (lowercase ll) to view the folder and then go to the folder you want to install I am here to enter the home folder on the CD home and then enter LL to see if there is no duplicate folder you want to install the file in the new mkdir Java A new Java folder is created here.4then unzip your JDK package and the Tomcat package to extract the command on top.5. Unzip the CD all the time. Until there are no folders such as: [Root:localhost/]6add jdk7.0 to System environment variable input CP/etc/profile/etc/Profile.bak #备份6. Then enter the Vim etc/profile Edit the file input I insert edit into the edit interface with ↓ to move the cursor to the last7. Add the following lines at the end: Export Java_home=/home/java/jdk1.7Export CLASSPATH=.: $JAVA _home/jre/lib/rt.jar: $JAVA _home/lib/dt.jar: $JAVA _home/lib/Tools.jarexport PATH= $PATH: $JAVA _home/bin8. Press ESC and press SHIFT +: Enter command Wq save exit q!exit does not save9. Enter Source/etc/profile after execution and enter Java-version to see if the installation is complete10. Tomcat directly unzip the line, start the Tomcat method, go into your Tomcat unpacked folder to view the Tomcat version CD/home/tomcat/bin input./version.sh boot./startup.sh off./shutdown.sh reboot to see if Tomcat is turning off PS-ef|grep Java If the following similar information is displayed, Tomcat has not shut down copy code root8080 1 0 Apr19? 00:30:13/home/java/tomcat/bin/java-djava.util.logging.config.file=/home/java/tomcat/Temp org.apache.catalina.startup.Bootstrap Start*If you want to kill Tomcat directly, you can use the KILL command to kill the Tomcat process kill-9 8080If the following information is present, Tomcat has turned off root8080 1 0 Apr19? 00:30:30 [Java] <defunct>If you want to configure Tomcat User: Then go to Baidu, provide the blogger's address http://blog.csdn.net/gyming/article/details/36060843, but the above is not reproduced oh I personally wrote it
Linux system installation JDK and Tomcat