2015-05-23
2015-10-22 更新
如要手動下載
http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html#javasejdk
JDK8U45x86_64_Install.sh 內容如下:
#!/bin/bash echo -e "\033[31m" echo -e "Program : JDK8U45x86_64_Install.sh " echo -e "JDK 8 Update 45 x86_64 Install Shell Script (CentOS 7.1 x86_64) " echo -e "by Shau-Rong Lu 2015/05/23 " echo -e "\033[0m" cd /usr/local if [ ! -s jdk-8u45-linux-x64.rpm ]; then echo "Can not find /usr/local/jdk-8u45-linux-x64.rpm" wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.rpm #exit fi rpm -ivh jdk-8u45-linux-x64.rpm alternatives --install /usr/bin/java java /usr/java/jdk1.8.0_45/bin/java 100 alternatives --set java /usr/java/jdk1.8.0_45/bin/java echo echo 'export JAVA_HOME=/usr/java/jdk1.8.0_45' >> /etc/profile echo 'export PATH=$PATH:$JAVA_HOME/bin' >> /etc/profile echo 'export CLASSPATH=$JAVA_HOME/jre/lib/ext:$JAVA_HOME/lib/tools.jar' >> /etc/profile source /etc/profile java -version export | grep jdk |
如果要安裝 yum 版 JDK ( CentOS 7 的 yum 可以安裝 Java 6, 7, 8 版,預設安裝 7 版)
yum -y install java java-devel |
JRE8U45x86_64_Install.sh 內容如下:
#!/bin/bash echo -e "\033[31m" echo -e "Program : JRE8U45x64_Install.sh " echo -e "JRE 8 Update 45 x86_64 Install Shell Script (CentOS 7.1 x86_64) " echo -e "by Shau-Rong Lu 2015/05/23 " echo -e "\033[0m" cd /usr/local if [ ! -s jre-8u45-linux-i586.rpm ]; then echo "Can not find /usr/local/jre-8u45-linux-i586.rpm" wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jre-8u45-linux-i586.rpm #exit fi rpm -ivh jre-8u45-linux-i586.rpm alternatives --install /usr/bin/java java /usr/java/jre1.8.0_45/bin/java 100 alternatives --set java /usr/java/jre1.8.0_45/bin/java echo echo 'export JAVA_HOME=/usr/java/jre1.8.0_45' >> /etc/profile echo 'export PATH=$PATH:$JAVA_HOME/bin' >> /etc/profile echo 'export CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/lib/ext' >> /etc/profile source /etc/profile java -version export | grep jre |
如果要安裝 yum 版 JRE ( CentOS 7 的 yum 可以安裝 Java 6, 7, 8 版,預設安裝 7 版)
yum -y install java |
(完)
[研究] Oracle Java 8 Update 45 快速安裝程式(CentOS 7.1 x64)
http://shaurong.blogspot.com/2015/05/oracle-java-8-update-45-centos-71-x64.html
[研究] Oracle Java 7 Update 51 快速安裝程式(CentOS 6.5 x64)
http://shaurong.blogspot.com/2014/01/oracle-java-7-update-51-centos-65-x64.html
http://forum.icst.org.tw/phpbb/viewtopic.php?f=44&t=80711
[研究] Oracle Java 手動安裝與快速安裝程式 (CentOS 6.5 x64)
http://shaurong.blogspot.tw/2013/12/oracle-java-centos-65-x64.html
[研究] Java 6 , 7 安裝差異+選擇切換研究 (CentOS 6.4 x64)
http://shaurong.blogspot.tw/2013/11/java-7-centos-64-x64.html
[研究] 用 wget 下載 Java 方法
http://shaurong.blogspot.tw/2013/12/wget-java.html
Oracle Java (最新版本)
http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html#javasejdk
Oracle Java Zh-Tw (繁體中文網頁)
http://java.com/zh_TW/download/manual.jsp
Oracle Java Archive (所有版本,含 Java SE 7,6,5, ... )
http://www.oracle.com/technetwork/java/archive-139210.html
沒有留言:
張貼留言