21 lines
572 B
Bash
21 lines
572 B
Bash
#!/usr/bin/env bash
|
|
|
|
cat << EOF
|
|
|
|
###################################################################################
|
|
# 安装 JDK8 脚本
|
|
# JDK 会被安装到 /usr/lib/jvm/java 路径。
|
|
# @system: 适用于 CentOS
|
|
# @author: Zhang Peng
|
|
###################################################################################
|
|
|
|
EOF
|
|
|
|
command -v yum >/dev/null 2>&1 || { echo >&2 "Require yum but it's not installed. Aborting."; exit 1; }
|
|
|
|
echo -e "\n>>>>>>>>> install jdk8"
|
|
|
|
yum -y install java-1.8.0-openjdk.x86_64
|
|
yum -y install java-1.8.0-openjdk-devel.x86_64
|
|
java -version
|