CentOS7安装JAVA

  1. 作者QQ:67065435 QQ群:821635552

  2. 本站内容全部为作者原创,转载请注明出处!

安装JAVA准备

  1. 检查是否安装JDK、JRE

    rpm -qa|grep -E 'jdk|jre'
    
  2. 卸载已安装JDK、JRE

源码安装JDK+JRE

  1. 命令行下载JDK

    cd /root
    wget -c https://note.so1234.top/linux/jdk-8u271-linux-x64.tar.gz
    tar -xf /root/jdk-8u271-linux-x64.tar.gz
    mv /root/jdk1.8.0_271 /usr/local/jdk
    
  2. 解压并配置环境变量

    vim /etc/profile
    
    export JAVA_HOME=/usr/local/jdk
    export JRE_HOME=$JAVA_HOME/jre
    export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
    export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
    
    ESC
    :wq
    
    source /etc/profile
    
  3. 检查安装是否成功

    java -version
    
    java version "1.8.0_101"
    Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
    Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)
    

安装maven

  1. 下载解压并安装

    cd /root
    wget http://mirrors.hust.edu.cn/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
    tar -xf apache-maven-3.6.3-bin.tar.gz
    mv /root/apache-maven-3.6.3 /usr/local/maven3
    
  2. 修改环境变量

    vim /etc/profile
    
    export PATH=$PATH:/usr/local/maven3/bin
    
    ESC
    :wq
    
    source /etc/profile
    
  3. 验证安装是否成功

    mvn -v
    

JAVA下载大全

JAVA jdk8

  1. macOS x64

  2. Windows x86

  3. Windows x64

  4. Linux ARM 64 RPM Package

  5. Linux ARM 32 Hard Float ABI
  6. Linux ARM 64 Compressed Archive

  7. Linux x86 RPM Package

  8. Linux x64 RPM Package

  9. Linux x86 Compressed Archive

  10. Linux x64 Compressed Archive

  11. Solaris x64

  12. Solaris x64 (SVR4 package)
  13. Solaris SPARC 64-bit
  14. Solaris SPARC 64-bit (SVR4 package)

JAVA jdk15

  1. macOS Installer
  2. macOS Compressed Archive

  3. Windows x64 Installer

  4. Windows x64 Compressed Archive

  5. Linux ARM 64 RPM Package

  6. Linux ARM 64 Compressed Archive

  7. Linux x64 RPM Package

  8. Linux x64 Debian Package
  9. Linux x64 Compressed Archive
Copyright © 豆包嘿嘿~ 2012-∞ 冀ICP备17033181号 all right reserved,powered by Gitbook修订: 21-06-15 16:29

results matching ""

    No results matching ""