`

centos7 安装jdk

 
阅读更多
1.查找需要卸载默认的openjdk
执行:rpm -qa | grep openjdk | grep -v grep
 
2.卸载openjdk
执行命令:rpm -e --nodeps java-1.7.0-openjdk-1.7.0.91-2.6.2.3.el7.x86_64
 
3.修改/etc/profile添加一下配置
JAVA_HOME=/usr/local/java/jdk1.8.0_121
JRE_HOME=/usr/local/java/jdk1.8.0_121/jre
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
export JAVA_HOME JRE_HOME PATH CLASSPATH
 
4.执行 source /etc/profile
 

<!--5f39ae17-8c62-4a45-bc43-b32064c9388a:W3siYmxvY2tJZCI6IjEzNjctMTUxMzEzNTY3MDc4OCIsImJsb2NrVHlwZSI6InBhcmFncmFwaCIsInN0eWxlcyI6eyJhbGlnbiI6ImxlZnQiLCJpbmRlbnQiOjAsInRleHQtaW5kZW50IjowLCJsaW5lLWhlaWdodCI6MS43NX0sInR5cGUiOiJwYXJhZ3JhcGgiLCJyaWNoVGV4dCI6eyJkYXRhIjpbeyJjaGFyIjoiMSJ9LHsiY2hhciI6Ii4ifSx7ImNoYXIiOiLmn6UifSx7ImNoYXIiOiLmib4ifSx7ImNoYXIiOiLpnIAifSx7ImNoYXIiOiLopoEifSx7ImNoYXIiOiLljbgifSx7ImNoYXIiOiLovb0ifSx7ImNoYXIiOiLpu5gifSx7ImNoYXIiOiLorqQifSx7ImNoYXIiOiLnmoQifSx7ImNoYXIiOiJvIn0seyJjaGFyIjoicCJ9LHsiY2hhciI6ImUifSx7ImNoYXIiOiJuIn0seyJjaGFyIjoiaiJ9LHsiY2hhciI6ImQifSx7ImNoYXIiOiJrIn1dLCJpc1JpY2hUZXh0Ijp0cnVlLCJrZWVwTGluZUJyZWFrIjp0cnVlfX0seyJibG9ja0lkIjoiODg3OS0xNTEzMTM1NzAwMjQzIiwiYmxvY2tUeXBlIjoicGFyYWdyYX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GEiOltdLCJpc1JpY2hUZXh0Ijp0cnVlLCJrZWVwTGluZUJyZWFrIjp0cnVlfX0seyJibG9ja0lkIjoiNDg1MC0xNTEzMTM1Nzc1NzUzIiwiYmxvY2tUeXBlIjoicGFyYWdyYXBoIiwic3R5bGVzIjp7ImFsaWduIjoibGVmdCIsImluZGVudCI6MCwidGV4dC1pbmRlbnQiOjAsImxpbmUtaGVpZ2h0IjoxLjc1fSwidHlwZSI6InBhcmFncmFwaCIsInJpY2hUZXh0Ijp7ImRhdGEiOlt7ImNoYXIiOiI1In0seyJjaGFyIjoiLiJ9LHsiY2hhciI6IuaJpyJ9LHsiY2hhciI6IuihjCJ9LHsiY2hhciI6IiAifSx7ImNoYXIiOiJqIn0seyJjaGFyIjoiYSJ9LHsiY2hhciI6InYifSx7ImNoYXIiOiJhIn0seyJjaGFyIjoiICJ9LHsiY2hhciI6Ii0ifSx7ImNoYXIiOiJ2In0seyJjaGFyIjoiZSJ9LHsiY2hhciI6InIifSx7ImNoYXIiOiJzIn0seyJjaGFyIjoiaSJ9LHsiY2hhciI6Im8ifSx7ImNoYXIiOiJuIn0seyJjaGFyIjoiICJ9LHsiY2hhciI6IuafpSJ9LHsiY2hhciI6IueciyJ9LHsiY2hhciI6ImoifSx7ImNoYXIiOiJhIn0seyJjaGFyIjoidiJ9LHsiY2hhciI6ImEifSx7ImNoYXIiOiLniYgifSx7ImNoYXIiOiLmnKwifV0sImlzUmljaFRleHQiOnRydWUsImtlZXBMaW5lQnJlYWsiOnRydWV9fV0=-->

5.执行 java -version 查看java版本
分享到:
评论

相关推荐

    CentOS7安装JDK1.8详细步骤

    之前一直在自己电脑上通过Vmware Workstation软件来安装CentOS7,最近斥巨资自己组装了一个小电脑,安装CentOS7系统,模拟真实的服务器环境。同时也实现了异地远程开机和访问,并且可以通过ssh连接,这样便相当于...

    centos6.7安装jdk

    ### CentOS 6.7 安装 JDK 1.8 的详细步骤 在 CentOS 6.7 上安装 JDK 1.8 是一项常见的任务,对于运行 Java 应用程序至关重要。以下是从连接到服务器到验证安装的整个过程: #### 1. 连接到 CentOS 服务器 首先,...

    centos7安装jdk1.8新

    centos7安装jdk1.8

    centos7安装jdk(非openjdk)

    ### CentOS 7 安装 JDK (非 OpenJDK) #### 概述 本文档旨在指导用户如何在 CentOS 7 环境下手动安装 Oracle 的 JDK,并提供详细的步骤及注意事项,帮助用户像在 Windows 系统中那样进行 JDK 的安装与配置。与默认...

    10.Linux-centos7安装jdk&mysql&redis

    在IT行业中,Linux操作系统是服务器领域广泛使用的平台,而...通过阅读`03 centos7安装jdk.docx`、`centos7安装mysql 5.docx`和`Redis的安装.md`,你可以获取更详细的步骤和注意事项,以便在实际操作中顺利完成安装。

    新手centos7安装jdk,tomcat,中间件weblogic,配置域

    ### 新手CentOS 7 安装 JDK、Tomcat、WebLogic 及配置域 #### 一、JDK 的安装步骤详解 ##### **1. 检查服务器上的 JDK 版本** - 在安装之前,首先需要确认服务器上是否已安装了 JDK 以及其版本信息。这一步非常...

    centos7安装jdk1.8资源

    本文将详细介绍如何在CentOS 7上安装JDK 1.8,以及在这个过程中可能遇到的一些关键知识点。 首先,我们需要了解JDK 1.8的重要性。Java是一种跨平台的编程语言,广泛应用于服务器端应用、移动应用、大数据处理等多个...

    CentOS7下安装JDK1.8详细过程

    CentOS7 下安装 JDK1.8 详细过程 CentOS7 下安装 JDK1.8 需要经历卸载系统自带的 OpenJDK、下载 JDK、解压安装 JDK 和配置 JDK 环境变量四个步骤。 卸载系统自带的 OpenJDK 在 CentOS7 中,默认情况下已经安装了 ...

    Centos 7 安装JDK.docx

    本文将详细介绍如何在CentOS 7上安装JDK,并配置环境变量,以便于日常的工作和学习。 首先,安装JDK的过程通常包括下载、解压和设置环境变量三个步骤。在给定的文件中,提到了使用`wget`命令来下载JDK的Linux版本。...

    CentOS7 安装JDK8 + MySQL8 + Tomcat9并配置环境变量.pdf

    本文将详细介绍如何在CentOS7上安装JDK8、MySQL8和Tomcat9,并配置相应的环境变量。 首先,我们开始安装JDK1.8。Oracle官网提供了JDK的下载链接,通常为tar.gz格式的压缩包。你需要在你的本地计算机上下载对应版本...

    Centos 7 安装JDK11

    下载jdk11的压缩包(我这里使用的版本是:jdk-11.0.6_linux-x64_bin.tar.gz) 上传jdk到虚拟机(这里我是通过xshell工具上传的) 解压jdk压缩包 解压命令: tar -zxvf jdk-11.0.6_linux-x64_bin.tar.gz 删除...

    centos7安装jdk,tomcat,eclipse步骤详情

    本文档详细记录了本人近期centos7新桌面环境安装java开发环境之jdk,tomcat,eclipse等。持续更新,后期eclipse会集成svn,maven,git等辅助开发工具,敬请关注,都是开源

    Centos7安装JDK1.8、Nginx-附件资源

    Centos7安装JDK1.8、Nginx-附件资源

    centos7安装Jdk+tomcat+mysql

    ### CentOS 7上安装JDK、Tomcat及MySQL的详细步骤 #### 一、安装JDK 1. **下载JDK** - 首先访问Oracle官方提供的JDK下载页面,选择适合CentOS 7的JDK版本进行下载。例如,下载JDK 8的版本,下载链接为:`...

    03 centos7安装jdk、Tomcat、MySQL.pdf

    总结,本文详细阐述了在CentOS 7操作系统中,如何依次安装JDK 8、Tomcat和MySQL 5.6的过程,涵盖了从卸载旧版本、下载安装包、配置环境变量到启动服务和验证安装的所有步骤。这些知识对于Linux系统的管理员和开发者...

    centOS7安装jdk1.8的方法

    本篇文章将详细讲解如何在CentOS 7上安装JDK 1.8。 首先,我们需要创建一个存放JDK的目录。在 `/usr/local` 目录下新建一个名为 `java` 的文件夹,可以通过以下命令完成: ```bash mkdir /usr/local/java ``` ...

    centos下安装JDK8的方法

    ### CentOS 下安装 JDK8 的详细步骤与注意事项 #### 前言 在 CentOS 系统中安装 JDK8 是一项常见的任务,特别是在搭建 Java 开发环境或部署 Java 应用程序时。本文将详细介绍如何在 CentOS 系统下安装 JDK8,并提供...

Global site tag (gtag.js) - Google Analytics