博客为日常工作学习积累总结:
1.安装JDK8
创建安装目录:mkdir /application/java8
解压-安装包自行下载:tar -zxf jdk-8u202-linux-x64.tar.gz -C /application/java8
配置系统环境:cd /application/java8/jdk1.8.0_202
vim /etc/profile
export JAVA_HOME=/application/java8/jdk1.8.0_202
export PATH=$PATH:$JAVA_HOME/bin
刷新系统环境: . /etc/profile source /etc/profile
测试安装是否成功:java -version
[root@mould jdk1.8.0_202]# . /etc/profile
[root@mould jdk1.8.0_202]# java -version
java version "1.8.0_202"
Java(TM) SE Runtime Environment (build 1.8.0_202-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode)