5.1. CentOS@ install JDK1.8 graphic tutorial

One, the first method windows download##

1. Download the tar package of jdk###

Website: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

2. Click Accept License Agreement

3. Select jdk-8u171-linux-x64.tar.gz to download###

4. Waiting...

5. Downloaded

6. Open VMware, select the virtual machine you want to use, and click to open this virtual machine###

7. For removable devices that pop up, tick Don’t show this reminder and click OK###

8. Minimize the virtual machine and leave it alone

9. Open xshell, select the session corresponding to the virtual machine ip, and click connect

10. The connection is successful

11. Check whether jdk has been installed through the rpm -qa | grep java command

12. My display is not installed. If it is installed, use the rpm -e xxx --nodeps command to load and unload. xxx means the name of the installation package you found through the rpm -qa | grep java command

12. Return to the root directory by cd / command###

13. Enter the local directory under the usr directory under the root directory through the cd usr/local/ command. This directory is for storing some local shared resources

14. Use the ll command to check the directory structure in the current directory. The ll command is short for the ls -l command, which is equivalent to the dir command in dos

15. Create a directory named java in the current directory with the mkdir java command###

16. Use the ll command to check the directory structure in the current directory, the java directory just created has

17. Enter the java directory through the cd java command###

18. Use the ll command to check the directory structure in the current directory###

19. Click on the window -->> Transfer the new file, and transfer the just downloaded jdk tar package to the CentOS7 system through the ftp protocol

20. The left side represents your computer system, and the right side represents the CentOS7 system

21. Find the download directory of your jdk tar package on the left###

22. Right-click on the file you want to transfer and click Transfer###

23. After the upload is successful, close the ftp transfer tool

24. Use the ll command to check the directory structure in the current directory, and a tar package named jdk-8u171-linux-x64.tar.gz appears

25. Decompress the tar package by tar -xvf jdk-8u171-linux-x64.tar.gz###

26. Use the ll command to check the directory structure in the current directory###

27. Delete the tar package through the rm -rf jdk-8u171-linux-x64.tar.gz command###

28. Use the ll command to check the directory structure in the current directory###

29. Clear the screen through the clear command, which is equivalent to the cls command in dos

30. Enter the jdk installation directory through the cd jdk1.8.0_171/ command###

31. Display the current directory through the pwd command, copy the current directory, because you will configure environment variables

32. Edit the configuration file of environment variables through the vim /etc/profile command###

33. Prompt that the command is not found. Install the vim text editor through the yum -y install vim command. I don’t use the vi text editor because I like highlighting###

34. Continue to edit the configuration file of environment variables through the vim /etc/profile command. Press the up key on the small keyboard to find the command you just entered, which is almost the same as dos

35. Press the down key of the small keyboard to come to the bottom of the configuration file###

36. Click the i button to enter the insert mode, and start a new line to be written into the environment variable configuration of java###

37. Write the following content, the value of JAVA_HOME is the path of the current directory displayed by the pwd command just now, if you forgot to see step 31###

export JAVA_HOME=/usr/local/java/jdk1.8.0_121

export CLASSPATH=.:JAVA_HOME/lib/tools.jar:JAVA_HOME/jre/lib/rt.jar

export PATH=JAVA_HOME/bin:PATH

38. Click the ESC key to exit insert mode

39. Click the: button, type wq and press Enter to save and exit, and: is ### in English

40. Clear the screen with the clear command

41. Use the source /etc/profile command to make the changed configuration take effect immediately

42. Use the java -version command and javac -version command to check whether the jdk is installed successfully

Second, the second method CentOS download

wget http://download.oracle.com/otn-pub/java/jdk/8u181-b13/96a7b8442fe848ef90c96a2fad6ed6d1/jdk-8u181-linux-x64.tar.gz?AuthParam=1534129356_6b3ac55c6a38ba5a54c912855deb6a22

Third, the third method yum download

1、 Search jdk installation package

# yum search java|grep jdk

2、 Download jdk1.8, the default directory after downloading is: /usr/lib/jvm/

# yum install java-1.8.0-openjdk

Recommended Posts

5.1. CentOS@ install JDK1.8 graphic tutorial
CentOS install jdk
Minimal install JDK 1.8 tutorial in CentOS 7
CentOS8 install jdk8 / java8 tutorial (recommended)
Centos install MYSQL8.X tutorial
Centos install elasticsearch tutorial
Linux Centos7 install jdk1.8
Centos7 install kubernetes tutorial
CentOS7 install JDK8, tomcat8
ubuntu14.04 install jdk1.8 tutorial
Centos 7 install JDK (Linux install jdk)
CentOS 7 install JAVA environment (JDK 1.8)
Linux Centos7 install redis tutorial
vmware install CentOS 7 detailed tutorial
CentOS 7 yum install PHP7.3 tutorial
Install Mesos tutorial under CentOS7
1.5 Install Centos7
Centos 7 install jdk and package service service
How to install jdk1.8 on centOS7
Linux CentOS 7 install JDK detailed steps
Install MySQL under Ubuntu 18.04 (graphic tutorial)
Centos7 uninstall openJdk, and install JDK1.8
Centos6 install Python2.7.13
CentOS 7 system installation and configuration graphic tutorial
Centos7.3 install nginx
CentOS7.2 install Mysql5.7.13
CentOS install Redmine
Centos 7 64-bit desktop version installation graphic tutorial
Graphic KVM to install CentOS7.6 operating system
Centos7 install Python 3.6.
CentOS7 install MySQL
Centos7 install protobuf
CentOS 7 install Docker
CentOS7 install GlusterFS
CentOS 7.4 install Zabbix 3.4
CentOS7 install Docker
Centos6.5 install Tomcat
CentOS install Python 3.6
centos7 install docker-ce 18.01.0
CentOS 7.2 install MariaDB
CentOS 7 install Hadoop 3.0.0
Centos7 install Python2.7
Centos 7.6 install seleniu
CentOS 7.3 install Zabbix3
Centos7 install LAMP+PHPmyadmin
CentOS install mysql
CentOS install openjdk 1.8
CENTOS6.5 install CDH5.12.1 (1)
CentOS install PHP
[Graphic] How to install tomcat on centos
Ubuntu20.04 steps to install cuda10.1 (graphic tutorial)
CentOS6 install mist.io
CentOS7 install mysql
CentOS 7 install MySQL 5.6
Graphical tutorial for installing JDK1.8 under CentOS7.4
CentOS6.5 install CDH5.13
Centos7 install docker18
Centos install Python3
centos7 install docker
centos7 install nginx-rtmp
Ubuntu18.04 install Nvidia graphics driver tutorial (graphic)