The other day (2017/05/22?) Oracle JDK8 download site has been changed so far for automation. I can no longer download by the method of.
↓ is also ** I don't know how long it will be valid **, but it is a version that will work after 5/22. (For Amazon Linux, CentOS)
---
- name: download JDK8
get_url:
url: http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm
dest: /tmp/jdk-8u131-linux-x64.rpm
mode: 0644
validate_certs: no
headers: "Cookie: oraclelicense=accept-securebackup-cookie"
- name: be sure JDK8 is installed
yum:
name: /tmp/jdk-8u131-linux-x64.rpm
state: present
This is the shell.
wget --no-cookies \
--no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm
It seems that JDKs before jdk-8u131 cannot be downloaded by the above method.
Recommended Posts