CentOS 7 安装 JDK 1.8
程序员文章站
2024-03-14 20:16:35
...
1、下载 URL
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
2、安装
#创建安装目录
mkdir /usr/local/java/
#解压
tar -zxvf jdk-8u231-linux-x64.tar.gz -C /usr/local/java/
3、配置环境
vim /etc/profile
export JAVA_HOME=/usr/local/java/jdk1.8.0_231
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
#立即生效
source /etc/profile
4、检查
[aaa@qq.com ~]# java -version
java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)
上一篇: Centos jdk1.8安装
下一篇: day002——HTML初接触