Big data experiment environment preparation and configuration (2/4)

Big data experiment environment preparation and configuration (2/4)

Part 2: Installation and configuration of JDK software

(1)
There are two ways to download JDK software : online installation and manual installation by dragging the installation package.
Online installation is relatively simple, here is only the second one: download the jdk installation package on Windows, and then drag and drop it into the Ubuntu system to install. The
following is the official website
https://www.oracle.com/java/technologies/javase/ After clicking javase-jdk8-downloads.html
Insert picture description here
, it will be prompted to log in and download. After entering the account, it will be downloaded automatically.
Insert picture description here
(If you don't have an account, you can also register by email. The process is very simple.) The Insert picture description here
download speed is the same as the previous Ubuntu image.
Insert picture description here
After the download is complete, drag the installation package to this folder

Insert picture description here
(2) Enter the /opt directory, create a java folder, and then unzip the JDK to this folder.
Terminal command: sudo mkdir /opt/java
Terminal command: sudo tar -zxvf jdk-8u261-linux-x64.tar.gz -C /opt/java/
Insert picture description here
(3) Configure jdk environment variables (there are 2 ways, modify profile or .bashrc, you can choose one, you can learn the difference between the two) When
editing the profile, you use vim, which is different from the traditional text editor. It does not use the mouse to operate and requires special commands.
Vim operation tutorial: https:// www.runoob.com/linux/linux-vim.html

Terminal command: sudo vim /etc/profile
Insert picture description here

Add the following content:
export JAVA_HOME=/opt/java/jdk1.8.0_261
export PATH= PATH: PATH:PATH: JAVA_HOME/bin
Insert picture description here
(4) Reload environment variable script
Terminal command: source /etc/profile
Insert picture description here

(5) Verify that Java is valid
java -version
Insert picture description here
When the above verification is successful, the second part is completed. This part is relatively simple, and we will continue to update the follow-up, so stay tuned.

Guess you like

Origin blog.csdn.net/weixin_43640161/article/details/108619802