Installation of JDK under CentOS (linux)


Installation of CentOS (linux) JDK

The first blog has some shortcomings, please give us more advice. ^^
There are a lot of JDK articles downloaded from Linux on the Internet and I won’t copy them.
This article describes how novices can skillfully install JDK under linux.

CentOS 7.4 (Tencent Cloud)
Java SE Development Kit 8u172 (JDK version is best stable, especially for our novice, the latest version of various pits…)
JDK Official Website Download

Xshell 6


wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie"

Wget: is a commonly used download instruction for linux. Wget is followed by the specified URL address for download. Linux Command Complete
Installation of JDK under CentOS (linux)


tar -zxvf jdk-8u172-linux-x64.tar.gz

Installation of JDK under CentOS (linux)

Tar instruction

Open WinSCP and you’ll see the JDK zip package and folder you just downloaded (both Xshell 6 and WinSCP login in the / root directory)
Installation of JDK under CentOS (linux)

Create a new directory (I call it Environment) and move the unzipped JDK folder into the new directory and rename it JDK (the advantage is that you don’t need to change the configuration file to upgrade jdk, just overwrite it directly)
Installation of JDK under CentOS (linux)

Open profile file under / etc
Installation of JDK under CentOS (linux)

Add code

#set java environment

Open Xshell 6 inputsource /etc/profileLet profile modifications take effect
Installation of JDK under CentOS (linux)

Enter againjava -versionDisplay the following content and configure successfully!
Installation of JDK under CentOS (linux)

This concludes the small white tutorial on JDK installation under CentOS (linux).

Recommended Today

Front-end core tools: yarn, NPM, and CNPM how can they be used together elegantly?

A front end that doesn’t work well with package managers is an entry-level front end that doesn’t work wellwebpackThe front end is a primary front end Three package managers can be used together, as long as you are bold enough, no problem! Recommend two articles Handwritten React scaffolding Handwritten Vue scaffolding Front-end performance optimization incomplete […]