Linux download installation configuration jdk11

1. Linux download and install jdk11

1. Download and unzip the installation

  1. Go to oracle official website to download jdk. Passed to the Linux server through ftp.
    https://www.oracle.com/technetwork/java/javase/downloads/index.html
    Insert picture description here

  2. Create address directory / usr / local / jdk

  3. Unzip

tar -xvf /other/jdk/文件名  -C 、usr/local/jdk

2. Configure the environment

  1. Configuration
vi /etc/profile

Add the following in the last line:

JAVA_HOME=/usr/local/jdk/jdk-11.0.5
JRE_HOME=$JAVA_HOME/
CLASSPATH=$JAVA_HOME/lib/

PATH=$PATH:$JAVA_HOME/bin

export PATH JAVA_HOME CLASSPATH

Insert picture description here
Note:
There is no jre folder in the unzipped directory. When you start Tomcat, you will find the jre directory.

  1. Make the configuration effective
source /etc/profile
  1. Check if the configuration is successful
java -version

Insert picture description here

2.linux download and install tomcat

  1. Download
    http://mirrors.hust.edu.cn/apache/tomcat/tomcat-9/v9.0.29/bin/ and
    upload it to the / other / tomcat file of Linux through ftp.

  2. Unzip

tar -xvf /other/tomcat/文件名 [-C 目标地址]

Insert picture description here

  1. Open port 8080
firewall-cmd --zone=public --add-port=8080/tcp --permanent    永久开启8080端口  
firewall-cmd --reload   重新载入  

Insert picture description here

  1. Start, stop tomcat
    into the bin directory, ./starup.sh to open tomcat, ./shutdown.sh to close tomcat
    Insert picture description here

  2. Set boot from boot

Published 28 original articles · Likes0 · Visits 900

Guess you like

Origin blog.csdn.net/weixin_43876557/article/details/103255174