Linux配置java环境
2018-12-18 本文已影响0人
猴子扔飞镖
## 下载jdk
http://www.oracle.com/technetwork/java/javase/downloads/index.html
jdk-8u191-linux-x64.tar.gz
## 创建java目录
cd /usr/local
mkdir java
cd /usr/local
mkdir java
cp /home/javauser/jdk-8u191-linux-x64.tar.gz /usr/local/java/
tar -zvxf jdk-8u191-linux-x64.tar.gz
## 环境变量
vim /etc/profile
export JAVA_HOME=/usr/local/java/jdk1.8.0_191
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=$JAVA_HOME/lib/
export PATH=$PATH:$JAVA_HOME/bin
:wq!
# source /etc/profile