精华内容
下载资源
问答
  • 2021-09-23 19:07:38

    ## 1. 检查系统是否已安装

    ```

    rpm -qa |grep java

    rpm -qa |grep jdk

    rpm -qa |grep gcj

    ```

    ## 2. 如果遇到有可以使用命令批量卸载所有带有Java的文件

    - rpm -qa | grep java | xargs rpm -e --nodeps 

    ## 3. 检索包含java的列表

    - yum list java-1.8*

    ## 4. 安装java1.8.0的所有文件

    - yum install java-1.8.0-openjdk* -y

    ## 5. 使用命令检查是否安装成功

    - java

    - javac

    ## 使用yum安装不需要配置环境变量

    更多相关内容
  • linux yum安装jdk

    千次阅读 2022-01-18 16:03:33
    linux 安装jdk1.0前言2.0 安装命令 我这里选择 yum 安装2.1 查看 jdk 版本列表2.2 安装jdk2.3 配置profile文件3.0 总结 1.0前言 因项目使用Java编写 ,搭建测试环境 需安装jdk 2.0 安装命令 我这里选择 yum 安装 2.1...

    1.0前言

    因项目使用Java编写 ,搭建测试环境 需安装jdk

    2.0 安装命令 我这里选择 yum 安装

    2.1 查看 jdk 版本列表

    yum -y list java*
    

    在这里插入图片描述

    2.2 安装jdk

    yum -y install 你所需jdk版本
    
    java -version 查看是否安装成功
    

    2.3 配置profile文件

    jdk默认安装在 /usr/lib/jvm 目录下

    使用 vi编辑器打开配置文件
    vi /etc/profile
    
    添加下方在文件末尾即可 版本不一致 修改版本即可
    export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.312.b07-2.al8.x86_64
    export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
    export PATH=$JAVA_HOME/bin:$PATH
    
    使配置生效
    source /etc/profile
    
    查看是否成功
    java -version
    

    成功
    在这里插入图片描述

    3.0 总结

    安装jdk比较简单,选择项目开发使用jdk’版本即可

    展开全文
  • Linux yum 安装 JDK 的方法

    千次阅读 2021-02-24 13:45:20
      Java 应用及一些开源组件都依赖于 JDK,所以很多情况下都需要在 Linux 系统下安装 JDK安装 JDK 有多种方法,yum 方式安装和手动安装都可以,本文简单总结记录下 yum 方式安装 JDK 的步骤。 一、查询要安装 JDK...

      Java 应用及一些开源组件都依赖于 JDK,所以很多情况下都需要在 Linux 系统下安装 JDK。安装 JDK 有多种方法,yum 方式安装和手动安装都可以,手动安装 JDK 的方法见 《Linux 手动安装 JDK 的方法》,本文简单总结记录下 yum 方式安装 JDK 的步骤。

    一、查询要安装 JDK 的版本
    [root@vmtest ~]# yum -y list java*
    Loaded plugins: fastestmirror, langpacks
    Determining fastest mirrors
    base                                                                                                                                                                                   | 3.6 kB  00:00:00     
    (1/2): base/1.1/x86_64/group_gz                                                                                                                                                        | 166 kB  00:00:00     
    (2/2): base/1.1/x86_64/primary_db                                                                                                                                                      | 5.0 MB  00:00:00     
    Available Packages
    java-1.6.0-openjdk.x86_64                                                                                     1:1.6.0.41-1.13.13.1.el7_3                                                                  base
    java-1.6.0-openjdk-demo.x86_64                                                                                1:1.6.0.41-1.13.13.1.el7_3                                                                  base
    java-1.6.0-openjdk-devel.x86_64                                                                               1:1.6.0.41-1.13.13.1.el7_3                                                                  base
    java-1.6.0-openjdk-javadoc.x86_64                                                                             1:1.6.0.41-1.13.13.1.el7_3                                                                  base
    java-1.6.0-openjdk-src.x86_64                                                                                 1:1.6.0.41-1.13.13.1.el7_3                                                                  base
    java-1.7.0-openjdk.x86_64                                                                                     1:1.7.0.191-2.6.15.4.el7_5                                                                  base
    java-1.7.0-openjdk-accessibility.x86_64                                                                       1:1.7.0.191-2.6.15.4.el7_5                                                                  base
    java-1.7.0-openjdk-demo.x86_64                                                                                1:1.7.0.191-2.6.15.4.el7_5                                                                  base
    java-1.7.0-openjdk-devel.x86_64                                                                               1:1.7.0.191-2.6.15.4.el7_5                                                                  base
    java-1.7.0-openjdk-headless.x86_64                                                                            1:1.7.0.191-2.6.15.4.el7_5                                                                  base
    java-1.7.0-openjdk-javadoc.noarch                                                                             1:1.7.0.191-2.6.15.4.el7_5                                                                  base
    java-1.7.0-openjdk-src.x86_64                                                                                 1:1.7.0.191-2.6.15.4.el7_5                                                                  base
    java-1.8.0-openjdk.x86_64                                                                                     1:1.8.0.181-3.b13.el7_5                                                                     base
    java-1.8.0-openjdk-accessibility.x86_64                                                                       1:1.8.0.181-3.b13.el7_5                                                                     base
    java-1.8.0-openjdk-accessibility-debug.x86_64                                                                 1:1.8.0.181-3.b13.el7_5                                                                     base
    java-1.8.0-openjdk-debug.x86_64                                                                               1:1.8.0.181-3.b13.el7_5                                                                     base
    java-1.8.0-openjdk-demo.x86_64                                                                                1:1.8.0.181-3.b13.el7_5                                                                     base
    java-1.8.0-openjdk-demo-debug.x86_64                                                                          1:1.8.0.181-3.b13.el7_5                                                                     base
    java-1.8.0-openjdk-devel.x86_64                                                                               1:1.8.0.181-3.b13.el7_5                                                                     base
    java-1.8.0-openjdk-devel-debug.x86_64                                                                         1:1.8.0.181-3.b13.el7_5                                                                     base
    java-1.8.0-openjdk-headless.x86_64                                                                            1:1.8.0.181-3.b13.el7_5                                                                     base
    java-1.8.0-openjdk-headless-debug.x86_64                                                                      1:1.8.0.181-3.b13.el7_5                                                                     base
    java-1.8.0-openjdk-javadoc.noarch                                                                             1:1.8.0.181-3.b13.el7_5                                                                     base
    java-1.8.0-openjdk-javadoc-debug.noarch                                                                       1:1.8.0.181-3.b13.el7_5                                                                     base
    java-1.8.0-openjdk-javadoc-zip.noarch                                                                         1:1.8.0.181-3.b13.el7_5                                                                     base
    java-1.8.0-openjdk-javadoc-zip-debug.noarch                                                                   1:1.8.0.181-3.b13.el7_5                                                                     base
    java-1.8.0-openjdk-src.x86_64                                                                                 1:1.8.0.181-3.b13.el7_5                                                                     base
    java-1.8.0-openjdk-src-debug.x86_64                                                                           1:1.8.0.181-3.b13.el7_5                                                                     base
    java-atk-wrapper.x86_64                                                                                       0.30.4-5.el7                                                                                base
    java_cup.noarch                                                                                               1:0.11a-16.el7                                                                              base
    java_cup-javadoc.noarch                                                                                       1:0.11a-16.el7                                                                              base
    java_cup-manual.noarch                                                                                        1:0.11a-16.el7                                                                              base
    javacc.noarch                                                                                                 5.0-10.el7                                                                                  base
    javacc-demo.noarch                                                                                            5.0-10.el7                                                                                  base
    javacc-javadoc.noarch                                                                                         5.0-10.el7                                                                                  base
    javacc-manual.noarch                                                                                          5.0-10.el7                                                                                  base
    javacc-maven-plugin.noarch                                                                                    2.6-17.el7                                                                                  base
    javacc-maven-plugin-javadoc.noarch                                                                            2.6-17.el7                                                                                  base
    javamail.noarch                                                                                               1.4.6-8.el7                                                                                 base
    javamail-javadoc.noarch                                                                                       1.4.6-8.el7                                                                                 base
    javapackages-tools.noarch                                                                                     3.4.1-11.el7                                                                                base
    javassist.noarch                                                                                              3.16.1-10.el7                                                                               base
    javassist-javadoc.noarch                                                                                      3.16.1-10.el7                                                                               base 
    
    二、安装 JDK1.8 版本

      上述结果显示,有诸多版本的 JDK 可供选择,以下选择 java-1.8.0-openjdk.x86_64 版本进行安装。

    [root@vmtest ~]# yum install -y java-1.8.0-openjdk.x86_64
    -------------------------------------------此处省略安装过程中的部分日志----------------------------------------------------------
    Installed:
      java-1.8.0-openjdk.x86_64 1:1.8.0.181-3.b13.el7_5                                                                                                                                                           
    
    Dependency Installed:
      copy-jdk-configs.noarch 0:3.3-10.el7_5         java-1.8.0-openjdk-headless.x86_64 1:1.8.0.181-3.b13.el7_5         javapackages-tools.noarch 0:3.4.1-11.el7         libxslt.x86_64 0:1.1.28-5.el7         
      lksctp-tools.x86_64 0:1.0.17-2.el7             python-javapackages.noarch 0:3.4.1-11.el7                          python-lxml.x86_64 0:3.2.1-4.el7                 ttmkfdir.x86_64 0:3.0.9-42.el7        
      tzdata-java.noarch 0:2018e-3.el7               xorg-x11-fonts-Type1.noarch 0:7.5-9.el7                           
    
    Complete!
    

      最后出现 “Complete!” 则显示安装完成。

    三、安装完成后查看 JDK 版本信息
    [root@vmtest ~]# java -version
    openjdk version "1.8.0_181"
    OpenJDK Runtime Environment (build 1.8.0_181-b13)
    OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
    

      上述结果显示最终 JDK 正确安装完成,版本是 “1.8.0_181”。

    展开全文
  • Linux使用yum安装JDK

    千次阅读 2022-01-08 18:08:54
    Linux使用yum安装JDK 1、使用命令搜索JDK版本 yum search java|grep jdk [root@VM-12-11-centos ~]# yum search java|grep jdk ldapjdk-javadoc.noarch : Javadoc for ldapjdk openjdk-asmtools-javadoc.noarch : ...

    Linux使用yum安装JDK

    1、使用命令搜索JDK版本

    yum search java|grep jdk
    

    [root@VM-12-11-centos ~]# yum search java|grep jdk
    ldapjdk-javadoc.noarch : Javadoc for ldapjdk
    openjdk-asmtools-javadoc.noarch : Javadoc for openjdk-asmtools
    java-1.6.0-openjdk.x86_64 : OpenJDK Runtime Environment
    java-1.6.0-openjdk-demo.x86_64 : OpenJDK Demos
    java-1.6.0-openjdk-devel.x86_64 : OpenJDK Development Environment
    java-1.6.0-openjdk-javadoc.x86_64 : OpenJDK API Documentation
    java-1.6.0-openjdk-src.x86_64 : OpenJDK Source Bundle
    java-1.7.0-openjdk.x86_64 : OpenJDK Runtime Environment
    java-1.7.0-openjdk-accessibility.x86_64 : OpenJDK accessibility connector
    java-1.7.0-openjdk-demo.x86_64 : OpenJDK Demos
    java-1.7.0-openjdk-devel.x86_64 : OpenJDK Development Environment
    java-1.7.0-openjdk-headless.x86_64 : The OpenJDK runtime environment without
    java-1.7.0-openjdk-javadoc.noarch : OpenJDK API Documentation
    java-1.7.0-openjdk-src.x86_64 : OpenJDK Source Bundle
    java-1.8.0-openjdk.i686 : OpenJDK Runtime Environment 8
    java-1.8.0-openjdk.x86_64 : OpenJDK 8 Runtime Environment
    java-1.8.0-openjdk-accessibility.i686 : OpenJDK accessibility connector
    java-1.8.0-openjdk-accessibility.x86_64 : OpenJDK accessibility connector
    java-1.8.0-openjdk-demo.i686 : OpenJDK Demos 8
    java-1.8.0-openjdk-demo.x86_64 : OpenJDK 8 Demos
    java-1.8.0-openjdk-devel.i686 : OpenJDK Development Environment 8
    java-1.8.0-openjdk-devel.x86_64 : OpenJDK 8 Development Environment
    java-1.8.0-openjdk-headless.i686 : OpenJDK Headless Runtime Environment 8
    java-1.8.0-openjdk-headless.x86_64 : OpenJDK 8 Headless Runtime Environment
    java-1.8.0-openjdk-javadoc.noarch : OpenJDK 8 API documentation
    java-1.8.0-openjdk-javadoc-zip.noarch : OpenJDK 8 API documentation compressed
    java-1.8.0-openjdk-src.i686 : OpenJDK Source Bundle 8
    java-1.8.0-openjdk-src.x86_64 : OpenJDK 8 Source Bundle
    java-11-openjdk.i686 : OpenJDK Runtime Environment 11
    java-11-openjdk.x86_64 : OpenJDK 11 Runtime Environment
    java-11-openjdk-demo.i686 : OpenJDK Demos 11
    java-11-openjdk-demo.x86_64 : OpenJDK 11 Demos
    java-11-openjdk-devel.i686 : OpenJDK Development Environment 11
    java-11-openjdk-devel.x86_64 : OpenJDK 11 Development Environment
    java-11-openjdk-headless.i686 : OpenJDK Headless Runtime Environment 11
    java-11-openjdk-headless.x86_64 : OpenJDK 11 Headless Runtime Environment
    java-11-openjdk-javadoc.i686 : OpenJDK 11 API documentation
    java-11-openjdk-javadoc.x86_64 : OpenJDK 11 API documentation
    java-11-openjdk-javadoc-zip.i686 : OpenJDK 11 API documentation compressed in a
    java-11-openjdk-javadoc-zip.x86_64 : OpenJDK 11 API documentation compressed in
    java-11-openjdk-jmods.i686 : JMods for OpenJDK 11
    java-11-openjdk-jmods.x86_64 : JMods for OpenJDK 11
    java-11-openjdk-src.i686 : OpenJDK Source Bundle 11
    java-11-openjdk-src.x86_64 : OpenJDK 11 Source Bundle
    java-11-openjdk-static-libs.i686 : OpenJDK libraries for static linking 11
    java-11-openjdk-static-libs.x86_64 : OpenJDK 11 libraries for static linking
    java-latest-openjdk.x86_64 : OpenJDK 17 Runtime Environment
    java-latest-openjdk-debug.x86_64 : OpenJDK 17 Runtime Environment with full
    java-latest-openjdk-demo.x86_64 : OpenJDK 17 Demos
    java-latest-openjdk-demo-debug.x86_64 : OpenJDK 17 Demos with full debugging on
    java-latest-openjdk-demo-fastdebug.x86_64 : OpenJDK 17 Demos with minimal
    java-latest-openjdk-devel.x86_64 : OpenJDK 17 Development Environment
    java-latest-openjdk-devel-debug.x86_64 : OpenJDK 17 Development Environment with
    java-latest-openjdk-devel-fastdebug.x86_64 : OpenJDK 17 Development Environment
    java-latest-openjdk-fastdebug.x86_64 : OpenJDK 17 Runtime Environment with
    java-latest-openjdk-headless.x86_64 : OpenJDK 17 Headless Runtime Environment
    java-latest-openjdk-headless-debug.x86_64 : OpenJDK 17 Runtime Environment with
    java-latest-openjdk-headless-fastdebug.x86_64 : OpenJDK 17 Runtime Environment
    java-latest-openjdk-javadoc.x86_64 : OpenJDK 17 API documentation
    java-latest-openjdk-javadoc-zip.x86_64 : OpenJDK 17 API documentation compressed
    java-latest-openjdk-jmods.x86_64 : JMods for OpenJDK 17
    java-latest-openjdk-jmods-debug.x86_64 : JMods for OpenJDK 17 with full
    java-latest-openjdk-jmods-fastdebug.x86_64 : JMods for OpenJDK 17 with minimal
    java-latest-openjdk-src.x86_64 : OpenJDK 17 Source Bundle
    java-latest-openjdk-src-debug.x86_64 : OpenJDK 17 Source Bundle for packages
    java-latest-openjdk-src-fastdebug.x86_64 : OpenJDK 17 Source Bundle
    java-latest-openjdk-static-libs.x86_64 : OpenJDK 17 libraries for static linking
    java-latest-openjdk-static-libs-debug.x86_64 : OpenJDK 17 libraries for static
    java-latest-openjdk-static-libs-fastdebug.x86_64 : OpenJDK 17 libraries for
    ldapjdk.noarch : The Mozilla LDAP Java SDK
    openjdk-asmtools.noarch : To develop tools create proper & improper Java

    2、选择版本进行安装

    yum install -y java-11-openjdk-static-libs.x86_64
    

    [root@VM-12-11-centos ~]# yum install -y java-11-openjdk-static-libs.x86_64
    Loaded plugins: fastestmirror, langpacks
    Loading mirror speeds from cached hostfile
    Resolving Dependencies
    –> Running transaction check
    —> Package java-11-openjdk-static-libs.x86_64 1:11.0.13.0.8-1.el7_9 will be installed
    –> Processing Dependency: java-11-openjdk-devel(x86-64) = 1:11.0.13.0.8-1.el7_9 for package: 1:java-11-openjdk-static-libs-11.0.13.0.8-1.el7_9.x86_64
    –> Running transaction check
    —> Package java-11-openjdk-devel.x86_64 1:11.0.13.0.8-1.el7_9 will be installed
    –> Processing Dependency: java-11-openjdk(x86-64) = 1:11.0.13.0.8-1.el7_9 for package: 1:java-11-openjdk-devel-11.0.13.0.8-1.el7_9.x86_64
    –> Running transaction check
    —> Package java-11-openjdk.x86_64 1:11.0.13.0.8-1.el7_9 will be installed
    –> Processing Dependency: java-11-openjdk-headless(x86-64) = 1:11.0.13.0.8-1.el7_9 for package: 1:java-11-openjdk-11.0.13.0.8-1.el7_9.x86_64
    –> Processing Dependency: xorg-x11-fonts-Type1 for package: 1:java-11-openjdk-11.0.13.0.8-1.el7_9.x86_64
    –> Processing Dependency: libjvm.so()(64bit) for package: 1:java-11-openjdk-11.0.13.0.8-1.el7_9.x86_64
    –> Processing Dependency: libjava.so()(64bit) for package: 1:java-11-openjdk-11.0.13.0.8-1.el7_9.x86_64
    –> Processing Dependency: libgif.so.4()(64bit) for package: 1:java-11-openjdk-11.0.13.0.8-1.el7_9.x86_64
    –> Processing Dependency: libXtst.so.6()(64bit) for package: 1:java-11-openjdk-11.0.13.0.8-1.el7_9.x86_64
    –> Running transaction check
    —> Package giflib.x86_64 0:4.1.6-9.el7 will be installed
    –> Processing Dependency: libSM.so.6()(64bit) for package: giflib-4.1.6-9.el7.x86_64
    –> Processing Dependency: libICE.so.6()(64bit) for package: giflib-4.1.6-9.el7.x86_64
    —> Package java-11-openjdk-headless.x86_64 1:11.0.13.0.8-1.el7_9 will be installed
    –> Processing Dependency: tzdata-java >= 2020f for package: 1:java-11-openjdk-headless-11.0.13.0.8-1.el7_9.x86_64
    –> Processing Dependency: copy-jdk-configs >= 3.3 for package: 1:java-11-openjdk-headless-11.0.13.0.8-1.el7_9.x86_64
    –> Processing Dependency: pcsc-lite-libs(x86-64) for package: 1:java-11-openjdk-headless-11.0.13.0.8-1.el7_9.x86_64
    –> Processing Dependency: lksctp-tools(x86-64) for package: 1:java-11-openjdk-headless-11.0.13.0.8-1.el7_9.x86_64
    –> Processing Dependency: javapackages-tools for package: 1:java-11-openjdk-headless-11.0.13.0.8-1.el7_9.x86_64
    —> Package libXtst.x86_64 0:1.2.3-1.el7 will be installed
    —> Package xorg-x11-fonts-Type1.noarch 0:7.5-9.el7 will be installed
    –> Processing Dependency: ttmkfdir for package: xorg-x11-fonts-Type1-7.5-9.el7.noarch
    –> Processing Dependency: ttmkfdir for package: xorg-x11-fonts-Type1-7.5-9.el7.noarch
    –> Processing Dependency: mkfontdir for package: xorg-x11-fonts-Type1-7.5-9.el7.noarch
    –> Processing Dependency: mkfontdir for package: xorg-x11-fonts-Type1-7.5-9.el7.noarch
    –> Running transaction check
    —> Package copy-jdk-configs.noarch 0:3.3-10.el7_5 will be installed
    —> Package javapackages-tools.noarch 0:3.4.1-11.el7 will be installed
    –> Processing Dependency: python-javapackages = 3.4.1-11.el7 for package: javapackages-tools-3.4.1-11.el7.noarch
    –> Processing Dependency: libxslt for package: javapackages-tools-3.4.1-11.el7.noarch
    —> Package libICE.x86_64 0:1.0.9-9.el7 will be installed
    —> Package libSM.x86_64 0:1.2.2-2.el7 will be installed
    —> Package lksctp-tools.x86_64 0:1.0.17-2.el7 will be installed
    —> Package pcsc-lite-libs.x86_64 0:1.8.8-8.el7 will be installed
    —> Package ttmkfdir.x86_64 0:3.0.9-42.el7 will be installed
    —> Package tzdata-java.noarch 0:2021e-1.el7 will be installed
    —> Package xorg-x11-font-utils.x86_64 1:7.5-21.el7 will be installed
    –> Processing Dependency: libfontenc.so.1()(64bit) for package: 1:xorg-x11-font-utils-7.5-21.el7.x86_64
    –> Running transaction check
    —> Package libfontenc.x86_64 0:1.1.3-3.el7 will be installed
    —> Package libxslt.x86_64 0:1.1.28-6.el7 will be installed
    —> Package python-javapackages.noarch 0:3.4.1-11.el7 will be installed
    –> Processing Dependency: python-lxml for package: python-javapackages-3.4.1-11.el7.noarch
    –> Running transaction check
    —> Package python-lxml.x86_64 0:3.2.1-4.el7 will be installed
    –> Finished Dependency Resolution

    Dependencies Resolved

    ================================================================================================================================================================================================================================================================================================================================================================================================================

    Package Arch Version Repository Size

    Installing:
    java-11-openjdk-static-libs x86_64 1:11.0.13.0.8-1.el7_9 updates 15 M
    Installing for dependencies:
    copy-jdk-configs noarch 3.3-10.el7_5 os 21 k
    giflib x86_64 4.1.6-9.el7 os 40 k
    java-11-openjdk x86_64 1:11.0.13.0.8-1.el7_9 updates 233 k
    java-11-openjdk-devel x86_64 1:11.0.13.0.8-1.el7_9 updates 3.4 M
    java-11-openjdk-headless x86_64 1:11.0.13.0.8-1.el7_9 updates 39 M
    javapackages-tools noarch 3.4.1-11.el7 os 73 k
    libICE x86_64 1.0.9-9.el7 os 66 k
    libSM x86_64 1.2.2-2.el7 os 39 k
    libXtst x86_64 1.2.3-1.el7 os 20 k
    libfontenc x86_64 1.1.3-3.el7 os 31 k
    libxslt x86_64 1.1.28-6.el7 os 242 k
    lksctp-tools x86_64 1.0.17-2.el7 os 88 k
    pcsc-lite-libs x86_64 1.8.8-8.el7 os 34 k
    python-javapackages noarch 3.4.1-11.el7 os 31 k
    python-lxml x86_64 3.2.1-4.el7 os 758 k
    ttmkfdir x86_64 3.0.9-42.el7 os 48 k
    tzdata-java noarch 2021e-1.el7 updates 190 k
    xorg-x11-font-utils x86_64 1:7.5-21.el7 os 104 k
    xorg-x11-fonts-Type1 noarch 7.5-9.el7 os 521 k

    Transaction Summary

    Install 1 Package (+19 Dependent packages)

    Total download size: 60 M
    Installed size: 287 M
    Downloading packages:
    (1/20): copy-jdk-configs-3.3-10.el7_5.noarch.rpm | 21 kB 00:00:00
    (2/20): giflib-4.1.6-9.el7.x86_64.rpm | 40 kB 00:00:00
    (3/20): java-11-openjdk-11.0.13.0.8-1.el7_9.x86_64.rpm | 233 kB 00:00:00
    (4/20): java-11-openjdk-devel-11.0.13.0.8-1.el7_9.x86_64.rpm | 3.4 MB 00:00:01
    (5/20): javapackages-tools-3.4.1-11.el7.noarch.rpm | 73 kB 00:00:00
    (6/20): libICE-1.0.9-9.el7.x86_64.rpm | 66 kB 00:00:00
    (7/20): libSM-1.2.2-2.el7.x86_64.rpm | 39 kB 00:00:00
    (8/20): libXtst-1.2.3-1.el7.x86_64.rpm | 20 kB 00:00:00
    (9/20): libfontenc-1.1.3-3.el7.x86_64.rpm | 31 kB 00:00:00
    (10/20): lksctp-tools-1.0.17-2.el7.x86_64.rpm | 88 kB 00:00:00
    (11/20): pcsc-lite-libs-1.8.8-8.el7.x86_64.rpm | 34 kB 00:00:00
    (12/20): libxslt-1.1.28-6.el7.x86_64.rpm | 242 kB 00:00:00
    (13/20): python-javapackages-3.4.1-11.el7.noarch.rpm | 31 kB 00:00:00
    (14/20): ttmkfdir-3.0.9-42.el7.x86_64.rpm | 48 kB 00:00:00
    (15/20): python-lxml-3.2.1-4.el7.x86_64.rpm | 758 kB 00:00:00
    (16/20): java-11-openjdk-headless-11.0.13.0.8-1.el7_9.x86_64.rpm | 39 MB 00:00:02
    (17/20): java-11-openjdk-static-libs-11.0.13.0.8-1.el7_9.x86_64.rpm | 15 MB 00:00:02
    (18/20): tzdata-java-2021e-1.el7.noarch.rpm | 190 kB 00:00:00
    (19/20): xorg-x11-font-utils-7.5-21.el7.x86_64.rpm | 104 kB 00:00:00

    (20/20): xorg-x11-fonts-Type1-7.5-9.el7.noarch.rpm | 521 kB 00:00:00

    Total 15 MB/s | 60 MB 00:00:03
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
    Installing : libICE-1.0.9-9.el7.x86_64 1/20
    Installing : libxslt-1.1.28-6.el7.x86_64 2/20
    Installing : python-lxml-3.2.1-4.el7.x86_64 3/20
    Installing : python-javapackages-3.4.1-11.el7.noarch 4/20
    Installing : javapackages-tools-3.4.1-11.el7.noarch 5/20
    Installing : libSM-1.2.2-2.el7.x86_64 6/20
    Installing : giflib-4.1.6-9.el7.x86_64 7/20
    Installing : copy-jdk-configs-3.3-10.el7_5.noarch 8/20
    Installing : lksctp-tools-1.0.17-2.el7.x86_64 9/20
    Installing : libfontenc-1.1.3-3.el7.x86_64 10/20
    Installing : 1:xorg-x11-font-utils-7.5-21.el7.x86_64 11/20
    Installing : tzdata-java-2021e-1.el7.noarch 12/20
    Installing : pcsc-lite-libs-1.8.8-8.el7.x86_64 13/20
    Installing : 1:java-11-openjdk-headless-11.0.13.0.8-1.el7_9.x86_64 14/20
    Installing : libXtst-1.2.3-1.el7.x86_64 15/20
    Installing : ttmkfdir-3.0.9-42.el7.x86_64 16/20
    Installing : xorg-x11-fonts-Type1-7.5-9.el7.noarch 17/20
    Installing : 1:java-11-openjdk-11.0.13.0.8-1.el7_9.x86_64 18/20
    Installing : 1:java-11-openjdk-devel-11.0.13.0.8-1.el7_9.x86_64 19/20
    Installing : 1:java-11-openjdk-static-libs-11.0.13.0.8-1.el7_9.x86_64 20/20
    Verifying : 1:java-11-openjdk-headless-11.0.13.0.8-1.el7_9.x86_64 1/20
    Verifying : 1:java-11-openjdk-11.0.13.0.8-1.el7_9.x86_64 2/20
    Verifying : 1:xorg-x11-font-utils-7.5-21.el7.x86_64 3/20
    Verifying : libxslt-1.1.28-6.el7.x86_64 4/20
    Verifying : libICE-1.0.9-9.el7.x86_64 5/20
    Verifying : giflib-4.1.6-9.el7.x86_64 6/20
    Verifying : xorg-x11-fonts-Type1-7.5-9.el7.noarch 7/20
    Verifying : libSM-1.2.2-2.el7.x86_64 8/20
    Verifying : python-javapackages-3.4.1-11.el7.noarch 9/20
    Verifying : ttmkfdir-3.0.9-42.el7.x86_64 10/20
    Verifying : 1:java-11-openjdk-static-libs-11.0.13.0.8-1.el7_9.x86_64 11/20
    Verifying : python-lxml-3.2.1-4.el7.x86_64 12/20
    Verifying : libXtst-1.2.3-1.el7.x86_64 13/20
    Verifying : pcsc-lite-libs-1.8.8-8.el7.x86_64 14/20
    Verifying : javapackages-tools-3.4.1-11.el7.noarch 15/20
    Verifying : tzdata-java-2021e-1.el7.noarch 16/20
    Verifying : libfontenc-1.1.3-3.el7.x86_64 17/20
    Verifying : lksctp-tools-1.0.17-2.el7.x86_64 18/20
    Verifying : copy-jdk-configs-3.3-10.el7_5.noarch 19/20
    Verifying : 1:java-11-openjdk-devel-11.0.13.0.8-1.el7_9.x86_64 20/20

    Installed:
    java-11-openjdk-static-libs.x86_64 1:11.0.13.0.8-1.el7_9

    Dependency Installed:
    copy-jdk-configs.noarch 0:3.3-10.el7_5 giflib.x86_64 0:4.1.6-9.el7 java-11-openjdk.x86_64 1:11.0.13.0.8-1.el7_9 java-11-openjdk-devel.x86_64 1:11.0.13.0.8-1.el7_9 java-11-openjdk-headless.x86_64 1:11.0.13.0.8-1.el7_9 javapackages-tools.noarch 0:3.4.1-11.el7 libICE.x86_64 0:1.0.9-9.el7 libSM.x86_64 0:1.2.2-2.el7
    libXtst.x86_64 0:1.2.3-1.el7 libfontenc.x86_64 0:1.1.3-3.el7 libxslt.x86_64 0:1.1.28-6.el7 lksctp-tools.x86_64 0:1.0.17-2.el7 pcsc-lite-libs.x86_64 0:1.8.8-8.el7 python-javapackages.noarch 0:3.4.1-11.el7 python-lxml.x86_64 0:3.2.1-4.el7 ttmkfdir.x86_64 0:3.0.9-42.el7
    tzdata-java.noarch 0:2021e-1.el7 xorg-x11-font-utils.x86_64 1:7.5-21.el7 xorg-x11-fonts-Type1.noarch 0:7.5-9.el7

    Complete!

    3、测试是否安装成功

    java -version
    

    [root@VM-12-11-centos ~]# java -version
    openjdk version “11.0.13” 2021-10-19 LTS
    OpenJDK Runtime Environment 18.9 (build 11.0.13+8-LTS)
    OpenJDK 64-Bit Server VM 18.9 (build 11.0.13+8-LTS, mixed mode, sharing)

    展开全文
  • Linux使用 yum安装JDK1.8

    千次阅读 2021-12-03 23:21:44
    Linux使用yum安装JDK1.8一、关于Yum介绍二、安装JDK1.8 一、关于Yum介绍 yum是rpm系统的自动更新程序和软件包安装程序/卸载程序。它会自动计算依赖关系并找到安装包时应该发生的事情。 基于RPM包管理,能够从指定...
  • linux通过yum安装jdk8

    2021-04-01 15:18:38
    CentOS8上使用 yum 直接安装,环境变量自动配置好 2、查看是否已安装 看到下面结果,说明已经安装配置 jdk 1 2 3 4 [root@localhost ~]# java -version openjdk version "1.8.0_...
  • 安装JDK 查询当前系统有没有安装JDK 如果有安装就不需要安装了,或者有但是不是自己想要的版本,也可以卸载当前JDK。 下面这两个命令都可以查询当前系统有没有安装JDK rpm -qa |grep java rpm -qa |grep jdk 如果有...
  • Linux使用yum安装jdk1.8

    2021-04-13 13:55:17
    首先说明一下yum:他是借助他的命令对某物进行下载安装,他可以主动下载安装yum 安装之前先检查一下是否有存在jdk 命令: rpm -qa |grep java rpm -qa |grep jdk //查看安装jdk版本 rpm -qa |grep gcj 如果没有输出...
  • Linux通过yum安装JDK1.8(openjdk)

    千次阅读 2021-12-21 10:20:31
    安装之前先检查一下系统有没有自带jdk 命令: rpm -qa |grep java rpm -qa |grep jdk rpm -qa |grep gcj ...通过yum安装jdk 1.首先检索包含java的列表 yum list java* 检索1.8的列表: yum l
  • linux yum 安装 jdk

    万次阅读 2019-05-27 10:15:58
    yum安装jdk的好处就是不需要手动再配置环境变量,所有的变量都是自动生成 检查系统是否存在jdk,存在删除原版jdk 如果没有信息输出,则表示没有安装jdk rpm -qa |grep java rpm -qa |grep jdk rpm -qa |grep ...
  • Linux 利用 yum 安装jdk并配置环境变量

    千次阅读 2022-03-09 17:35:36
    这里写自定义目录标题Linux 利用 yum 安装jdk并配置环境变量清除已有java环境搜索yum可以安装的版本yum安装jdk配置环境变量当前用户使用:全局用户使用:验证安装功能快捷键合理的创建标题,有助于目录的生成如何改变...
  • linux yum 安装jdk

    2020-10-28 16:31:29
    1.查看是否已安装JDK # yum list installed |grep java 2.卸载CentOS系统Java环境 # yum -y remove java-1.8.0-openjdk* *表示卸载所有openjdk相关文件输入 # yum -y remove tzdata-java.noarch 卸载tzdata-java ...
  • linuxyum安装JDK8这一篇足够了

    千次阅读 2020-09-29 11:09:57
    Linux安装软件方式有很多种,常见的有两种:rpm安装yum安装。然而人生苦短,我选择yum安装 1、先查看centos中自带的jdk并卸载 如果从未安装JDK环境,这一步可忽略 [root@root ~]# rpm -qa | grep jkd //查看 ...
  • linuxyum安装jdk

    千次阅读 2018-04-26 08:27:40
    1.查看yum库中都有哪些jdk版本(暂时只发现了openjdk)[root@localhost ~]#yum search java|grep jdkldapjdk-javadoc.x86_64 : Javadoc for ldapjdkjava-1.6.0-openjdk.x86_64 : OpenJDK Runtime Environmentjava-...
  • linux下使用yum安装jdk1.8

    千次阅读 2018-12-07 16:01:05
    2.下载需要的jdkyum install java-1.8.0-openjdk.x86_64 3.编辑配置文件:vi /etc/profile #set java environment JAVA_HOME=/usr/lib/jvm/jre-1.8.0-openjdk.x86_64 PATH=$PATH:$JAVA_H...
  • linux yum jdk安装

    2021-09-09 10:15:48
    jdk
  • Linux使用yum命令安装jdk1.8

    千次阅读 2019-04-09 11:38:02
    Linux使用yum命令安装jdk1.8 使用yum clean all 清除YUM缓存 yum makecache就是把服务器的包信息下载到本地电脑缓存起来(使下载安装速度更快) 安装之前先检查一下系统有没有自带open-jdk 命令: rpm -qa |grep ...
  • 安装JDK2.1 查看 JDK软件包列表2.2 选择版本安装(本文展示安装jdk1.8)2.3 查看JDK是否安装成功三.配置环境变量3.1 JDK默认安装路径: /usr/lib/jvm3.2 配置环境变量 一. 检查是否已安装JDK并卸载 1.1 检查 yum ...
  • Centos7 yum安装jdk11

    万次阅读 多人点赞 2019-12-02 15:07:36
    3、查看yumjdk版本:yum search jdk 发现有java11,列出java11:yum list |grep java-11 看到有文档、源码这些包,没必要安装,所以安装开头的那三个就可以了。 4、yum install -yjava-11-o...
  • Linux安装JDK11

    2021-11-17 15:42:23
    执行后 找到jdk安装目录 /lib/jvm/java-11-openjdk-11.0.13.0.8-1.el7_9.x86_64 修改vim /etc/profile JAVA_HOME=/usr/lib/jvm/java-11-openjdk-11.0.13.0.8-1.el7_9.x86_64 export PATH=$JAVA_HOME/
  • 主要给大家介绍了怎么样利用yum安装、卸载jdk,对于Linux教程有兴趣的同学可以参考学习,下面来一起看看吧。

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 56,751
精华内容 22,700
关键字:

linuxyum安装jdk