CentOS 安装sun jdk

首先到sun java地址 http://www.oracle.com/technetwork/java/javase/downloads/index.html找到 JDK download, 对应的链接为: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html , 然后找到对应os的JDK, 例如: http://download.oracle.com/otn-pub/java/jdk/7u45-b18/jdk-7u45-linux-x64.rpm

绕开“Accept License Agreement”, 如下:

wget –no-check-certificate –no-cookies –header “Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com” “http://download.oracle.com/otn-pub/java/jdk/7u45-b18/jdk-7u45-linux-x64.rpm”

安装jdk, 由于之前有低版本的jdk,故而安装如下:
rpm -ivh –force jdk-7u45-linux-x64.rpm

作者: hqiang1984

量化自我,极简主义