linux 安装java

yum -y install lrzsz

yum  -y install zip unzip

unzip jdk1.8.0_171.zip

mv jdk1.8.0_171 /usr/local/

vi /etc/profile

export JAVA_HOME=/usr/local/jdk1.8.0_171/
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
source /etc/profile
posted @ 2019-04-23 14:33  bookc  阅读(218)  评论(0编辑  收藏  举报