Home > Oracle, Oracle Linux, OS, RDBMS > How to simplify Oracle Database 11gR2 and 12cR1 installation on Oracle Linux 7.

How to simplify Oracle Database 11gR2 and 12cR1 installation on Oracle Linux 7.

Before installing Oracle Database 11g or 12c on a Linux system, you need to preconfigure the operating system environment since the Oracle database requires certain software packages, package versions, and tweaks to kernel parameters.
You can do it manually – be sure to review the appropriate Oracle Database installation guide to familiarize yourself with hardware, software, and operating system requirements. On Oracle Linux, however, there is a remarkably easy way to address these installation prerequisites automatically.
First, depending on your database version, install either the RPM package called oracle-rdbms-server-11gR2-preinstall or oracle-rdbms-server-12cR1-preinstall (formerly known as oracle-validated). This RPM packages performs a number of preconfiguration steps, including the following:
1. Automatically downloading and installing any additional software packages and specific package versions needed for installing Oracle Grid Infrastructure and 11g Release 2 ( or Oracle Database 12 c Release 1 (12.1), with package dependencies resolved via yum or up2date capabilities.
2. Creating the user oracle and the groups oinstall (for OraInventory) and dba (for OSDBA), which are used during database installation. For security purposes, this user has no password by default and cannot log in remotely. To enable remote login, you need to set a password manually.
3. Modifying kernel parameters in /etc/sysctl.conf file to change settings for shared memory, semaphores, the maximum number of file descriptors, and so on.
4. Setting hard and soft shell resource limits in /etc/security/limits.conf file, such as the locked-in memory address space, the number of open files, the number of processes, and core file size.
5. Setting numa=off in the kernel for x86_64 machines.
Note that oracle-rdbms-server-11gR2-preinstall or oracle-rdbms-server-12cR1-preinstall parses the existing /etc/sysctl.conf and /etc/security/limits.conf files and updates values only as needed for database installation. Any precustomized settings not related to database installation are left as is.
The oracle-rdbms-server-11gR2-preinstall and oracle-rdbms-server-12cR1-preinstall RPM packages are accessible through the Oracle Unbreakable Linux Network (ULN, which requires a support contract), from the Oracle Linux distribution media, or from the Oracle public yum repository. In addition, the Oracle public yum repository now includes all security and bug errata, ensuring systems are secured and stable with the latest security updates and bug fixes.
To install the oracle-rdbms-server-11gR2-preinstall package with YUM repository use the following command (as root):

[root@orclprod ~]# yum -y --enablerepo=ol7_addons install oracle-rdbms-server-11gR2-preinstall.x86_64

To check what the above package changed, you could use the following command (you should see something like this “# oracle-rdbms-server-11gR2-preinstall setting for …” if the preinstall package was installed successfully):

[root@orclprod ~]# more /etc/sysctl.conf
# oracle-rdbms-server-11gR2-preinstall setting for fs.file-max is 6815744
fs.file-max = 6815744
# oracle-rdbms-server-11gR2-preinstall setting for kernel.sem is '250 32000 100 
kernel.sem = 250 32000 100 128
# oracle-rdbms-server-11gR2-preinstall setting for net.ipv4.ip_local_port_range 
is 9000 65500
net.ipv4.ip_local_port_range = 9000 65500

In the perfect world, we should trust the preinstall package and proceed with the Oracle database installation. But I would prefer to check and verify what the preinstall package did and what not. And to do this I’ll use the RDA.sh script.
RDA stands for “Remote Diagnostic Agent” and is a script that can be run to obtain information on the system that it is being run on. Oracle Support will often ask for the results of running this script (which is normally and HTML formatted report), so that they can very quickly with minimal effort of the DBA get an overall picture of the setup and potentially information on the problem/issue.
First, we need to download rda.zip script – it can be download from the Metalink note 314422.1, Remote Diagnostic Agent (RDA) – Getting Started.
Then unzip the tool as user oracle:

[oracle@orclprod ~]$ unzip p21769913_891598_Linux-x86-64.zip

Execute the script as follows (parameters HCVE stand for Health Check Validation Engine):

[oracle@orclprod ~]$ ./rda.sh -T hcve

You will be prompted to answer a question – what ruleset to use (what configuration we want to analyse for):

Processing HCVE tests ...
Available Pre-Installation Rule Sets:
   1.  Oracle Database 10g R1 (10.1.0) Preinstall (Linux)
   2.  Oracle Database 10g R2 (10.2.0) Preinstall (Linux)
   3.  Oracle Database 11g R1 (11.1) Preinstall (Linux)
   4.  Oracle Database 11g R2 (11.2.0) Preinstall (Linux)
   5.  Oracle Database 12c R1 (12.1.0) Preinstallation (Linux)

In this case, I am checking for 11.2.0 Preinstall (Linux) which is option 4 – below is a transcript of this:

Enter the HCVE rule set number or 0 to cancel the test
Press Return to accept the default (0)
> 4

Performing HCVE checks ...
Enter value for < Planned ORACLE_HOME location >
> /u01/app/oracle/products/1120    

Enter value for < JDK Home >

Test "Oracle Database 11g R2 (11.2.0) Preinstall (Linux)" executed at 21-Oct-2015 12:27:33

Test Results
ID     NAME                 RESULT  VALUE
====== ==================== ======= ==========================================
A00010 OS Certified?        WARNING
A00020 User in /etc/passwd? PASSED  userOK
A00040 Group in /etc/group? PASSED  GroupOK
A00050 Enter ORACLE_HOME    RECORD  /u01/app/oracle/products/1120
A00060 ORACLE_HOME Valid?   FAILED  OHnotvalid
A00070 O_H Permissions OK?  SKIPPED Requires valid Oracle home
A00080 oraInventory Permiss PASSED  oraInventoryNotFound
A00090 Got Software Tools?  FAILED  ArElsewhere LdElsewhere NmElsewhere M...
A00100 Umask Set to 022?    PASSED  UmaskOK
A00120 Limits Processes     PASSED  Adequate
A00125 Limits Stacksize     PASSED  Adequate
A00130 Limits Descriptors   PASSED  Adequate
A00180 JAVA_HOME Unset?     PASSED  UnSet
A00190 Enter JDK Home       RECORD  
A00200 JDK Version          FAILED  JDK home is missing
A00210 Other O_Hs in PATH?  PASSED  NoneFound
A00220 Other OUI Up?        PASSED  NoOtherOUI
A00230 Temp Adequate?       PASSED  TempSpaceOK
A00240 Disk Space OK?       SKIPPED Requires valid Oracle home
A00250 Swap (in MB)         RECORD  3967
A00260 RAM (in MB)          PASSED  7985
A00270 Swap OK?             FAILED  SwapLessThanRam
A00280 Network              PASSED  Connected
A00290 IP Address           RECORD
A00300 Domain Name          RECORD  NotFound
A00310 DNS Lookup           FAILED  nslookup host.domain
A00320 /etc/hosts Format    FAILED  No entry found
A00330 Kernel Parameters OK PASSED  KernelOK
A00380 Tainted Kernel?      PASSED  NotVerifiable
A00400 ip_local_port_range  PASSED  RangeOK
A00480 OL4 RPMs OK?         SKIPPED NotOL4
A00490 OL5 RPMs OK?         SKIPPED NotOL5
A00500 OL6 RPMs OK?         SKIPPED NotOL6
A00510 OL7 RPMs OK?         FAILED  [glibc(i686)] not installed [glibc-de...
A00530 RHEL4 RPMs OK?       SKIPPED NotRedHat
A00540 RHEL5 RPMs OK?       SKIPPED NotRedHat
A00550 RHEL6 RPMs OK?       SKIPPED NotRedHat
A00560 RHEL7 RPMs OK?       SKIPPED NotRedHat
A00570 SLES10 RPMs OK?      SKIPPED NotSuSE
A00580 SLES11 RPMs OK?      SKIPPED NotSuSE
Result file: output/collect/DB_HCVE_A_DB11R2_lin_res.htm

As you can see, we have a bit of work to do, even after the preinstall package installed. So, first of all we need to take care of missing packages. The ‘A00310 DNS Lookup’ and ‘A00320 /etc/hosts Format’ could be ignore – especially, if you don’t have a DNS server. If the ping command resolve tha server name, then it should work. Swap size also could be ignore (4GB will be more than enough).
By the way, many people follow an old rule of thumb that your swap partition should be twice the size of your main system RAM. This rule is a pure nonsense. On a modern system, that’s a lot of RAM, most people prefer that their systems never swap. You don’t want your system to ever run out of RAM+swap, but you usually would rather have enough RAM in the system, so it doesn’t need to swap. The more RAM a system has the less swap space it typically needs.
So what is the lesson learned? Trust, but verify. Alternatively, RTFM 🙂

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: