一、下载jdk

参考:http://www.codingyun.com/article/40.html

可以先下载到本地,然后ftp到服务器

也可以直接在服务器下载(windows版本的区分32位与64位,ubuntu(linux)版本的不区分)

http://download.oracle.com/otn-pub/java/jdk/8u65-b17/jdk-8u65-linux-x64.tar.gz?AuthParam=1447866593_14c651521d060c106fe19b59b69722e4

 
   

有问题(wget 得到的只是网页 5037什么的),可以参考:http://www.cnblogs.com/1995hxt/p/4976436.html,后边的AuthParam自己F12获取

   

二、解压安装

先解压

 
1
tar zxvf jdk-8u65-linux-x64.tar.gz -C /usr/java/

然后改名为java7

 
1
cd /usr/java/
 
1
mv jdk1.8.0_xx java8

三、配置环境变量

 
1
vi ~/.bashrc

在最后面加上如下四句

 
1
2
3
4
export JAVA_HOME=/usr/java/java8
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH

保存后退出vi 刷新变量使配置立即生效

 
1
source ~/.bashrc

进入tomcat的bin目录

 
1
cd $CATALINA_HOME/bin

四、测试

snowdream@snowdream:~$ java -version

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAiQAAABuCAIAAACYzZ8EAAAUnUlEQVR4nO2dzbmsuA5FiYdUGHUYBMKgwyCBTqCCe28A2JIsyTbYFMXZ67uDeyiw5V9hA9rDv//9M9zDOK+fdR6HYRim5bNM7MdpOX6jpxPor+EXdgm7gCU/kguulGBa1OQVthxzZymXqOUtsKsqq1q09Md57ZvpF/I123ec12Ua57V3gR9Gvl9NS2VXNTgxXsDv0cPZqKNynNfYK6cl20Pp+bTXE7c0LbSDGpPBtEQfw2yoZVpCOqlrVO2vdTZqeasu7EHv9B+SL/Visv6n5fP3nE1h/bdqpb9WvX+R4Gy2G+t1Ho9b7Nj05J6b9QfluLg//1AnsXXK/fYx9NBwhdVnnXtZ1kELemsYP/ROajNoOy6KHmxNkp8WskgKZV6m/VZvP38mv5DCLou3RNLKuxmiFo9NjFa5h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94qL4IfUWbb2oxPQlD0GZZluPtgHgi0cNwdDLcB/KKs1Gdt60Xcka349j5hLMBAFzmzo86K1WpfpG8LG6zjPpreYQdxfypcDYAAB+Eq2lFXDv8wfgIcDYAAB84G9AAOBsAgA+cDWgAnA0AwAfOBgAAQHf+/e8f/MM//MM//MO/rv/+D6b31RjcefixAAAAAElFTkSuQmCC" alt="" />

												

Linux 安装配置JDK的更多相关文章

  1. linux经常使用(一)linux 安装配置 jdk之 找不到安装文件文件夹及source /etc/profile 报unexpected end of file 错误 解决

    linux 安装配置 jdk 应该算是一个非常主要的东西.可是我到如今才自己第一次 正式安装.果然出现了问题.. 问题就是 安装之后 找不到 安装路径 ,进而没法配置环境变量. 现象例如以下: 提示 ...

  2. Linux安装配置JDK

    如果想看Windows下的安装,请访问此链接: http://www.cnblogs.com/yoyotl/p/5101321.html 1. 去官网下载Linux版本的jdk安装包,(我下载的是ta ...

  3. Linux 安装配置JDK 、 MySQL 、nginx

    今天我来讲一下在Linux下各环境的搭建,主要就讲一下jdk.MySQL.和一个代理服务器nginx 1. jdk的安装配置 1)卸载自带openjdk 当我们拿到一个全新的ECS的时候上面有的会自带 ...

  4. Linux安装配置JDK与卸载

    最近在Linux系统部署门户,安装Oracle,导入dmp,JDK等等,遇到一大堆问题,解决后特有一番小小成就感,哇哈哈!在这里记录一下遇到问题: 官网下载JDK压缩包( .tar.gz ):http ...

  5. Linux 安装配置 JDK 8

    所需软件包, 可以到Oracle官网去下载,  放到/usr/local/src文件夹下: jdk-8u45-linux-x64.tar.gz 安装: cd /usr/local/srctar -zx ...

  6. linux安装配置JDK脚本

    #!/bin/bash # install jdk and configuring environment variables function installjdk(){ tar -zxf jdk- ...

  7. Linux下配置JDK

    下面以CentOS为例,详细说一下Linux下配置JDK的过程 首先按照约定俗成的习惯,将jdk放在/usr/local/java下,首先进入/usr/local然后新建一个目录java 然后我们需要 ...

  8. 安装配置JDK+Eclipse+Maven、Eclipse里新建Maven Project以及HDFS命令和Java API-课堂内容

    步骤:1.安装JDK→2.安装Eclipse→3.安装Maven→4. Eclipse里配置Maven (下载Windows版本,在Windows里安装使用.) 1.安装配置JDK ①官网下载Java ...

  9. Linux安装配置php环境的方法

    本文实例讲述了Linux安装配置php环境的方法.分享给大家供大家参考,具体如下: 1.获取安装文件: http://www.php.net/downloads.php php-5.3.8.tar.g ...

随机推荐

  1. 课时68.id选择器(掌握)

    1.什么是id选择器? 作用:根据指定的id名称找到对应的标签,然后设置属性 格式: #id名称{ 属性:值; } 注意点: 1.每个html标签都有一个属性叫做id,也就是说每个标签都可以设置id ...

  2. scrapy笔记2

    cookies的使用: 使用 scrapy.http.cookie.CookieJar 类的extract_cookies方法,CookieJar._cookies就是我们需要的cookies,是一个 ...

  3. Service Intent must be explicit

    参考: http://blog.csdn.net/qs_csu/article/details/45114251 我做阿里云账号登录的时候,遇到一个问题,不知道阿里云服务的包名.怎么办?第二种方法可以 ...

  4. 怎么用 copy 关键字?

    NSString.NSArray.NSDictionary等等经常使用copy关键字,是因为他们有对应的可变类型:NSMutableString.NSMutableArray.NSMutableDic ...

  5. grunt简记

    grunt和gulp都是前端自动化的工具,grunt更成熟,插件社区全.大:gulp比较年轻,性能更好,更简单容易.具体使用哪种可根据实际项目组来决定. 创建任务 grunt默认执行的是default ...

  6. 《Cracking the Coding Interview》——第5章:位操作——题目2

    2014-03-19 05:47 题目:给定一个double型浮点数,输出其二进制表示,如果不能在32个字符内完成输出,则输出“ERROR”. 解法:如果你熟悉IEEE754标准,应该知道double ...

  7. Delphi中的关键字与保留字

    Delphi中的关键字与保留字 分类整理 Delphi 中的“关键字”和“保留字”,方便查询 感谢原作者的收集整理! 关键字和保留字的区别在于,关键字不推荐作标示符(编译器已经内置相关函数或者留给保留 ...

  8. 云计算之路-阿里云-分享:通过RDS备份文件恢复SQL Server数据库

    应用场景:假如您用了阿里云的SQL Server RDS,想在另外一台服务器上通过备份文件还原数据库至之前的某个时间点. 准备工作:准备1台用于还原的服务器,安装好SQL Server(2008或20 ...

  9. Percona-Tookit工具包之pt-table-usage

      Preface       There always be some table join operations in our SQL statement.Although we can know ...

  10. Java 中的 I/O 抽象

    Table of Contents 前言 字节流 常用实现 字符流 常用实现 缓冲区 各种字节流 结语 前言 由于在接触 Java 之前使用的语言是 Python,所以在转到 Java 后对 Java ...