This paper is participating in the30 years of Linux”Topic essay activity
Step 1: Download JKD
There are many ways to download the JDK, and I’ll give you two:
- Download it from the official website.
- Share download through my Baidu cloud disk link.
1.1 download from the official website
First give the link, you can freely choose the version, because I develop jdK11, so I also choose JDK11 to download and install. Official website direct.
Click on this to download, this download is the Linux tar package, you can directly decompress the installation.
1.2 baidu web disk link
In view of some students’ Internet speed is not very good, or they want to pay for prostitution directly, I also directly provide the baidu cloud disk connection, the version is JDK11. (If the connection is down in the comment section or my personal name, I will fill it as soon as possible.)
Password is 6666
Step 2: Upload JDK to Linux
After downloading the JDK, we’ll start installing it. We’ll upload download good JDK package to Linux server, there are a lot of FTP software, before I was using a CRT | WinSCP, but then I found a better weapon: * MobaXterm *, it not only beautiful window, and drag-and-drop support file upload, even don’t have to input commands. Web disk link I also hang out:
Software connection
If you don’t know how to use this software, you can comment or send me a private message. If there are many people, I will also open a blog to discuss the basic use of this magic tool in detail.
Step 3: Install the JDK
To facilitate the management and viewing of software packages, create a soft file in the /usr directory, and create a tar file in the directory to store the compressed software packages.
#Access the /usr directory
cd /usr
#Create a folder named soft
mkdir soft
#Go to the Soft folder
cd soft
#Create a folder named tar
mkdir tar
#Unpack the JDKThe tar - ZXVF JDK - 11.0.9 _linux - x64_bin. Tar. GzCopy the code
After decompressing, you can use the terminal to rename operations.
Step 4. Configure environment variables
Like Windows, environment variables need to be configured on Linux.
vi /etc/profile
Copy the code
Add two sentences at the end:
#JAVA_HOME is your own JDK decompression directory
export JAVA_HOME=/usr/soft/jdk11
export PATH=$PATH:$JAVA_HOME/bin
Copy the code
Loading the configuration file takes effect:
source /etc/profile
Copy the code
Step 5: Test
Now that we’re done, we can start testing by typing the following command:
java
java -version
Copy the code
And you’re done! :black_heart: