sh 在CentOS / RHEL 7/6/5和Fedora上安装JAVA 8(JDK 8u40)的脚本
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 在CentOS / RHEL 7/6/5和Fedora上安装JAVA 8(JDK 8u40)的脚本相关的知识,希望对你有一定的参考价值。
#!/bin/bash
# Script to Install JAVA 8 (JDK 8u40) on CentOS/RHEL 7/6/5 and Fedora
# http://tecadmin.net/install-java-8-on-centos-rhel-and-fedora/
echo "Installing Java 8 (64bit)"
cd /opt/
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u60-b27/jdk-8u60-linux-x64.tar.gz
gunzip jdk-8u60-linux-x64.tar.gz
tar -xvf jdk-8u60-linux-x64.tar jdk1.8.0_60/
cd /opt/jdk1.8.0_60/
alternatives --install /usr/bin/java java /opt/jdk1.8.0_60/bin/java 2
alternatives --config java
alternatives --install /usr/bin/jar jar /opt/jdk1.8.0_60/bin/jar 2
alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_60/bin/javac 2
alternatives --set jar /opt/jdk1.8.0_60/bin/jar
alternatives --set javac /opt/jdk1.8.0_60/bin/javac
export JAVA_HOME=/opt/jdk1.8.0_60
以上是关于sh 在CentOS / RHEL 7/6/5和Fedora上安装JAVA 8(JDK 8u40)的脚本的主要内容,如果未能解决你的问题,请参考以下文章
How To Enable EPEL Repository in RHEL/CentOS 7/6/5?
Install Adobe Flash Player 11.2 on CentOS/RHEL 7/6/5, Fedora 20/19
sh CentOS 7 RHEL 7和fedora上的Selenium,Firefox和Behat
sh 在RHEL / CentOS上安装MySQL Top(mtop)
sh 在rhel / centos 7上编译并安装tmux 2.9a
sh RHEL / CentOS 6的graylog2安装脚本