--------------JDK starts--------------
<!-- 1, installing JDK ---
<!--into/mnt/hgfs--
cd/mnt/hgfs/
Ls
CD Linux
<!--jdk-7u79-linux-i586.rpm copied to/usr/local
CP jdk-7u79-linux-i586.rpm/usr/local
<!--into/usr/local--
Cd/usr/local
<!--start installing jdk-7u79-linux-i586.rpm--
RPM-IVH jdk-7u79-linux-i586.rpm
<!-- 2, configuration environment --
<!--added on the last surface of the Etc/profile file
Export java_home=/usr/java/jdk1.7.0_79
Export Classpath=/usr/java/jdk1.7.0_79/lib
Export path= $JAVA _home/bin: $PATH
End of--------------JDK--------------
--------------Tomcat begins--------------
<!-- 1, installing Tomcat ---
<!--into/mnt/hgfs--
cd/mnt/hgfs/
Ls
CD Linux
<!--unzip apache-tomcat-7.0.2.tar.gz to/usr/local--
TAR-ZXVF apache-tomcat-7.0.2.tar.gz-c/usr/local/
<!--apache-tomcat-7.0.2 Rename Tomcat7--
Mv/usr/local/apache-tomcat-7.0.2/usr/local/tomcat7
<!-- 2, Tomcat start and end --
<!--into/usr/local/tomcat7/bin--
Cd/usr/local/tomcat7/bin
<!--start-up
./startup.sh
< end!---
./shutdown.sh
<!-- 3, view logs --
<!--into/usr/local/tomcat7/logs--
Cd/usr/local/tomcat7/logs
Tail-f Catalina.out
CTRL + C is exit tail command
--------------Tomcat End--------------
<!--Delete File command--
rm-rf/usr/local/jdk-7u79-linux-x64.rpm
You can use the CD command, the function of the CD command is to switch to the specified directory:
Command format:
CD [Directory name]
The directory name has a few symbols that have a special meaning, "..." Represents the previous directory, the "~" represents the home directory, and "-" represents the preceding catalog.
Therefore, you can use the command to return to the previous level directory:
Cd..
Installation and configuration of JDK and Tomcat under Linux