Installation Guide of Java 8

Java is not a product of the Oracle Fusion Middleware, but it is a mandatory requirement, so let’s see how to install java, update our OS with the new java installed, and a little tip to improve our entropy performance.

  • Download the last java pkg required for you software
  • Create folder in your machine
    • mkdir /opt/java
  • Load java software in /opt/java
  • Decompress the java software
    • tar zxvf jdk-8u111-linux-x64.tar.gz

1

  • Login as root
    • su root
  • Update the java in the OS
    • update-alternatives ––install “/usr/bin/java”  “java” “/opt/java/jdk1.8.0_111/bin/java” 1
    • update-alternatives ––install “/usr/bin/java” “javac” “/opt/java/jdk1.8.0_111/bin/java/javac” 1
    • update-alternatives ––install “/usr/bin/java” “javaws” “/opt/java/jdk1.8.0_111/bin/java/javaws” 1
    • update-alternatives ––config java
      • select 1

2

  • Tune the Oracle JDK to generate an entropy value higher. It helps the Managed Servers to start / stop quicker
    • Go and edit the java.security file in /opt/oracle/java/jdk1.8.0_111/jre/lib/security folder
      Change securerandom.source property to the value file:/dev/./urandom

3

  • We can improve your entropy installing the rng-tools
    • Install rng-tools (it should be installed by default)
      • yum install rng-tools
      • Modify /etc/sysconfig/rngd file adding
        • EXTRAOPTIONS=”–i –o /dev/random –r /dev/urandom –t 10 –W 2048″
      • Make rngd start when booting the O.S
        • sudo chkconfig rngd on
      • Restart the service
        • sudo service rngd restart

Note: If rngd does not start or you are getting a low entropy then execute the following command:

rngd -r /dev/urandom -o /dev/random -b

We can monitor the entropy value with the next command:  cat /proc/sys/kernel/random/entropy_avail