What You See Is What You Get Element

How I Simplified Oracle Database Installation on Oracle Linux 5

by Ginny Henningsen

Ginny Henningsen simplifies the installation of Oracle Database 11g by automatically preconfiguring Oracle Linux with the required software packages and correct kernel parameters.


Published September 2011


Introducing the oracle-validated RPM for Oracle Linux

Note: This article applies to Oracle Linux 5. A subsequent article, "How I Simplified Oracle Database 11g and 12c Installation on Oracle Linux 6," covers performing a similar task on versions of Oracle Linux 6.

Before installing Oracle Database 10g or 11g on a system, you need to preconfigure the operating environment since the database requires certain software packages, package versions, and tweaks to kernel parameters. (Be sure to review the appropriate Oracle Database installation guide to familiarize yourself with hardware, software, and operating system requirements.) On Oracle Linux, I discovered that there is a remarkably easy way to address these installation prerequisites: First install an RPM package called oracle-validated. This RPM performs a number of preconfiguration steps, including:

Want to comment on this article? Post the link on Facebook's OTN Garage page.  Have a similar article to share? Bring it up on Facebook or Twitter and let's discuss.
  • Causing the download and installation of various software packages and specific versions needed for database installation, with package dependencies resolved via yum or up2date capabilities
  • Creating the user oracle and the groups oinstall and dba, which are used during database installation
  • Modifying kernel parameters in /etc/sysctl.conf to change settings for shared memory, semaphores, the maximum number of file descriptors, and so on
  • Setting hard and soft shell resource limits in /etc/security/limits.conf, such as the locked-in memory address space, the number of open files, the number of processes, and core file size
  • Setting numa=off in the kernel for x86_64 machines

Note that oracle-validated 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-validated RPM package is 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. Thus, whether or not your system is registered with ULN to access Oracle patches and support, you can use oracle-validated to simplify database installation on Oracle Linux. Keep in mind, however, that the Oracle public yum repository is not updated with security updates and bug fixes, so the best way to maintain up-to-date and secure systems is with a ULN subscription.

Installing the oracle-validated RPM

The remainder of this article steps through the procedure that I used for installing oracle-validated on Oracle Linux via the Oracle public yum repository. I started with a system running Oracle Linux Release 5 Update 7 for x86_64, a 64-bit version of Oracle Linux that I downloaded from the Oracle software delivery cloud (requires registration or login). First, I set up a yum configuration file that pointed to the correct repository, and then I installed the oracle-validated RPM from that repository.

Here are the steps for preconfiguring a system for Oracle Database installation using oracle-validated:

  1. As an authorized user (for example, root), retrieve the file that configures repository locations:

    # cd /etc/yum.repos.d
    # wget http://public-yum.oracle.com/public-yum-el5.repo
    
  2. Using a text editor, modify the file, changing the field enabled=0 to enabled=1 to reflect repositories that correspond to the machine's operating system release.

    Listing 1 is an excerpt of public-yum-el5.repo with the changed line in boldface.

    .
    .
    .
    [ol5_u7_base]
    name=Oracle Linux $releasever - U7 - $basearch - base
    baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/7/base/$basearch/
    gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
    gpgcheck=1
    enabled=1
    
    [el5_addons]
    name=Enterprise Linux $releasever - $basearch - addons
    baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/addons/$basearch/
    gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
    gpgcheck=1
    enabled=0
    .
    .
    .
    

    Listing 1. Excerpt of public-yum-el5.repo file.

    Because the target system is running Oracle Linux Release 5 Update 7 for x86_64, there is one repository to enable, [ol5_u7_base]. For some distributions that include the Oracle Unbreakable Enterprise Kernel (specifically Oracle Linux 5.5 and 5.6), the repository [el5_addons] is also needed to resolve a dependency for kernel-uek-headers.

  3. Next, install the oracle-validated RPM using the yum install command.

    The output in Listing 2 shows how the installation checks dependencies and then downloads and installs the required packages.

    # yum install oracle-validated 
    Loaded plugins: rhnplugin, security
    This system is not registered with ULN.
    ULN support will be disabled.
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package oracle-validated.x86_64 0:1.1.0-14.el5 set to be updated
    --> Processing Dependency: libXp.so.6 for package: oracle-validated
    --> Processing Dependency: gdb for package: oracle-validated
    --> Processing Dependency: /usr/lib/libodbccr.so for package: oracle-validated
    --> Processing Dependency: /usr/lib64/libc.so for package: oracle-validated
    --> Processing Dependency: gcc-c++ for package: oracle-validated
    --> Processing Dependency: gcc for package: oracle-validated
    --> Processing Dependency: /usr/lib64/libodbccr.so for package: oracle-validated
    --> Processing Dependency: unixODBC-devel for package: oracle-validated
    --> Processing Dependency: libaio-devel for package: oracle-validated
    --> Processing Dependency: elfutils-libelf-devel for package: oracle-validated
    --> Processing Dependency: sysstat for package: oracle-validated
    --> Processing Dependency: kernel-headers for package: oracle-validated
    --> Processing Dependency: /usr/lib64/libaio.so for package: oracle-validated
    --> Processing Dependency: glibc-headers for package: oracle-validated
    --> Processing Dependency: /usr/lib/libodbc.so.1 for package: oracle-validated
    --> Processing Dependency: /usr/lib/libaio.so for package: oracle-validated
    --> Processing Dependency: /usr/lib/libc.so for package: oracle-validated
    --> Processing Dependency: compat-gcc-34-c++ for package: oracle-validated
    --> Processing Dependency: compat-gcc-34 for package: oracle-validated
    --> Processing Dependency: /usr/lib/gcc/x86_64-redhat-linux/4.1.1/libstdc++.a for 
    package: oracle-validated
    --> Processing Dependency: libdb-4.2.so()(64bit) for package: oracle-validated
    --> Processing Dependency: libodbc.so.1()(64bit) for package: oracle-validated
    --> Running transaction check
    ---> Package compat-db.x86_64 0:4.2.52-5.1 set to be updated
    ---> Package compat-gcc-34.x86_64 0:3.4.6-4.1 set to be updated
    ---> Package compat-gcc-34-c++.x86_64 0:3.4.6-4.1 set to be updated
    ---> Package elfutils-libelf-devel.x86_64 0:0.137-3.el5 set to be updated
    --> Processing Dependency: elfutils-libelf-devel-static-x86_64 = 0.137-3.el5 for 
    package: elfutils-libelf-devel
    ---> Package gcc.x86_64 0:4.1.2-51.el5 set to be updated
    ---> Package gcc-c++.x86_64 0:4.1.2-51.el5 set to be updated
    ---> Package gdb.x86_64 0:7.0.1-37.el5 set to be updated
    ---> Package glibc-devel.i386 0:2.5-65 set to be updated
    ---> Package glibc-devel.x86_64 0:2.5-65 set to be updated
    ---> Package glibc-headers.x86_64 0:2.5-65 set to be updated
    ---> Package kernel-headers.x86_64 0:2.6.18-274.el5 set to be updated
    ---> Package libXp.i386 0:1.0.0-8.1.el5 set to be updated
    ---> Package libaio-devel.i386 0:0.3.106-5 set to be updated
    ---> Package libaio-devel.x86_64 0:0.3.106-5 set to be updated
    ---> Package libstdc++-devel.x86_64 0:4.1.2-51.el5 set to be updated
    ---> Package sysstat.x86_64 0:7.0.2-11.el5 set to be updated
    ---> Package unixODBC.i386 0:2.2.11-7.1 set to be updated
    ---> Package unixODBC.x86_64 0:2.2.11-7.1 set to be updated
    ---> Package unixODBC-devel.i386 0:2.2.11-7.1 set to be updated
    ---> Package unixODBC-devel.x86_64 0:2.2.11-7.1 set to be updated
    --> Running transaction check
    ---> Package elfutils-libelf-devel-static.x86_64 0:0.137-3.el5 set to be updated
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ================================================================================
     Package                        Arch     Version            Repository     Size
    ================================================================================
    Installing:
     oracle-validated               x86_64   1.1.0-14.el5       ol5_u7_base    24 k
    Installing for dependencies:
     compat-db                      x86_64   4.2.52-5.1         ol5_u7_base   1.6 M
     compat-gcc-34                  x86_64   3.4.6-4.1          ol5_u7_base   4.3 M
     compat-gcc-34-c++              x86_64   3.4.6-4.1          ol5_u7_base    13 M
     elfutils-libelf-devel          x86_64   0.137-3.el5        ol5_u7_base    24 k
     elfutils-libelf-devel-static   x86_64   0.137-3.el5        ol5_u7_base    64 k
     gcc                            x86_64   4.1.2-51.el5       ol5_u7_base   5.3 M
     gcc-c++                        x86_64   4.1.2-51.el5       ol5_u7_base   3.8 M
     gdb                            x86_64   7.0.1-37.el5       ol5_u7_base   2.4 M
     glibc-devel                    i386     2.5-65             ol5_u7_base   2.0 M
     glibc-devel                    x86_64   2.5-65             ol5_u7_base   2.4 M
     glibc-headers                  x86_64   2.5-65             ol5_u7_base   594 k
     kernel-headers                 x86_64   2.6.18-274.el5     ol5_u7_base   1.3 M
     libXp                          i386     1.0.0-8.1.el5      ol5_u7_base    22 k
     libaio-devel                   i386     0.3.106-5          ol5_u7_base    12 k
     libaio-devel                   x86_64   0.3.106-5          ol5_u7_base    11 k
     libstdc++-devel                x86_64   4.1.2-51.el5       ol5_u7_base   2.8 M
     sysstat                        x86_64   7.0.2-11.el5       ol5_u7_base   187 k
     unixODBC                       i386     2.2.11-7.1         ol5_u7_base   830 k
     unixODBC                       x86_64   2.2.11-7.1         ol5_u7_base   835 k
     unixODBC-devel                 i386     2.2.11-7.1         ol5_u7_base   743 k
     unixODBC-devel                 x86_64   2.2.11-7.1         ol5_u7_base   799 k
    
    Transaction Summary
    ================================================================================
    Install      22 Package(s)
    Upgrade       0 Package(s)
    
    Total size: 42 M
    Total download size: 594 k
    Is this ok [y/N]: y
    Downloading Packages:
    glibc-headers-2.5-65.x86_64.rpm                          | 594 kB     00:00     
    warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 1e5e0159
    ol5_u7_base/gpgkey                                       | 1.4 kB     00:00     
    Importing GPG key 0x1E5E0159 "Oracle OSS group (Open Source Software group) 
    <build@oss.oracle.com>" from http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
    Is this ok [y/N]: y
    Running rpm_check_debug
    Running Transaction Test
    Finished Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Installing     : unixODBC                                                1/22 
      Installing     : libstdc++-devel                                         2/22 
      Installing     : kernel-headers                                          3/22 
      Installing     : gdb                                                     4/22 
      Installing     : compat-db                                               5/22 
      Installing     : sysstat                                                 6/22 
      Installing     : glibc-headers                                           7/22 
      Installing     : glibc-devel                                             8/22 
      Installing     : compat-gcc-34                                           9/22 
      Installing     : glibc-devel                                            10/22 
      Installing     : unixODBC-devel                                         11/22 
      Installing     : libaio-devel                                           12/22 
      Installing     : libaio-devel                                           13/22 
      Installing     : unixODBC                                               14/22 
      Installing     : libXp                                                  15/22 
      Installing     : gcc                                                    16/22 
      Installing     : gcc-c++                                                17/22 
      Installing     : compat-gcc-34-c++                                      18/22 
      Installing     : unixODBC-devel                                         19/22 
      Installing     : elfutils-libelf-devel                                  20/22 
      Installing     : oracle-validated                                       21/22 
      Installing     : elfutils-libelf-devel-static                           22/22 
    
    Installed:
      oracle-validated.x86_64 0:1.1.0-14.el5                                               
    
    Dependency Installed:
      compat-db.x86_64 0:4.2.52-5.1                                                        
      compat-gcc-34.x86_64 0:3.4.6-4.1                                                     
      compat-gcc-34-c++.x86_64 0:3.4.6-4.1                                                 
      elfutils-libelf-devel.x86_64 0:0.137-3.el5                                           
      elfutils-libelf-devel-static.x86_64 0:0.137-3.el5                                    
      gcc.x86_64 0:4.1.2-51.el5                                                            
      gcc-c++.x86_64 0:4.1.2-51.el5                                                        
      gdb.x86_64 0:7.0.1-37.el5                                                            
      glibc-devel.i386 0:2.5-65                                                            
      glibc-devel.x86_64 0:2.5-65                                                          
      glibc-headers.x86_64 0:2.5-65                                                        
      kernel-headers.x86_64 0:2.6.18-274.el5                                               
      libXp.i386 0:1.0.0-8.1.el5                                                           
      libaio-devel.i386 0:0.3.106-5                                                        
      libaio-devel.x86_64 0:0.3.106-5                                                      
      libstdc++-devel.x86_64 0:4.1.2-51.el5                                                
      sysstat.x86_64 0:7.0.2-11.el5                                                        
      unixODBC.i386 0:2.2.11-7.1                                                           
      unixODBC.x86_64 0:2.2.11-7.1                                                         
      unixODBC-devel.i386 0:2.2.11-7.1                                                     
      unixODBC-devel.x86_64 0:2.2.11-7.1                                                   
    
    Complete!
    

    Listing 2. Installing the oracle-validated RPM.

    The yum installation logs messages about kernel changes in the file /var/log/oracle-validated/results/orakernel.log, and it makes backups of current system settings in the directory /var/log/oracle-validated/backup.

  4. At this point, the system is ready for the installation of Oracle Database. For example, to install Oracle Database 11g Release 2, follow the directions in Chapter 4, Installing Oracle Database, of the Database Installation Guide for Linux.

    The directions instruct you to do the following:

    1. As root, create a parent directory in a file system that has sufficient space to be the target location for the downloaded files:

      # mkdir /home/OraDB11g
      # cd /home/OraDB11g
      

      The amount of disk space needed in the file system varies according to the specific installation type, but roughly twice the size of the zip archives, or 5 GB, is enough to house the software and data files.

    2. Into this target directory, download the installation media files from the Oracle Database Software Downloads page on Oracle Technology Network.
    3. Extract the files:

      # unzip linux.x64_11gR2_database_1of2.zip
      # unzip linux.x64_11gR2_database_2of2.zip 
      
    4. Log in as the user oracle. Change directory to the database directory and enter the following command to run the Oracle Universal Installer:

      $ cd /home/OraDB11g/database
      $ ./runInstaller 
      

      The Oracle Universal Installer performs a number of checks, verifying that the necessary OS packages and versions are installed. In addition, it checks kernel parameters set by the oracle-validated installation. During the kernel settings check, the Installer might flag a few settings as "failed," and you should investigate these failures. In some cases, you still might be able to continue with the database installation. If you check kernel settings in /etc/sysctl.conf, you'll see that oracle-validated recommends different settings for Oracle Database 10g than for Oracle Database 11g. If necessary, you can (as root) edit the file /etc/sysctl.conf to specify a setting manually, for example:

      # vi /etc/sysctl.conf 
      # /sbin/sysctl -p
      

      The Oracle Universal Installer performs additional checks, such as verifying the glibc version, sufficient disk space, environmental variable and path settings, and sufficient physical memory and swap space. Generally, installing oracle-validated takes care of the prerequisites so that you can proceed directly with installing the database.

Final Thoughts

Installing the oracle-validated RPM can save time when installing Oracle Database 10g or 11g on Oracle Linux. The RPM addresses most Oracle Database installation prerequisites and greatly simplifies the installation process.

See Also

Here are the resources referenced earlier in this document:

And here are some additional resources from the Oracle Database Documentation Library (http://www.oracle.com/pls/db112/homepage). Relevant subsections from the Oracle Database Installation Guide 11g Release 2 (11.2) for Linux (http://download.oracle.com/docs/cd/E11882_01/install.112/e16763/toc.htm) with currently valid URLs are as follows:

Also see these related blog entries:

About the Author

Ginny Henningsen has worked for the last 15 years as a freelance writer developing technical collateral and documentation for high-tech companies. Prior to that, Ginny worked for Sun Microsystems, Inc. as a Systems Engineer in King of Prussia, PA and Milwaukee, WI. Ginny has a BA from Carnegie-Mellon University and a MSCS from Villanova University.

Revision 1.0, 09/13/2011

Follow us:
Blog | Facebook | Twitter | YouTube