First, install the OPENJDK
Java has 2 jdk, one is Oracle's JDK, and the other is OpenJDK.
OpenJDK is used here as the Java development environment.
Install with Yum source
Yum Install java-1.8.0-openjdk-devel #java的编译环境yum install JAVA-1.8.0-OPENJDK #jre, Java operating environment
Run the following to verify whether the JDK was successfully installed:
Java-version
650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/9E/66/wKiom1mQPljiumRRAAAgrbqIUfw940.png "title=" KV () Hs5~_9o (2r3_6 (s6hab.png "alt=" Wkiom1mqpljiumrraaagrbqiufw940.png "/>
Adding environment variables
Export Java_home=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.102-4.b14.el7.x86_64export classpath=.: $JAVA _home/jre/lib /rt.jar: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jarexport path= $PATH: $JAVA _home/bin
Ii. installation of Tomcat
Download Tomcat and unzip it and copy it to the/usr/local/directory named Tomcat
wget tar-xf apache-tomcat-8.5.20.tar.gzcp-r Apache-tomcat-8.5.20/usr/local/tomcat
Start/close Tomcat
/usr/local/tomcat/bin/startup.sh #启动tomcat/usr/local/tomcat/bin/shutdown.sh #关闭tomcat
Verify that the installation is successful
In the browser input http://localhost:8080 will see a cat, the table-type success
Create a JSP file test
echo "
In the browser input http://localhost:8080/test.jsp will see the following time
650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M02/9E/66/wKiom1mQR1nTaV-UAAAMbFOSTw0859.png "title=" 1w]q$ 0b1a9ft8bbw21qp7f2.png "alt=" Wkiom1mqr1ntav-uaaambfostw0859.png "/>
--Recommend a technical Exchange QQ Group: 662787210
This article is from the "Time Stranded" blog, please make sure to keep this source http://vtime.blog.51cto.com/13201919/1955913
Configuring installation Openjdk+tomcat under Linux