Centos 7 下安装jdk 7

1、下载

  下载地址:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

  wget  http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz?AuthParam=1501245674_d144aea3e079467ce51816004a6d5ba0

2. 修改名字

  mv jdk-8u144-linux-x64.tar.gz?AuthParam=1501245674_d144aea3e079467ce51816004a6d5ba0   jdk-8u144-linux-x64.tar.gz

3. 解压并指定解压目录 /usr/local/

  tar -xvf jdk-8u144-linux-x64.tar.gz -C /usr/local/

4.配置环境

 vi /etc/profile

export JAVA_HOME=/usr/local/jdk1.8.0_144 
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar 
export PATH=$PATH:$JAVA_HOME/bin

posted on 2017-07-28 20:42  Xiaox-xin  阅读(165)  评论(0编辑  收藏  举报

导航