Graphical tutorial for installing JDK1.8 under CentOS7.4

Linux installation JDK1.8 steps

1、 Check whether CentOS has its own openJDK. It is not recommended to use the built-in openJDK, so uninstall it first.

Enter the command "java -version", the following figure shows that it comes with openJDK

2、 Uninstall the built-in openJDK method:

Query files with java first: enter the command "rpm -qa|grep java" to delete java files other than .norach

Execute the delete command: "rpm -e -nodeps java-1.8.0-openjdk-headless"
Execute the delete command: "rpm -e -nodeps java-1.8.0-openjdk" (you can use the tab key to fill in automatically)

After the uninstallation is complete, start to download and install jdk.

3、 Download JDK

Select the corresponding jdk according to the number of bits in the system, and check the number of bits command "getconf LONG_BIT"

download link:

64 Bit: Link: https://pan.baidu.com/s/1tccc9tlwhCScmZp90urRGw Extraction code: wmvi

32 Bit: https://pan.baidu.com/s/1n3jtj0yaa091HZ0ZBYyJGA Extraction code: x25w

4、 Upload JDK

Use the rz command to upload, if there is no rz command, first use yum -y install lrzsz to install

5、 Unzip the JDK

Execute the command "tar -zxvf jdk-8u161-linux-x64.tar.gz"

6、 Configure environment variables

The environment variables of the windows operating system are configured through tools. On linux, the environment variables are stored in the profile file, open the file, and vim can modify it.

(You can also download and modify with sz and upload with rz, so I think editing is more convenient. Personal operation, unprofessional, do not spray!)

The configuration is as follows:

{ JAVA_HOME}/jre export CLASS_PATH=.:JAVAHOME/lib:{JRE_HOME}/lib:CLASSPATH export JAVA_PATH=JAVAHOME/bin:{JRE_HOME}/bin export PATH=PATH:{JAVA_PATH}

After the configuration is complete, execute the command "source /etc/profile" to make the file effective

7、 Verify that the installation is successful

Execute the command "java -version", the following installation is successful, consistent with windows

Recommended Posts

Graphical tutorial for installing JDK1.8 under CentOS7.4
Tutorial diagram for installing zabbix2.4 under centos6.5
Graphical tutorial for installing Pycharm 2020.1 in Ubuntu 20.04
Tutorial for deploying nginx+uwsgi in django project under Centos8
Install Java JDK8 under CentOS6
5.1. CentOS@ install JDK1.8 graphic tutorial
Detailed tutorial on installing JDK8 on Linux system (CentOS7 installation)
Install Mesos tutorial under CentOS7
Minimal install JDK 1.8 tutorial in CentOS 7
CentOS8 install jdk8 / java8 tutorial (recommended)
Detailed tutorial on installing python3.7 for ubuntu18
Detailed tutorial for installing CUDA9.0 on Ubuntu 16.04
Jenkins installation and deployment tutorial under CentOS 7
Detailed tutorial for installing phpMyAdmin on Ubuntu 18.04
Complete deployment record for LDAP under Centos7.2
Detailed tutorial on installing MySQL 8 in CentOS 7
Three ways to install JDK under CentOS
Install MySQL 5.7 under CentOS 7 for middle class children!
CentOS8 detailed tutorial for configuring local yum source
Notes on installing pptp server under CentOS 7 ok
Build LEMP (Linux+Nginx+MySQL+PHP) environment under CentOS 8.1 (detailed tutorial)
CentOS install jdk
Centos7 configure JDK
Installing CentOS 6 and SSH configuration under Windows 8 Hyper-V
Detailed tutorial of installing nginx on centos8 (graphic)
The tutorial for upgrading from Centos7 to Centos8 (detailed graphic)
Build a basic environment for Java development under Centos7
Environment configuration of JDK, mysql and tomcat under Centos7
Deploy GitBook under CentOS7
Compile Hadoop-2.7.6 under CentOS7.4
Install mysql5.7 under CentOS7
Centos install elasticsearch tutorial
Install ActiveMQ under Centos7
Install PostgreSQL12 under CentOS7
Install CentOS under VMware
Linux Centos7 install jdk1.8
Centos7 install kubernetes tutorial
Centos7 install Mysql8 tutorial
Deploy JDK+Tomcat8 under CentOS
Graphical installation of CentOS8
CentOS7 install JDK8, tomcat8
Install mysql under Centos 7
Configure lamp under centos6.8
Install Jenkins under Centos 7
Redis3 installation under Centos7
Install MariaDB under MariaDB Centos7
Install mysql5.1 under CentOS6.5
Linux CentOS 7 installation tutorial
ubuntu14.04 install jdk1.8 tutorial
Centos 7 install JDK (Linux install jdk)
Tutorial diagram of installing CentOS 8 (1905) system on VMware virtual machine
Detailed explanation of Spark installation and configuration tutorial under centOS7
Detailed steps for installing Django under Python 3.6 in Ubuntu 16.04 environment
Method steps for installing and configuring SSH service under Ubuntu 18.04