解压安装jdk压缩包
wget http://xxxx/java/jdk-8u261-linux-x64.tar.gz
tar -zxvf jdk-8u261-linux-x64.tar.gz
安装java 环境变量
vim /etc/profile
set java environment
JAVA_HOME=/usr/local/java/jdk1.8.0_261
JRE_HOME=/usr/local/java/jdk1.8.0_261/jre
CLASS_PATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
export JAVA_HOME JRE_HOME CLASS_PATH PATH
生效环境变量
source /etc/profile
原创文章,作者:Carrie001128,如若转载,请注明出处:https://blog.ytso.com/tech/java/275391.html