Install the JDK
1. Use [rpm -qa | grep jdk] command to view the current version of the JDK;
2. Use [rpm -e --nodeps] to delete the current system comes with the JDK
2.1 【rpm -e --nodeps java-1.7.0-openjdk-1.7.0.191-2.6.15.5.el7.x86_64】
2.2 【rpm -e --nodeps java-1.7.0-openjdk-headless-1.7.0.191-2.6.15.5.el7.x86_64】
2.3 【rpm -e --nodeps java-1.8.0-openjdk-headless-1.8.0.181-7.b13.el7.x86_64】
2.4 【rpm -e --nodeps java-1.8.0-openjdk-1.8.0.181-7.b13.el7.x86_64】
3. Use [java -version] command to view the current version of the JDK
This happens it means that we have successfully deleted the JDK
4. Use [] * yum -y list java command to view the version that can be installed
5. Use {yum install -y java-1.8.0-openjdk-devel.x86_64] command to install JDK
Tomcat installation
1. Use [rz] command to download the compressed file uploaded to [/ usr / local directory]
2. Use [tar -zxvf apache-tomcat-7.0.99.tar.gz] command to extract the compressed file
3. You can enter [directory] /usr/local/apache-tomcat-7.0.99/conf
Directory has a server.conf file can modify the Tomcat port
4. Go to File [bin] directory, start Tomcat, the default port is 8080
5. Use [] command to start Tomcat ./startup.sh
6. Access Tomcat (IP address and port number of the machine)