Install Java JDK8 under CentOS6

1、 Oracle official website to download the Linux 64-bit installation package of JDK8

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

2、 Upload the installation package to CentOS server via SFTP

3、 Unzip to the specified directory/usr

[ root@localhost ~]# tar -zxvf jdk-8u201-linux-x64.tar.gz -C /usr

4、 Modify the environment variable vi /etc/profile

Add the following three lines at the end

export JAVA_HOME=/usr/jdk1.8.0_201

export PATH=PATH:JAVA_HOME/bin

export CLASSPATH=.:JAVA_HOME/lib/dt.jar:JAVA_HOME/lib/tools.jar

After saving, source /etc/profile makes the environment variable take effect immediately

5、 Verify that the JDK is installed successfully

java -version

javac compilation

java execution verification (java is followed by the class name in the java file)

Recommended Posts

Install Java JDK8 under CentOS6
CentOS 7 install JAVA environment (JDK 1.8)
CentOS install jdk
CentOS 7 install Java 1.8
CentOS 7 install Java 1.8
CentOS8 install jdk8 / java8 tutorial (recommended)
Install Java on Centos 7
Install mysql5.7 under CentOS7
Install ActiveMQ under Centos7
Install PostgreSQL12 under CentOS7
Linux Centos7 install jdk1.8
CentOS7 install JDK8, tomcat8
Install mysql under Centos 7
Install Jenkins under Centos 7
Install MariaDB under MariaDB Centos7
Install mysql5.1 under CentOS6.5
Three ways to install JDK under CentOS
Centos 7 install JDK (Linux install jdk)
CentOS6.5 install Java 8 and Tomcat8
Install Oracle11gR2 database under CentOS6.9
Install MySQL under Linux (CentOS 7)
CentOS6.5 install Java 8 and Tomcat8
CentOS6.5 install Java 8 and Tomcat8
5.1. CentOS@ install JDK1.8 graphic tutorial
Install MongoDB database under CentOS7
CentOS 6.8 under linux install mongodb
Install Mesos tutorial under CentOS7
1.5 Install Centos7
Centos 7 install jdk and package service service
How to install jdk1.8 on centOS7
Install and configure keepalived under CentOS 5.9
Compile and install LAMP under Centos 5.2
[Introduction to redis] Install redis under Centos
Minimal install JDK 1.8 tutorial in CentOS 7
Tencent Cloud Centos7 install java server
How to install Java on CentOS 8
Tencent Cloud Centos7 install java server
Linux CentOS 7 install JDK detailed steps
Install java in yum mode in Centos
Install JDK1.8 original under Ubuntu Kylin
Install Harbor mirror warehouse under CentOS
Centos7 uninstall openJdk, and install JDK1.8
Install Python3 and ansible under CentOS8
Install the latest OpenCV4.3 under Centos8
Install and use docker under CentOS 6.8
Install Python3 and Py under CentOS7
Install Mono 3.2 and Jexus 5.4 under CentOS 6.3
Centos6 install Python2.7.13
Compile and install libmodbus library under CentOS7
Centos7.3 install nginx
CentOS7.2 install Mysql5.7.13
CentOS install Redmine
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