Linux under Configuration installation Openjdk+tomcat

Source: Internet
Author: User

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

    • Note: The remote word to shut down the firewall firewall-cmd--set-default-zone=trusted

    • Remote Access http:/IP address 8080

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.