2014-01-26
如要手動下載
http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html#javasejdk
JDK7U51x86_64_Install.sh 內容如下:
#!/bin/bash echo -e "\033[31m" echo -e "Program : JDK7U51x64_Install.sh " echo -e "JDK 7 Update 51 x86_64 Install Shell Script (CentOS 6.5 x86_64) " echo -e "by Shau-Rong Lu 2014/01/26 " echo -e "\033[0m" cd /usr/local if [ ! -s jdk-7u51-linux-x64.rpm ]; then echo "Can not find /usr/local/jdk-7u51-linux-x64.rpm" wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F" "http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.rpm" -O jdk-7u51-linux-x64.rpm #exit fi rpm -ivh jdk-7u51-linux-x64.rpm alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_51/bin/java 100 alternatives --set java /usr/java/jdk1.7.0_51/bin/java echo echo 'export JAVA_HOME=/usr/java/jdk1.7.0_51' >> /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 |
JRE7U51x86_64_Install.sh 內容如下:
#!/bin/bash echo -e "\033[31m" echo -e "Program : JRE7U51x64_Install.sh " echo -e "JRE 7 Update 51 x86_64 Install Shell Script (CentOS 6.5 x86_64) " echo -e "by Shau-Rong Lu 2014/01/26 " echo -e "\033[0m" cd /usr/local if [ ! -s jre-7u51-linux-x64.rpm ]; then echo "Can not find /usr/local/jre-7u51-linux-x64.rpm" wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F" "http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jre-7u51-linux-x64.rpm" -O jre-7u51-linux-x64.rpm #exit fi rpm -ivh jre-7u51-linux-x64.rpm alternatives --install /usr/bin/java java /usr/java/jre1.7.0_51/bin/java 100 alternatives --set java /usr/java/jre1.7.0_51/bin/java echo echo 'export JAVA_HOME=/usr/java/jre1.7.0_51' >> /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 |
(完)
[研究] 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
沒有留言:
張貼留言