2017-10-22
如要手動下載
http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html#javasejdk
JDK9.0.1x64_Install.sh 內容如下:
#!/bin/bash echo -e "\033[31m" echo -e "Program : JDK8U151x86_64_Install.sh " echo -e "JDK 8 Update 151 x86_64 Install Shell Script (CentOS 7.4 x86_64) " echo -e "by Shau-Rong Lu 2017/10/22" echo -e "\033[0m" cd /usr/local if [ ! -s jdk-9.0.1_linux-x64_bin.rpm ]; then echo "Can not find /usr/local/jdk-9.0.1_linux-x64_bin.rpm" wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/9.0.1+11/jdk-9.0.1_linux-x64_bin.rpm #exit fi rpm -ivh jdk-9.0.1_linux-x64_bin.rpm alternatives --install /usr/bin/java java /usr/java/jdk-9.0.1/bin/java 100 alternatives --set java /usr/java/jdk-9.0.1/bin/java echo echo 'export JAVA_HOME=/usr/java/jdk-9.0.1/bin/java' >> /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 版 OpenJDK ( CentOS 7.4 的 yum 可以安裝 Java 6, 7, 8 版,預設安裝 8 版,尚未提供 JDK 9 )
[root@localhost ~]# yum list | grep openjdk.x86_64 java-1.7.0-openjdk.x86_64 1:1.7.0.141-2.6.10.5.el7 @anaconda java-1.8.0-openjdk.x86_64 1:1.8.0.131-11.b12.el7 @anaconda java-1.6.0-openjdk.x86_64 1:1.6.0.41-1.13.13.1.el7_3 base java-1.7.0-openjdk.x86_64 1:1.7.0.151-2.6.11.1.el7_4 updates java-1.8.0-openjdk.x86_64 1:1.8.0.151-1.b12.el7_4 updates [root@localhost ~]# |
只安裝 JRE
yum -y install jre |
安裝 Java 開發工具
yum -y install java java-devel |
********************************************************************************
切換和設定 Java 種類可看這篇
[研究] Java 6 , 7 安裝差異+選擇切換研究 (CentOS 6.4 x64)
http://shaurong.blogspot.tw/2013/11/java-7-centos-64-x64.html
(完)
相關
相關
[研究] Oracle Java 8 Update 151 JRE 安裝 (Ubuntu 17.10)
http://shaurong.blogspot.com/2017/11/oracle-8-update-151-jre-ubuntu-1710.html
[研究] OpenJDK 8 JRE 安裝 (Ubuntu 17.10)
http://shaurong.blogspot.com/2017/11/openjdk-8-jre-ubuntu-1710.html
[研究] Oracle Java JDK 9.0.1 快速安裝程式(CentOS 7.4 x64)
http://shaurong.blogspot.com/2017/10/oracle-java-jdk-901-centos-74-x64.html
[研究] Oracle Java 8 Update 151 快速安裝程式(CentOS 7.4 x64)
http://shaurong.blogspot.com/2017/10/oracle-java-8-update-151-centos-74-x64.html
[研究] 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
沒有留言:
張貼留言