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
, it will be prompted to log in and download. After entering the account, it will be downloaded automatically.
(If you don't have an account, you can also register by email. The process is very simple.) The
download speed is the same as the previous Ubuntu image.
After the download is complete, drag the installation package to this folder
(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/
(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
Add the following content:
export JAVA_HOME=/opt/java/jdk1.8.0_261
export PATH= PATH: PATH:PATH: JAVA_HOME/bin
(4) Reload environment variable script
Terminal command: source /etc/profile
(5) Verify that Java is valid
java -version
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.