OpenJDK JVM not supported while installing Oracle Fusion Middleware on Linux 7

Oracle Fusion Middleware 12.2.1.0.0 (FMW 12c) will not operate with OpenJDK releases which are standarded on Oracle Enterprise Linux 7.2 (OEL 7).    Resulting in an error similar to the one below:

[oracle@linux1 STAGE]$ java -Djava.io.tmpdir=/u04/tmp -jar fmw_12.2.1.1.0_infrastructure.jar -silent -ignoreSysPrereqs -responseFile /u01/STAGE/fmw.rsp
Launcher log file is /u04/tmp/OraInstall2017-07-13_08-41-06AM/launcher2017-07-13_08-41-06AM.log.
Extracting the installer . . . . . . . . . . . . Done
The OpenJDK JVM is not supported on this platform.
The log is located here: /u04/tmp/OraInstall2017-07-13_08-41-06AM/launcher2017-07-13_08-41-06AM.log.
[oracle@linux1 STAGE]$

This article outlines a procedure to resolve this error and proceed with installation of Oracle Fusion Middleware 12.2.1.0.0 on OEL 7 or any Linux 7 distribution.

1. Logon to OEL 7 server as the root user.

[larry@linux1 ~]$ su –
Password:
Last login: Tue Jul 13 09:44:38 EDT 2017 on pts/1
[root@linux1 ~]#

2. Determine current JAVA installed with command: java -version

[root@linux2 ~]# java -version
openjdk version “1.8.0_65”
OpenJDK Runtime Environment (build 1.8.0_65-b17)
OpenJDK 64-Bit Server VM (build 25.65-b01, mixed mode)
[root@linux2 ~]#

We will install an alternative JDK for use of FMW with one we know works, in this case that JDK is 1.7.0_79.

3. Move to a directory to install the alternative JDK. In this case we will use /opt with command: cd /opt

[root@linux2 ~]# cd /opt
[root@linux2 opt]#

4. Download the JDK 1.7.0_79 with wget command: wget –no-check-certificate –no-cookies –header “Cookie: oraclelicense=accept-securebackup-cookie” “http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz” “http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-i586.tar.gz”

[root@linux2 opt]# wget –no-check-certificate –no-cookies –header “Cookie: oraclelicense=accept-securebackup-cookie” “http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz”
–2017-07-14 14:14:46– http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)… 70.186.31.18, 70.186.31.9
Connecting to download.oracle.com (download.oracle.com)|70.186.31.18|:80… connected.
HTTP request sent, awaiting response… 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz [following]
–2017-07-14 14:14:47– https://edelivery.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)… 104.72.8.208
Connecting to edelivery.oracle.com (edelivery.oracle.com)|104.72.8.208|:443… connected.
HTTP request sent, awaiting response… 302 Moved Temporarily
Location: https://edelivery.oracle.com/osdc-otn/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz [following]
–2017-07-14 14:14:48– https://edelivery.oracle.com/osdc-otn/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz
Reusing existing connection to edelivery.oracle.com:443.
HTTP request sent, awaiting response… 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz?AuthParam=1473877008_9518549fbff39b6f0a026bcbd58215c9 [following]
–2017-07-14 14:14:48– http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz?AuthParam=1473877008_9518549fbff39b6f0a026bcbd58215c9
Connecting to download.oracle.com (download.oracle.com)|70.186.31.18|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 153512879 (146M) [application/x-gzip]
Saving to: ‘jdk-7u79-linux-x64.tar.gz’

100%[===============================================================================================>] 153,512,879 4.64MB/s in 32s

2017-07-14 14:15:20 (4.58 MB/s) – ‘jdk-7u79-linux-x64.tar.gz’ saved [153512879/153512879]

[root@linux2 opt]#

5. View the downloaded JDK with ls -l command:

[root@linux2 opt]# ls -l
total 149916
drwxr-xr-x. 4 oracle dba 43 Aug 25 14:22 app
-rw-r–r–. 1 root root 153512879 Apr 13 2015 jdk-7u79-linux-x64.tar.gz
drwxr-xr-x. 2 root root 6 Mar 26 2015 rh
[root@linux2 opt]#

6. Unpack the JDK with tar command: tar xzf ./jdk-7u79-linux-x64.tar.gz

[root@linux2 opt]# tar xzf ./jdk-7u79-linux-x64.tar.gz
[root@linux2 opt]# ls
app jdk1.7.0_79 jdk-7u79-linux-x64.tar.gz rh
[root@linux2 opt]#

7. change directory to the newly created JDK directory under /opt with cd command: cd /opt/jdk1.7.0_79/

[root@linux2 opt]# cd /opt/jdk1.7.0_79/
[root@linux2 jdk1.7.0_79]#

8. Use the alternatives command to install new JDK with command:

alternatives –install /usr/bin/java java /opt/jdk1.7.0_79/bin/java 2

9. Set the newly installed JDK as local default with command: alternatives –config java

[root@linux2 jdk1.7.0_79]# alternatives –config java

There are 2 programs which provide ‘java’.

Selection Command
———————————————–
*+ 1 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-3.b17.el7.x86_64/jre/bin/java
2 /opt/jdk1.7.0_79/bin/java

Enter to keep the current selection[+], or type selection number: 2
[root@linux2 jdk1.7.0_79]#

10. Install JAR from new JDK with command: alternatives –install /usr/bin/jar jar /opt/jdk1.7.0_79/bin/jar 2

[root@linux2 jdk1.7.0_79]# alternatives –install /usr/bin/jar jar /opt/jdk1.7.0_79/bin/jar 2
[root@linux2 jdk1.7.0_79]#

11. Install javac executable from new JDK with command: alternatives –install /usr/bin/javac javac /opt/jdk1.7.0_79/bin/javac 2

[root@linux2 jdk1.7.0_79]# alternatives –install /usr/bin/javac javac /opt/jdk1.7.0_79/bin/javac 2
[root@linux2 jdk1.7.0_79]#

11. Set the new JAR as the default with command: alternatives –set jar /opt/jdk1.7.0_79/bin/jar

[root@linux2 jdk1.7.0_79]# alternatives –set jar /opt/jdk1.7.0_79/bin/jar
[root@linux2 jdk1.7.0_79]#

12. Set the new JAVAC executable as the default with command: alternatives –set javac /opt/jdk1.7.0_79/bin/javac

[root@linux2 jdk1.7.0_79]# alternatives –set javac /opt/jdk1.7.0_79/bin/javac
[root@linux2 jdk1.7.0_79]#

13. Check the default java version with command: java -version

[root@linux2 jdk1.7.0_79]# java -version
java version “1.7.0_79”
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)
[root@linux2 jdk1.7.0_79]#

14. NOTE: The Java version is now 1.7 79. Logon as the oracle software owner.

[root@linux2 STAGE]# su – oracle
Last login: Wed Jul 14 10:56:10 EDT 2017 on pts/1
[oracle@linux2 ~]$

15. Move to your FMW 12c installation directory and attempt running the installer again. The java error should be removed.

cd /u01/STAGE
java -Djava.io.tmpdir=/u04/tmp -jar fmw_12.2.1.1.0_infrastructure.jar -silent -ignoreSysPrereqs -responseFile /u01/STAGE/fmw.rsp

[root@linux2 jdk1.7.0_79]# cd /u01/STAGE
[root@linux2 STAGE]# su – oracle
Last login: Wed Jul 14 10:56:10 EDT 2017 on pts/1
[oracle@linux2 ~]$ cd /u01/STAGE
[oracle@linux2 STAGE]$ java -Djava.io.tmpdir=/u04/tmp -jar fmw_12.2.1.1.0_infrastructure.jar -silent -ignoreSysPrereqs -responseFile /u01/STAGE/fmw.rsp
Launcher log file is /u04/tmp/OraInstall2017-07-14_02-26-54PM/launcher2017-07-14_02-26-54PM.log.
Extracting the installer . . . . . . . . . . . . . . . . . . . . . . . . .java -Djava.io.tmpdir=/u04/tmp -jar fmw_12.2.1.1.0_infrastructure.jar -silent -ignoreSysPrereqs -responseFile /u01/STAGE/fmw.rsp . . . . . . . . . . . . . . . . . . Done
Checking if CPU speed is above 300 MHz. Actual 3478.990 MHz Passed
Checking swap space: must be greater than 512 MB. Actual 2047 MB Passed
Checking if this platform requires a 64-bit JVM. Actual 64 Passed (64-bit not required)
Checking temp space: must be greater than 300 MB. Actual 32284 MB Passed

Preparing to launch the Oracle Universal Installer from /u04/tmp/OraInstall2017-07-14_02-26-54PM
oraInstFile: /etc/oraInst.loc

16. NOTE: JDK error is now removed.

Larry Catt, OCP

Changing command prompt in LINUX

1. Logon as the user which you which to change the prompt. NOTE: You have to add this to your .profile file to have it survive reboot. This file is normally located /home/ directory and it is a hidden file so will be preceded by a period.
2. Export a new PS1 value with the text you want: In this example I am using ‘username@machine_name promt’

$export PS1='[\u@mylinux \W ]\$’
[oracle@mylinux ~ ]$

3. This completes changing command prompt on LINUX.
Larry Catt, OCP

Determining SID(s) from Database Server

Oracle Databases implemented on Unix and Linux have a file /etc/oratab file which determines the current SID, Oracle Homes, or
active status which exist on the server, if a proper installation is done. This procedure uses the file to extract
current SID(s).

1. Logon to your Oracle Server as the Oracle software owner.

[root@linux2 ~]# su – oracle
Last login: Wed Oct 5 15:16:55 EDT 2016 on pts/2
[oracle@linux2 ~]$

2. Execute the command: egrep -E -v ‘^(#)’ /etc/oratab | awk /./ | awk -F: ‘{print $1}’

[oracle@linux2 ~]$ egrep -E -v ‘^(#)’ /etc/oratab | awk /./ | awk -F: ‘{print $1}’
cdb1
[oracle@linux2 ~]$

3. For this system there is only one database with a SID of ‘cdb1’.

Larry Catt
OCP

Determining ORACLE_HOME(s) from Database Server

Oracle Databases implemented on Unix and Linux have a file /etc/oratab file which determines the current SID, Oracle Homes, or
active status which exist on the server, if a proper installation is done. This procedure uses the file to extract
current ORACLE_HOME(s).

1. Logon to your Oracle Server as the Oracle software owner.

[root@linux2 ~]# su – oracle
Last login: Wed Oct 5 15:16:55 EDT 2016 on pts/2
[oracle@linux2 ~]$

2. Execute the command: egrep -E -v ‘^(#)’ /etc/oratab | awk /./ | awk -F: ‘{print $2}’

[oracle@linux2 ~]$ egrep -E -v ‘^(#)’ /etc/oratab | awk /./ | awk -F: ‘{print $2}’
/opt/app/oracle/product/12.1.0.2/db_1
[oracle@linux2 ~]$

3. For this system there is only one database with a ORACLE_HOME of ‘/opt/app/oracle/product/12.1.0.2/db_1’.

Larry Catt
OCP

Determine the release of linux you are using

How determine what linux, you have installed.

Options:

1. Via release files in /etc directory.

[root@mylinux /# cat /etc/*-release
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Oracle Linux Server release 6.5
Red Hat Enterprise Linux Server release 6.5 (Santiago)
Oracle Linux Server release 6.5
[root@mylinux /]#

2. Via lsb_release command.

[root@mylinux /]# lsb_release
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
[root@mylinux /]#

3. Via /proc/version file

[root@mylinux /]# cat /proc/version
Linux version 3.8.13-35.1.1.el6uek.x86_64 (mockbuild@ca-build44.us.oracle.com) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) ) #2 SMP Fri Jun 6 10:52:33 PDT 2014
[root@mylinux /]#

Larry Catt
OCP

Set Linux Network Adapters to startup automatically

1. Logon as the root user to your Linux Server.

[larry@linux1 ~]$ sudo su
[root@linux1 larry]#

2. Execute the command: ip -o link show | awk -F’: ‘ ‘{print “ip link set dev “$2″ up”}’ >ip_up.sh

[root@linux1 larry]# ip -o link show | awk -F’: ‘ ‘{print “ip link set dev “$2″ up”}’ >ip_up.sh
[root@linux1 larry]#

3. Change Permission to 775 on file ip_up.sh

[root@linux1 larry]# chmod 770 ip_up.sh
[root@linux1 larry]#

4. Execute file ip_up.sh

[root@linux1 larry]# ./ip_up.sh
[root@linux1 larry]#

5. Execute the command:

find /etc/sysconfig/network-scripts -name “ifcfg-*” -not -name “*bak”| awk -F’: ‘ ‘{print “perl -pi.bak -e ‘”‘”‘s/ONBOOT=no/ONBOOT=yes/g'”‘”‘ “$1}’ > net_ifcfg_update.sh

6. Change the permissions to 775 on file net_ifcfg_update.sh.

[root@linux1 ~]# chmod 775 net_ifcfg_update.sh
[root@linux1 ~]#

7. Execute file net_ifcfg_update.sh.

[root@linux1 ~]# ./net_ifcfg_update.sh
[root@linux1 ~]#

8. Now restart your linux server with the command: reboot.

[root@linux1 larry]# reboot

9. This completes changing your Network adapters to automatically start at system start.

Larry Catt, OCP

Rename LINUX Server

1. Logon as the root user to your Linux Server.

[larry@localmachine ~]$ su –
Password:
Last login: Thu Jun 11 12:29:24 EDT 2017 on pts/1
[root@localmachine ~]#

2. You must edit the file /etc/hostname to change the local machine name. You can generate a statement to update /etc/hostname with the following bash command:

cat /etc/hostname | awk -F. ‘{print “\n\n perl -pi.bak -e ‘”‘”‘s/”$1″//g'”‘”‘ /etc/hostname”}’

[root@localmachine ~]# cat /etc/hostname | awk -F. ‘{print “\n\n perl -pi.bak -e ‘”‘”‘s/”$1″//g'”‘”‘ /etc/hostname”}’

perl -pi.bak -e ‘s/localmachine//g’ /etc/hostname
[root@localmachine ~]#

3. Take the resulting string and replace the text with the name of the machine you wish for your server.

Original Perl Command output:
perl -pi.bak -e ‘s/localmachine//g’ /etc/hostname

Edited Perl Command output: (New Server Name)

perl -pi.bak -e ‘s/localmachine/linux1/g’ /etc/hostname

[root@localmachine ~]# perl -pi.bak -e ‘s/localmachine/linux1/g’ /etc/hostname
[root@localmachine ~]#

4. Reboot your Linux Server.

[root@localmachine ~]# reboot

5. Logon to your Linux Server after reboot completes and see new name of Server with command: hostname.

[larry@linux1 ~]$ su –
Password:
Last login: Thu Jun 11 14:31:50 EDT 2017 from 10.30.15.69 on pts/1
[root@linux1 ~]# hostname
linux1.localdomain
[root@linux1 ~]#

6. This completes changing LINUX Server name.

Larry Catt, OCP