User Rating: 3 / 5

Star ActiveStar ActiveStar ActiveStar InactiveStar Inactive
 

This article will show how to install Oracle 11gR2 RDBMS software in silent mode ( Command line only, no GUI).

It is usual that you have an shell terminal access to a server without graphical X display.
In that case, it may be usefull to install Oracle in silent mode.

Before starting, you will need :
- Oracle Linux 7 installed (see oel7 installation here)
- Oracle Grid Infrastructure installed (optional but recommanded, see install here)
- Oracle 11g installation files downloaded
   * 11.2.0.4 is available on MOS (recommanded)
   * 11.2.0.1 is available on OTN
- at least 5GB free disk space

Be aware ...
Starting with Oracle Database 11g Release 2 (11.2.0.4), Oracle Linux 7 and Red Hat Enterprise Linux 7 are supported on Linux x86-64 systems. (see certification information here)

Install Prerequisites

Automatic preinstall setup

The easiest way is to use an oracle package call "oracle-rdbms-server-11gR2-preinstall"

Overview

This special package will install required packages needed for Oracle 11g and also add/change some system parameters by modifying the following system files : /etc/sysctl.conf /etc/passwd /etc/group /etc/security/limits.conf

Here is its packages dependencies below.

oracle-rdbms-server-11gR2-preinstall.x86_64
    |- compat-libcap1
    |- compat-libstdc++-33
    |- gcc-c++
    |    |- gcc
    |    |    |- libgomp
    |    |    |- cpp
    |    |    `- libgcc
    |    `- libstdc++
    |- ksh
    |- libaio-devel
    `- libstdc++-devel

Deployment

Install required packages with these two following commands as root:

$ yum -y --enablerepo=ol7_addons install oracle-rdbms-server-11gR2-preinstall.x86_64

$ yum -y install glibc

Check commands output below

# Install all required package with oracle-rdbms-server-11gR2-preinstall
[root]$ yum -y --enablerepo=ol7_addons install oracle-rdbms-server-11gR2-preinstall.x86_64
    Loaded plugins: langpacks
    Resolving Dependencies
    --> Running transaction check
    ---> Package oracle-rdbms-server-11gR2-preinstall.x86_64 0:1.0-3.el7 will be installed
    --> Processing Dependency: gcc-c++ for package: oracle-rdbms-server-11gR2-preinstall-1.0-3.el7.x86_64
    --> Processing Dependency: compat-libcap1 for package: oracle-rdbms-server-11gR2-preinstall-1.0-3.el7.x86_64
    --> Processing Dependency: ksh for package: oracle-rdbms-server-11gR2-preinstall-1.0-3.el7.x86_64
    --> Processing Dependency: libaio-devel for package: oracle-rdbms-server-11gR2-preinstall-1.0-3.el7.x86_64
    --> Processing Dependency: compat-libstdc++-33 for package: oracle-rdbms-server-11gR2-preinstall-1.0-3.el7.x86_64
    --> Processing Dependency: libstdc++-devel for package: oracle-rdbms-server-11gR2-preinstall-1.0-3.el7.x86_64
    --> Running transaction check
    ---> Package compat-libcap1.x86_64 0:1.10-7.el7 will be installed
    ---> Package compat-libstdc++-33.x86_64 0:3.2.3-72.el7 will be installed
    ---> Package gcc-c++.x86_64 0:4.8.3-9.el7 will be installed
    --> Processing Dependency: gcc = 4.8.3-9.el7 for package: gcc-c++-4.8.3-9.el7.x86_64
    --> Processing Dependency: libstdc++ = 4.8.3-9.el7 for package: gcc-c++-4.8.3-9.el7.x86_64
    ---> Package ksh.x86_64 0:20120801-22.el7 will be installed
    ---> Package libaio-devel.x86_64 0:0.3.109-12.el7 will be installed
    ---> Package libstdc++-devel.x86_64 0:4.8.3-9.el7 will be installed
    --> Running transaction check
    ---> Package gcc.x86_64 0:4.8.2-16.el7 will be updated
    ---> Package gcc.x86_64 0:4.8.3-9.el7 will be an update
    --> Processing Dependency: libgomp = 4.8.3-9.el7 for package: gcc-4.8.3-9.el7.x86_64
    --> Processing Dependency: cpp = 4.8.3-9.el7 for package: gcc-4.8.3-9.el7.x86_64
    --> Processing Dependency: libgcc >= 4.8.3-9.el7 for package: gcc-4.8.3-9.el7.x86_64
    ---> Package libstdc++.x86_64 0:4.8.2-16.el7 will be updated
    ---> Package libstdc++.x86_64 0:4.8.3-9.el7 will be an update
    --> Running transaction check
    ---> Package cpp.x86_64 0:4.8.2-16.el7 will be updated
    ---> Package cpp.x86_64 0:4.8.3-9.el7 will be an update
    ---> Package libgcc.x86_64 0:4.8.2-16.el7 will be updated
    ---> Package libgcc.x86_64 0:4.8.3-9.el7 will be an update
    ---> Package libgomp.x86_64 0:4.8.2-16.el7 will be updated
    ---> Package libgomp.x86_64 0:4.8.3-9.el7 will be an update
    --> Finished Dependency Resolution

    Dependencies Resolved

    ================================================================================================================
     Package                                      Arch           Version                   Repository          Size
    ================================================================================================================
    Installing:
     oracle-rdbms-server-11gR2-preinstall         x86_64         1.0-3.el7                 ol7_latest          18 k
    Installing for dependencies:
     compat-libcap1                               x86_64         1.10-7.el7                ol7_latest          17 k
     compat-libstdc++-33                          x86_64         3.2.3-72.el7              ol7_latest         190 k
     gcc-c++                                      x86_64         4.8.3-9.el7               ol7_latest         7.2 M
     ksh                                          x86_64         20120801-22.el7           ol7_latest         879 k
     libaio-devel                                 x86_64         0.3.109-12.el7            ol7_latest          12 k
     libstdc++-devel                              x86_64         4.8.3-9.el7               ol7_latest         1.5 M
    Updating for dependencies:
     cpp                                          x86_64         4.8.3-9.el7               ol7_latest         5.9 M
     gcc                                          x86_64         4.8.3-9.el7               ol7_latest          16 M
     libgcc                                       x86_64         4.8.3-9.el7               ol7_latest          91 k
     libgomp                                      x86_64         4.8.3-9.el7               ol7_latest         127 k
     libstdc++                                    x86_64         4.8.3-9.el7               ol7_latest         294 k

    Transaction Summary
    ================================================================================================================
    Install  1 Package  (+6 Dependent packages)
    Upgrade             ( 5 Dependent packages)

    Total download size: 32 M
    Is this ok [y/d/N]: y
    Downloading packages:
    No Presto metadata available for ol7_latest
    (1/12): compat-libcap1-1.10-7.el7.x86_64.rpm                                             |  17 kB  00:00:00     
    (2/12): compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm                                      | 190 kB  00:00:00     
    (3/12): cpp-4.8.3-9.el7.x86_64.rpm                                                       | 5.9 MB  00:00:00     
    (4/12): gcc-c++-4.8.3-9.el7.x86_64.rpm                                                   | 7.2 MB  00:00:00     
    (5/12): gcc-4.8.3-9.el7.x86_64.rpm                                                       |  16 MB  00:00:01     
    (6/12): ksh-20120801-22.el7.x86_64.rpm                                                   | 879 kB  00:00:00     
    (7/12): libaio-devel-0.3.109-12.el7.x86_64.rpm                                           |  12 kB  00:00:00     
    (8/12): libgcc-4.8.3-9.el7.x86_64.rpm                                                    |  91 kB  00:00:00     
    (9/12): libgomp-4.8.3-9.el7.x86_64.rpm                                                   | 127 kB  00:00:00     
    (10/12): libstdc++-4.8.3-9.el7.x86_64.rpm                                                | 294 kB  00:00:00     
    (11/12): oracle-rdbms-server-11gR2-preinstall-1.0-3.el7.x86_64.rpm                       |  18 kB  00:00:00     
    (12/12): libstdc++-devel-4.8.3-9.el7.x86_64.rpm                                          | 1.5 MB  00:00:00     
    ----------------------------------------------------------------------------------------------------------------
    Total                                                                            13 MB/s |  32 MB  00:00:02     
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
      Updating   : libgcc-4.8.3-9.el7.x86_64                                                                   1/17 
      Updating   : libstdc++-4.8.3-9.el7.x86_64                                                                2/17 
      Installing : libstdc++-devel-4.8.3-9.el7.x86_64                                                          3/17 
      Installing : compat-libstdc++-33-3.2.3-72.el7.x86_64                                                     4/17 
      Installing : libaio-devel-0.3.109-12.el7.x86_64                                                          5/17 
      Updating   : libgomp-4.8.3-9.el7.x86_64                                                                  6/17 
      Installing : compat-libcap1-1.10-7.el7.x86_64                                                            7/17 
      Updating   : cpp-4.8.3-9.el7.x86_64                                                                      8/17 
      Updating   : gcc-4.8.3-9.el7.x86_64                                                                      9/17 
      Installing : gcc-c++-4.8.3-9.el7.x86_64                                                                 10/17 
      Installing : ksh-20120801-22.el7.x86_64                                                                 11/17 
      Installing : oracle-rdbms-server-11gR2-preinstall-1.0-3.el7.x86_64                                      12/17 
      Cleanup    : gcc-4.8.2-16.el7.x86_64                                                                    13/17 
      Cleanup    : libstdc++-4.8.2-16.el7.x86_64                                                              14/17 
      Cleanup    : libgcc-4.8.2-16.el7.x86_64                                                                 15/17 
      Cleanup    : cpp-4.8.2-16.el7.x86_64                                                                    16/17 
      Cleanup    : libgomp-4.8.2-16.el7.x86_64                                                                17/17 
      Verifying  : ksh-20120801-22.el7.x86_64                                                                  1/17 
      Verifying  : gcc-4.8.3-9.el7.x86_64                                                                      2/17 
      Verifying  : gcc-c++-4.8.3-9.el7.x86_64                                                                  3/17 
      Verifying  : cpp-4.8.3-9.el7.x86_64                                                                      4/17 
      Verifying  : libgcc-4.8.3-9.el7.x86_64                                                                   5/17 
      Verifying  : compat-libstdc++-33-3.2.3-72.el7.x86_64                                                     6/17 
      Verifying  : compat-libcap1-1.10-7.el7.x86_64                                                            7/17 
      Verifying  : libgomp-4.8.3-9.el7.x86_64                                                                  8/17 
      Verifying  : oracle-rdbms-server-11gR2-preinstall-1.0-3.el7.x86_64                                       9/17 
      Verifying  : libstdc++-4.8.3-9.el7.x86_64                                                               10/17 
      Verifying  : libaio-devel-0.3.109-12.el7.x86_64                                                         11/17 
      Verifying  : libstdc++-devel-4.8.3-9.el7.x86_64                                                         12/17 
      Verifying  : libgomp-4.8.2-16.el7.x86_64                                                                13/17 
      Verifying  : libgcc-4.8.2-16.el7.x86_64                                                                 14/17 
      Verifying  : gcc-4.8.2-16.el7.x86_64                                                                    15/17 
      Verifying  : cpp-4.8.2-16.el7.x86_64                                                                    16/17 
      Verifying  : libstdc++-4.8.2-16.el7.x86_64                                                              17/17 

    Installed:
      oracle-rdbms-server-11gR2-preinstall.x86_64 0:1.0-3.el7                                                       

    Dependency Installed:
      compat-libcap1.x86_64 0:1.10-7.el7                   compat-libstdc++-33.x86_64 0:3.2.3-72.el7                
      gcc-c++.x86_64 0:4.8.3-9.el7                         ksh.x86_64 0:20120801-22.el7                             
      libaio-devel.x86_64 0:0.3.109-12.el7                 libstdc++-devel.x86_64 0:4.8.3-9.el7                     

    Dependency Updated:
      cpp.x86_64 0:4.8.3-9.el7            gcc.x86_64 0:4.8.3-9.el7              libgcc.x86_64 0:4.8.3-9.el7       
      libgomp.x86_64 0:4.8.3-9.el7        libstdc++.x86_64 0:4.8.3-9.el7       

    Complete!

#Install glibc needed package
[root]$ yum -y install glibc
    Loaded plugins: langpacks
    Resolving Dependencies
    --> Running transaction check
    ---> Package glibc.x86_64 0:2.17-55.el7 will be updated
    --> Processing Dependency: glibc = 2.17-55.el7 for package: glibc-devel-2.17-55.el7.x86_64
    --> Processing Dependency: glibc = 2.17-55.el7 for package: glibc-common-2.17-55.el7.x86_64
    --> Processing Dependency: glibc = 2.17-55.el7 for package: glibc-headers-2.17-55.el7.x86_64
    ---> Package glibc.x86_64 0:2.17-78.0.1.el7 will be an update
    --> Running transaction check
    ---> Package glibc-common.x86_64 0:2.17-55.el7 will be updated
    ---> Package glibc-common.x86_64 0:2.17-78.0.1.el7 will be an update
    ---> Package glibc-devel.x86_64 0:2.17-55.el7 will be updated
    ---> Package glibc-devel.x86_64 0:2.17-78.0.1.el7 will be an update
    ---> Package glibc-headers.x86_64 0:2.17-55.el7 will be updated
    ---> Package glibc-headers.x86_64 0:2.17-78.0.1.el7 will be an update
    --> Finished Dependency Resolution

    Dependencies Resolved

    ================================================================================================================
     Package                     Arch                 Version                        Repository                Size
    ================================================================================================================
    Updating:
     glibc                       x86_64               2.17-78.0.1.el7                ol7_latest               3.6 M
    Updating for dependencies:
     glibc-common                x86_64               2.17-78.0.1.el7                ol7_latest                11 M
     glibc-devel                 x86_64               2.17-78.0.1.el7                ol7_latest               1.0 M
     glibc-headers               x86_64               2.17-78.0.1.el7                ol7_latest               656 k

    Transaction Summary
    ================================================================================================================
    Upgrade  1 Package (+3 Dependent packages)

    Total size: 17 M
    Is this ok [y/d/N]: y
    Downloading packages:
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
      Updating   : glibc-common-2.17-78.0.1.el7.x86_64                                                          1/8 
      Updating   : glibc-2.17-78.0.1.el7.x86_64                                                                 2/8 
      Updating   : glibc-headers-2.17-78.0.1.el7.x86_64                                                         3/8 
      Updating   : glibc-devel-2.17-78.0.1.el7.x86_64                                                           4/8 
      Cleanup    : glibc-devel-2.17-55.el7.x86_64                                                               5/8 
      Cleanup    : glibc-headers-2.17-55.el7.x86_64                                                             6/8 
      Cleanup    : glibc-common-2.17-55.el7.x86_64                                                              7/8 
      Cleanup    : glibc-2.17-55.el7.x86_64                                                                     8/8 
      Verifying  : glibc-devel-2.17-78.0.1.el7.x86_64                                                           1/8 
      Verifying  : glibc-2.17-78.0.1.el7.x86_64                                                                 2/8 
      Verifying  : glibc-common-2.17-78.0.1.el7.x86_64                                                          3/8 
      Verifying  : glibc-headers-2.17-78.0.1.el7.x86_64                                                         4/8 
      Verifying  : glibc-2.17-55.el7.x86_64                                                                     5/8 
      Verifying  : glibc-common-2.17-55.el7.x86_64                                                              6/8 
      Verifying  : glibc-headers-2.17-55.el7.x86_64                                                             7/8 
      Verifying  : glibc-devel-2.17-55.el7.x86_64                                                               8/8 

    Updated:
      glibc.x86_64 0:2.17-78.0.1.el7                                                                                

    Dependency Updated:
      glibc-common.x86_64 0:2.17-78.0.1.el7                   glibc-devel.x86_64 0:2.17-78.0.1.el7                 
      glibc-headers.x86_64 0:2.17-78.0.1.el7                 

    Complete!

Modified system files

oracle-rdbms-server-11gR2-preinstall has modified some linux system files as well, let's check what it did change!

# Check sysctl.conf
[root]$ cat /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 128'
    kernel.sem = 250 32000 100 128

    # oracle-rdbms-server-11gR2-preinstall setting for kernel.shmmni is 4096
    kernel.shmmni = 4096

    # oracle-rdbms-server-11gR2-preinstall setting for kernel.shmall is 1073741824 on x86_64
    # oracle-rdbms-server-11gR2-preinstall setting for kernel.shmall is 2097152 on i386
    kernel.shmall = 1073741824

    # oracle-rdbms-server-11gR2-preinstall setting for kernel.shmmax is 4398046511104 on x86_64
    # oracle-rdbms-server-11gR2-preinstall setting for kernel.shmmax is 4294967295 on i386
    kernel.shmmax = 4398046511104

    # oracle-rdbms-server-11gR2-preinstall setting for kernel.panic_on_oops is 1 per Orabug 19212317
    kernel.panic_on_oops = 1

    # oracle-rdbms-server-11gR2-preinstall setting for net.core.rmem_default is 262144
    net.core.rmem_default = 262144

    # oracle-rdbms-server-11gR2-preinstall setting for net.core.rmem_max is 4194304
    net.core.rmem_max = 4194304

    # oracle-rdbms-server-11gR2-preinstall setting for net.core.wmem_default is 262144
    net.core.wmem_default = 262144

    # oracle-rdbms-server-11gR2-preinstall setting for net.core.wmem_max is 1048576
    net.core.wmem_max = 1048576

    # oracle-rdbms-server-11gR2-preinstall setting for fs.aio-max-nr is 1048576
    fs.aio-max-nr = 1048576

    # oracle-rdbms-server-11gR2-preinstall setting for net.ipv4.ip_local_port_range is 9000 65500
    net.ipv4.ip_local_port_range = 9000 65500

# Check added group and user
[root]$ grep -e "oracle" /etc/passwd
    oracle:x:54321:54321::/home/oracle:/bin/bash

[root]$ grep -e "oinstall" -e "dba" -e "oper" /etc/group
    oinstall:x:54321:
    dba:x:54322:oracle

# Check limits.conf
[root]$ tail -24 /etc/security/limits.conf
    # oracle-rdbms-server-11gR2-preinstall setting for nofile soft limit is 1024
    oracle   soft   nofile    1024

    # oracle-rdbms-server-11gR2-preinstall setting for nofile hard limit is 65536
    oracle   hard   nofile    65536

    # oracle-rdbms-server-11gR2-preinstall setting for nproc soft limit is 16384
    # refer orabug15971421 for more info.
    oracle   soft   nproc    16384

    # oracle-rdbms-server-11gR2-preinstall setting for nproc hard limit is 16384
    oracle   hard   nproc    16384

    # oracle-rdbms-server-11gR2-preinstall setting for stack soft limit is 10240KB
    oracle   soft   stack    10240

    # oracle-rdbms-server-11gR2-preinstall setting for stack hard limit is 32768KB
    oracle   hard   stack    32768

    # oracle-rdbms-server-11gR2-preinstall setting for memlock hard limit is maximum of {128GB (x86_64) / 3GB (x86) or 90 % of RAM}
    oracle   hard   memlock    134217728

    # oracle-rdbms-server-11gR2-preinstall setting for memlock soft limit is maximum of {128GB (x86_64) / 3GB (x86) or 90% of RAM}
    oracle   soft   memlock    134217728

Manual preinstall setup

Packages

Install required packages with the following command

[root]$ yum -y install compat-libcap1 compat-libstdc++-33 gcc-c++ ksh libaio-devel libstdc++-devel glibc

Users and groups

Create minimal required groups and users with the following commands:

[root]$ /usr/sbin/groupadd -g 54321 oinstall
[root]$ /usr/sbin/groupadd -g 54322 dba
[root]$ /usr/sbin/useradd -u 54321 oracle
[root]$ /usr/sbin/usermod -g oinstall -G dba oracle
[root]$ passwd oracle

Kernel parameters

In order to satisfy the Oracle installer's requirements, modify the /etc/sysctl.conf file by adding or amending the following lines:

fs.file-max = 6815744
fs.aio-max-nr = 1048576
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.ip_local_port_range = 9000 65500

Make these changes effective immediately with the following command

[root]$ /sbin/sysctl -p

Shell Limits

To improve the performance, you can increase the shell limits for the oracle user by adding the following lines to /etc/security/limits.conf:

oracle   soft   nofile   1024
oracle   hard   nofile   65536
oracle   soft   nproc    16384
oracle   hard   nproc    16384
oracle   soft   stack    10240
oracle   hard   stack    32768

Make sure, the following lines is in /etc/pam.d/login file:

session required pam_limits.so

Additional setup

Additionnal packages

[root]$ yum -y install unixODBC elfutils-libelf-devel xorg-x11-xinit sysstat rsync

Hosts files

In order to connect to oracle from another machine, Oracle need a fully qualified name for the server otherwise loopback connecton will be used.
You will need to add a new line in /etc/hosts structured as follow

<IP-address>  <fully-qualified-machine-name>  <machine-name>

For example, a server named oel7db in localdomain with 192.168.0.34 ip address

# Add the new host line
[root]$ printf "\n192.168.0.34\toel7db.localdomain oel7db" >> /etc/hosts

# /etc/hosts should contain at least these two lines
[root]$ cat /etc/hosts
    127.0.0.1       localhost localhost.localdomain
    192.168.0.34    oel7db.localdomain  oel7db

# Set the hostname
[root]$ echo "oel7db.localdomain" > /etc/hostname
[root]$ hostname "oel7db.localdomain"

Oracle user limits

Make sure oracle user's default shell is Bourne, Bash, or Korn shell.
Then add the following lines to the end of /etc/profile file:

if [ $USER = "oracle" ]; then
    if [ $SHELL = "/bin/ksh" ]; then
        ulimit -p 16384
        ulimit -n 65536
    else
        ulimit -u 16384 -n 65536
    fi
fi

Mountpoint with dedicated filesystem

It is advised to create a mountpoint with a dedicated filesystem which will store oracle binaries for several reasons:

  • to not to fill up root filesystem
  • to increase this specific filesystem only if needed
  • to be able to move disk and filesystems to an other server

Execute theses commands as root for a new sdb disk:

# Create filesystem
$ fdisk /dev/sdb
    # then press p <enter> <enter> w

$ mkfs -t xfs /dev/sdb1

# Create mountpoint directory
$ mkdir /u01
$ chown oracle.oinstall /u01
$ chmod 775 /u01

# Mount mountpoint
$ printf "\n/dev/sdb1 \t/u01\txfs \tdefaults \t1 2\n" >> /etc/fstab
$ mount /u01

Check output below

# If sdb is the new added disk
# Create partition on the new disk
[root]$ fdisk /dev/sdb
    Welcome to fdisk (util-linux 2.23.2).

    Changes will remain in memory only, until you decide to write them.
    Be careful before using the write command.

    Command (m for help):n
    Partition type:
       p   primary (1 primary, 0 extended, 3 free)
       e   extended
    Select (default p): p
    First cylinder (1-6, default 1): 1
    Last cylinder or +size or +sizeM or +sizeK (1-6, default 6): 6

    Command (m for help): w
    The partition table has been altered!

    Calling ioctl() to re-read partition table.
    Syncing disks.

# Check new created partition
[root]$ fdisk -l /dev/sdb
    Disk /dev/sdb: 6442 MB, 6442450944 bytes, 12582912 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk label type: dos
    Disk identifier: 0x23f11588

       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1            2048    12582911     6290432   83  Linux

# Create filesystem
[root]$ mkfs -t xfs /dev/sdb1
    meta-data=/dev/sdb1              isize=256    agcount=4, agsize=131008 blks
             =                       sectsz=512   attr=2, projid32bit=1
             =                       crc=0
    data     =                       bsize=4096   blocks=1572608, imaxpct=25
             =                       sunit=0      swidth=0 blks
    naming   =version 2              bsize=4096   ascii-ci=0 ftype=0
    log      =internal log           bsize=4096   blocks=2560, version=2
             =                       sectsz=512   sunit=0 blks, lazy-count=1
    realtime =none                   extsz=4096   blocks=0, rtextents=0

# Create mountpoint
[root]$ mkdir /u01
[root]$ chown root.oinstall /u01
[root]$ chmod 775 /u01

# Mount mountpoint
[root]$ printf "\n/dev/sdb1\t/u01\txfs\tdefaults\t1 2\n" >> /etc/fstab
[root]$ mount /u01
[root]$ df -m | grep /u01
    /dev/sdb1                6133   4049      2085  67% /u01

Install Oracle 11g

Uncompress installation files

# Go to folder containing installation zip files first
# Then execute this command
[oracle]$ ls linux.x64_11gR2_database*.zip | xargs -I{} unzip {} 

Manual silent install

# Create directories
[oracle]$ ORACLE_INVENTORY_LOC=/u01/app/oraInventory
[oracle]$ ORACLE_BASE=/u01/app/oracle
[oracle]$ ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1

[oracle]$ mkdir -p $ORACLE_INVENTORY_LOC
[oracle]$ mkdir -p $ORACLE_HOME

# Run silent installer
[oracle]$ cd oracle11g_install_files
[oracle]$ ./runInstaller -waitForCompletion -silent \
  FROM_LOCATION=${PWD}/stage/products.xml \
  oracle.install.option=INSTALL_DB_SWONLY \
  ORACLE_HOSTNAME="${HOSTNAME}" \
  UNIX_GROUP_NAME=oinstall \
  INVENTORY_LOCATION="${ORACLE_INVENTORY_LOC}" \
  ORACLE_HOME="${ORACLE_HOME}" \
  ORACLE_BASE="${ORACLE_BASE}" \
  oracle.install.db.InstallEdition=EE \
  oracle.install.db.isCustomInstall=false \
  oracle.install.db.DBA_GROUP=dba \
  oracle.install.db.OPER_GROUP=dba \
  DECLINE_SECURITY_UPDATES=true

    ...

Installation shell script

Here is a simple script you use instead doing the manual install.
You need to update the script variables to your needs.

#!/bin/ksh

  #== variables ==#
ORACLE_INSTALLFILES_DIR=/media/sf_uxora_share/database

ORACLE_USER=oracle
ORACLE_GRP_DBA=dba
ORACLE_GRP_OPER=dba
ORACLE_GRP_INST=oinstall

ORACLE_INVENTORY_LOC=/u01/app/oraInventory
ORACLE_BASE=/u01/app/oracle
ORACLE_DB_FOLDER_NAME=db_1

HOSTNAME=$(hostname)

  #== Make sure only root can run this script ==#
if [[ $(id -u) -ne 0 ]]; then
   echo "ERROR: This script must be run as root" 1>&2
   exit 1
fi

  #== Retrieve oracle version ==#
if [[ -r "${ORACLE_INSTALLFILES_DIR}/stage/products.xml" ]]; then
    ORACLE_VERSION=$( grep  -e '^<COMP NAME="oracle.server" VER=' "${ORACLE_INSTALLFILES_DIR}/stage/products.xml" | cut -c33-38 )
else
    echo "ERROR: Oracle version cannot be found in ${ORACLE_INSTALLFILES_DIR}/stage/products.xml" 1>&2
    exit 2
fi
 
  #== Check ORACLE_HOME ==#
ORACLE_HOME=${ORACLE_BASE}/product/${ORACLE_VERSION}/${ORACLE_DB_FOLDER_NAME}
if [[ -e "${ORACLE_HOME}" ]]; then
   echo "ERROR: ORACLE_HOME already exists: ${ORACLE_HOME}" 1>&2
   exit 3
fi

  #== Create directories ==#
mkdir -p ${ORACLE_INVENTORY_LOC}
mkdir -p ${ORACLE_HOME}

chown -R ${ORACLE_USER}:${ORACLE_GRP_INST} ${ORACLE_BASE} ${ORACLE_INVENTORY_LOC}
chmod -R 775 ${ORACLE_BASE} ${ORACLE_INVENTORY_LOC}

  #== Oracle SGBD install ==#
su - ${ORACLE_USER} -c "
cd ${ORACLE_INSTALLFILES_DIR}
./runInstaller -waitForCompletion -silent \
FROM_LOCATION=${ORACLE_INSTALLFILES_DIR}/stage/products.xml \
oracle.install.option=INSTALL_DB_SWONLY \
ORACLE_HOSTNAME="${HOSTNAME}" \
UNIX_GROUP_NAME=${ORACLE_GRP_INST} \
INVENTORY_LOCATION="${ORACLE_INVENTORY_LOC}" \
ORACLE_HOME="${ORACLE_HOME}" \
ORACLE_BASE="${ORACLE_BASE}" \
oracle.install.db.InstallEdition=EE \
oracle.install.db.isCustomInstall=false \
oracle.install.db.DBA_GROUP=${ORACLE_GRP_DBA} \
oracle.install.db.OPER_GROUP=${ORACLE_GRP_OPER} \
DECLINE_SECURITY_UPDATES=true
"

  #== Post install ==#
[[ -r ${ORACLE_HOME}/root.sh ]] && ${ORACLE_HOME}/root.sh || echo "ERROR: root.sh not found"

echo "Please check log file for error."

exit 0

 

Then execute the script as below

# Execute script to install oracle
[root]$ ./ora_install_sgbd.sh
    Starting Oracle Universal Installer...

    Checking Temp space: must be greater than 120 MB.   Actual 4427 MB    Passed
    Checking swap space: must be greater than 150 MB.   Actual 1227 MB    Passed
    Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-03-22_08-04-37AM. Please wait ...[WARNING] [INS-13014] Target environment do not meet some optional requirements.
       CAUSE: Some of the optional prerequisites are not met. See logs for details. /u01/app/oraInventory/logs/installActions2015-03-22_08-04-37AM.log
       ACTION: Identify the list of failed prerequisite checks from the log: /u01/app/oraInventory/logs/installActions2015-03-22_08-04-37AM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
    [WARNING] [INS-13014] Target environment do not meet some optional requirements.
       CAUSE: Some of the optional prerequisites are not met. See logs for details. /u01/app/oraInventory/logs/installActions2015-03-22_08-04-37AM.log
       ACTION: Identify the list of failed prerequisite checks from the log: /u01/app/oraInventory/logs/installActions2015-03-22_08-04-37AM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
    You can find the log of this install session at:
     /u01/app/oraInventory/logs/installActions2015-03-22_08-04-37AM.log
    [WARNING] [INS-13014] Target environment do not meet some optional requirements.
       CAUSE: Some of the optional prerequisites are not met. See logs for details. /u01/app/oraInventory/logs/installActions2015-03-22_08-04-37AM.log
       ACTION: Identify the list of failed prerequisite checks from the log: /u01/app/oraInventory/logs/installActions2015-03-22_08-04-37AM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
    The following configuration scripts need to be executed as the "root" user. 
     #!/bin/sh 
     #Root scripts to run

    /u01/app/oracle/product/11.2.0/db_1/root.sh
    To execute the configuration scripts:
         1. Open a terminal window 
         2. Log in as "root" 
         3. Run the scripts 
         4. Return to this window and hit "Enter" key to continue 

    Successfully Setup Software.
    Check /u01/app/oracle/product/11.2.0/db_1/install/root_localhost.localdomain_2015-03-22_08-07-31.log for the output of root script
    Please check log file for error.

Make sure you check log file for error other than non-critical prerequisites.
Check this article here if you encounter some errors

Oracle 11gR2 is now installed.

Post Installation

Disable database options

If you don't have some additional licenses and you want to make sure you don't use it, You can disable/enable database option as follow :

[oracle]$ cd $ORACLE_HOME

# Disable Oracle Data Mining RDBMS
[oracle]$ chopt disable dm

    Writing to /u01/app/oracle/product/11.2.0/db_1/install/disable_dm.log...
    %s_unixOSDMakePath% -f /u01/app/oracle/product/11.2.0/db_1/rdbms/lib/ins_rdbms.mk dm_off
    %s_unixOSDMakePath% -f /u01/app/oracle/product/11.2.0/db_1/rdbms/lib/ins_rdbms.mk ioracle

# Disable Oracle Database Vault
[oracle]$ chopt disable dv

    Writing to /u01/app/oracle/product/11.2.0/db_1/install/disable_dv.log...
    %s_unixOSDMakePath% -f /u01/app/oracle/product/11.2.0/db_1/rdbms/lib/ins_rdbms.mk dv_off
    %s_unixOSDMakePath% -f /u01/app/oracle/product/11.2.0/db_1/rdbms/lib/ins_rdbms.mk ioracle

# Disable Oracle Label Security
[oracle]$ chopt disable lbac

    Writing to /u01/app/oracle/product/11.2.0/db_1/install/disable_lbac.log...
    %s_unixOSDMakePath% -f /u01/app/oracle/product/11.2.0/db_1/rdbms/lib/ins_rdbms.mk lbac_off
    %s_unixOSDMakePath% -f /u01/app/oracle/product/11.2.0/db_1/rdbms/lib/ins_rdbms.mk ioracle

# Disable Oracle OLAP
[oracle]$ chopt disable olap

    Writing to /u01/app/oracle/product/11.2.0/db_1/install/disable_olap.log...
    %s_unixOSDMakePath% -f /u01/app/oracle/product/11.2.0/db_1/rdbms/lib/ins_rdbms.mk olap_off
    %s_unixOSDMakePath% -f /u01/app/oracle/product/11.2.0/db_1/rdbms/lib/ins_rdbms.mk ioracle

# Disable Oracle Real Application Testing
[oracle]$ chopt disable rat

    Writing to /u01/app/oracle/product/11.2.0/db_1/install/disable_rat.log...
    %s_unixOSDMakePath% -f /u01/app/oracle/product/11.2.0/db_1/rdbms/lib/ins_rdbms.mk rat_off
    %s_unixOSDMakePath% -f /u01/app/oracle/product/11.2.0/db_1/rdbms/lib/ins_rdbms.mk ioracle

# Disable Oracle Partitioning
[oracle]$ chopt disable partitioning

    Writing to /u01/app/oracle/product/11.2.0/db_1/install/disable_partitioning.log...
    %s_unixOSDMakePath% -f /u01/app/oracle/product/11.2.0/db_1/rdbms/lib/ins_rdbms.mk part_off
    %s_unixOSDMakePath% -f /u01/app/oracle/product/11.2.0/db_1/rdbms/lib/ins_rdbms.mk ioracle

User profile

Add to the ~/.bash_profile if use bash or ~/.profile if use ksh as oracle shell login

umask 022

export EDITOR=vi
export NLS_LANG='American_America.UTF8'

# Keyboard
stty erase ^?
set -o vi

# UNIX Prompt
export PS1='\u@\h:\w (${ORACLE_SID:-"no sid"})$ '

# aliases
alias ll='ls -l --color=tty'
alias mv='mv -i'
alias rm='rm -i'

alias cdoh='cd $ORACLE_HOME'
alias cdtns='cd $ORACLE_HOME/network/admin'
alias cdadm='cd $ORACLE_BASE/admin/$ORACLE_SID'

alias sq='sqlplus / as sysdba'

alias orasid='echo $ORACLE_SID'
alias oraenv='env | grep -e ^ORA -e ^TNS -e ^NLS'

Sqlplus prompt

To set SQLPLUS prompt, add to $ORACLE_HOME/sqlplus/admin/glogin.sql or login.sql

set sqlprompt "_USER'@'_CONNECT_IDENTIFIER _PRIVILEGE> "
define _editor=vi

Deinstallation

# Oracle rdbms deinstallation
[oracle]$ cd $ORACLE_HOME/deinstall
[oracle]$ ./deinstall

Please leave comments and suggestions,
Michel.

Reference
Oracle 11gR2 installation guide for Linux x86-64 here
Oracle Real User Experience Insight Installation Guide for Linux x86-64 here

Enjoyed this article? Please like it or share it.

Add comment

Please connect with one of social login below (or fill up name and email)

     


Security code
Refresh

Comments   

DBA
# [censored]s://dbpilot.netDBA 2018-02-19 15:02
Hi, guys!
Here there is a script that checks all prerequisites packages for an Oracle database and generates yum command for missing ones.
It supports different versions of RedHat releases and Oracle database versions
[censored]://dbpilot.net/2018/01/31/installing-oracle-prerequisite-packages-for-oracle-database/

The script: [censored]://dbpilot.net/wp-content/uploads/2018/0 2/dbs_prepkgs.zip [ if link is broken then the script can be downloaded directly from the post]
Issue dos2unix command on the script before you use the script.

The dbs_prepkgs.sh is analog of oracle-rdbms-server-11gR2-preinstall.x86_64 and oracle-rdbms-server-12cR1-preinstall.x86_64 packages.
Reply | Reply with quote | Quote