Skip to content
Home » Oracle » How to Build 12c RAC (3/6) - Preparing for Installations of Grid and RAC

How to Build 12c RAC (3/6) - Preparing for Installations of Grid and RAC

How to Build 12c RAC (2/6) - Building Two Servers for RAC

Before we can actually install grid infrastructure and RAC database, there's a long way to go for preparing the environment of the two servers. In this major step, we need to install required packages and get everything ready.

  1. Install required packages
  2. Set NTP clock synchronization
  3. Make sure the share memory mounted
  4. Create required groups and users
  5. Limit resource consumption and disable security
  6. Install ASMLib for managing ASM disks
  7. Edit grid profile before installation
  8. Download and unzip software

Let's start the steps.

A. Install required packages

Since we are running on Oracle Enterprise Linux 6.6, so we take the shortcut "Oracle Preinstallation RPM" which is provided by Oracle and can install all the required package in one step. If you'd like to do it by yourself, you may refer to my post: How to Install Oracle Database 12.1 Standalone on CentOS 6.5 Minimal (1/5) - Install Required Linux Packages

Install oracle-rdbms-server-12cR1-preinstall package, please notice that the package name is case-sensitive.

[root@primary01 ~]# yum -y install oracle-rdbms-server-12cR1-preinstall
Loaded plugins: security
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package oracle-rdbms-server-12cR1-preinstall.x86_64 0:1.0-14.el6 will be installed
--> Processing Dependency: xorg-x11-utils for package: oracle-rdbms-server-12cR1-preinstall-1.0-14.el6.x86_64
--> Processing Dependency: gcc-c++ for package: oracle-rdbms-server-12cR1-preinstall-1.0-14.el6.x86_64
--> Processing Dependency: compat-libcap1 for package: oracle-rdbms-server-12cR1-preinstall-1.0-14.el6.x86_64
--> Processing Dependency: ksh for package: oracle-rdbms-server-12cR1-preinstall-1.0-14.el6.x86_64
--> Processing Dependency: libaio-devel for package: oracle-rdbms-server-12cR1-preinstall-1.0-14.el6.x86_64
--> Processing Dependency: xorg-x11-xauth for package: oracle-rdbms-server-12cR1-preinstall-1.0-14.el6.x86_64
--> Processing Dependency: compat-libstdc++-33 for package: oracle-rdbms-server-12cR1-preinstall-1.0-14.el6.x86_64
--> Processing Dependency: libstdc++-devel for package: oracle-rdbms-server-12cR1-preinstall-1.0-14.el6.x86_64
--> Running transaction check
---> Package compat-libcap1.x86_64 0:1.10-1 will be installed
---> Package compat-libstdc++-33.x86_64 0:3.2.3-69.el6 will be installed
---> Package gcc-c++.x86_64 0:4.4.7-16.el6 will be installed
--> Processing Dependency: gcc = 4.4.7-16.el6 for package: gcc-c++-4.4.7-16.el6.x86_64
--> Processing Dependency: libstdc++ = 4.4.7-16.el6 for package: gcc-c++-4.4.7-16.el6.x86_64
---> Package ksh.x86_64 0:20120801-28.el6 will be installed
---> Package libaio-devel.x86_64 0:0.3.107-10.el6 will be installed
---> Package libstdc++-devel.x86_64 0:4.4.7-16.el6 will be installed
---> Package xorg-x11-utils.x86_64 0:7.5-6.el6 will be installed
--> Processing Dependency: libXxf86misc.so.1()(64bit) for package: xorg-x11-utils-7.5-6.el6.x86_64
--> Processing Dependency: libdmx.so.1()(64bit) for package: xorg-x11-utils-7.5-6.el6.x86_64
--> Processing Dependency: libXxf86dga.so.1()(64bit) for package: xorg-x11-utils-7.5-6.el6.x86_64
---> Package xorg-x11-xauth.x86_64 1:1.0.2-7.1.el6 will be installed
--> Processing Dependency: libXmuu.so.1()(64bit) for package: 1:xorg-x11-xauth-1.0.2-7.1.el6.x86_64
--> Running transaction check
---> Package gcc.x86_64 0:4.4.7-11.el6 will be updated
---> Package gcc.x86_64 0:4.4.7-16.el6 will be an update
--> Processing Dependency: cpp = 4.4.7-16.el6 for package: gcc-4.4.7-16.el6.x86_64
--> Processing Dependency: libgomp = 4.4.7-16.el6 for package: gcc-4.4.7-16.el6.x86_64
--> Processing Dependency: libgcc >= 4.4.7-16.el6 for package: gcc-4.4.7-16.el6.x86_64
---> Package libXmu.x86_64 0:1.1.1-2.el6 will be installed
---> Package libXxf86dga.x86_64 0:1.1.4-2.1.el6 will be installed
---> Package libXxf86misc.x86_64 0:1.0.3-4.el6 will be installed
---> Package libdmx.x86_64 0:1.1.3-3.el6 will be installed
---> Package libstdc++.x86_64 0:4.4.7-11.el6 will be updated
---> Package libstdc++.x86_64 0:4.4.7-16.el6 will be an update
--> Running transaction check
---> Package cpp.x86_64 0:4.4.7-11.el6 will be updated
---> Package cpp.x86_64 0:4.4.7-16.el6 will be an update
---> Package libgcc.x86_64 0:4.4.7-11.el6 will be updated
---> Package libgcc.x86_64 0:4.4.7-16.el6 will be an update
---> Package libgomp.x86_64 0:4.4.7-11.el6 will be updated
---> Package libgomp.x86_64 0:4.4.7-16.el6 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                         Arch   Version         Repository         Size
================================================================================
Installing:
 oracle-rdbms-server-12cR1-preinstall
                                 x86_64 1.0-14.el6      public_ol6_latest  17 k
Installing for dependencies:
 compat-libcap1                  x86_64 1.10-1          public_ol6_latest  17 k
 compat-libstdc++-33             x86_64 3.2.3-69.el6    public_ol6_latest 183 k
 gcc-c++                         x86_64 4.4.7-16.el6    public_ol6_latest 4.7 M
 ksh                             x86_64 20120801-28.el6 public_ol6_latest 759 k
 libXmu                          x86_64 1.1.1-2.el6     public_ol6_latest  65 k
 libXxf86dga                     x86_64 1.1.4-2.1.el6   public_ol6_latest  17 k
 libXxf86misc                    x86_64 1.0.3-4.el6     public_ol6_latest  17 k
 libaio-devel                    x86_64 0.3.107-10.el6  public_ol6_latest  13 k
 libdmx                          x86_64 1.1.3-3.el6     public_ol6_latest  14 k
 libstdc++-devel                 x86_64 4.4.7-16.el6    public_ol6_latest 1.6 M
 xorg-x11-utils                  x86_64 7.5-6.el6       public_ol6_latest  94 k
 xorg-x11-xauth                  x86_64 1:1.0.2-7.1.el6 public_ol6_latest  34 k
Updating for dependencies:
 cpp                             x86_64 4.4.7-16.el6    public_ol6_latest 3.7 M
 gcc                             x86_64 4.4.7-16.el6    public_ol6_latest  10 M
 libgcc                          x86_64 4.4.7-16.el6    public_ol6_latest 102 k
 libgomp                         x86_64 4.4.7-16.el6    public_ol6_latest 133 k
 libstdc++                       x86_64 4.4.7-16.el6    public_ol6_latest 294 k

Transaction Summary
================================================================================
Install      13 Package(s)
Upgrade       5 Package(s)

Total download size: 22 M
Downloading Packages:
(1/18): compat-libcap1-1.10-1.x86_64.rpm                 |  17 kB     00:00
(2/18): compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm      | 183 kB     00:00
(3/18): cpp-4.4.7-16.el6.x86_64.rpm                      | 3.7 MB     00:07
(4/18): gcc-4.4.7-16.el6.x86_64.rpm                      |  10 MB     00:21
(5/18): gcc-c++-4.4.7-16.el6.x86_64.rpm                  | 4.7 MB     00:10
(6/18): ksh-20120801-28.el6.x86_64.rpm                   | 759 kB     00:01
(7/18): libXmu-1.1.1-2.el6.x86_64.rpm                    |  65 kB     00:00
(8/18): libXxf86dga-1.1.4-2.1.el6.x86_64.rpm             |  17 kB     00:00
(9/18): libXxf86misc-1.0.3-4.el6.x86_64.rpm              |  17 kB     00:00
(10/18): libaio-devel-0.3.107-10.el6.x86_64.rpm          |  13 kB     00:00
(11/18): libdmx-1.1.3-3.el6.x86_64.rpm                   |  14 kB     00:00
(12/18): libgcc-4.4.7-16.el6.x86_64.rpm                  | 102 kB     00:00
(13/18): libgomp-4.4.7-16.el6.x86_64.rpm                 | 133 kB     00:00
(14/18): libstdc++-4.4.7-16.el6.x86_64.rpm               | 294 kB     00:00
(15/18): libstdc++-devel-4.4.7-16.el6.x86_64.rpm         | 1.6 MB     00:03
(16/18): oracle-rdbms-server-12cR1-preinstall-1.0-14.el6 |  17 kB     00:00
(17/18): xorg-x11-utils-7.5-6.el6.x86_64.rpm             |  94 kB     00:00
(18/18): xorg-x11-xauth-1.0.2-7.1.el6.x86_64.rpm         |  34 kB     00:00
--------------------------------------------------------------------------------
Total                                           466 kB/s |  22 MB     00:48
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : libgcc-4.4.7-16.el6.x86_64                                  1/23
  Updating   : libstdc++-4.4.7-16.el6.x86_64                               2/23
  Installing : libstdc++-devel-4.4.7-16.el6.x86_64                         3/23
  Installing : compat-libstdc++-33-3.2.3-69.el6.x86_64                     4/23
  Installing : libXmu-1.1.1-2.el6.x86_64                                   5/23
  Installing : 1:xorg-x11-xauth-1.0.2-7.1.el6.x86_64                       6/23
  Installing : ksh-20120801-28.el6.x86_64                                  7/23
  Installing : libdmx-1.1.3-3.el6.x86_64                                   8/23
  Updating   : cpp-4.4.7-16.el6.x86_64                                     9/23
  Installing : libXxf86dga-1.1.4-2.1.el6.x86_64                           10/23
  Installing : libXxf86misc-1.0.3-4.el6.x86_64                            11/23
  Installing : xorg-x11-utils-7.5-6.el6.x86_64                            12/23
  Installing : compat-libcap1-1.10-1.x86_64                               13/23
  Updating   : libgomp-4.4.7-16.el6.x86_64                                14/23
  Updating   : gcc-4.4.7-16.el6.x86_64                                    15/23
  Installing : gcc-c++-4.4.7-16.el6.x86_64                                16/23
  Installing : libaio-devel-0.3.107-10.el6.x86_64                         17/23
  Installing : oracle-rdbms-server-12cR1-preinstall-1.0-14.el6.x86_64     18/23
  Cleanup    : gcc-4.4.7-11.el6.x86_64                                    19/23
  Cleanup    : libstdc++-4.4.7-11.el6.x86_64                              20/23
  Cleanup    : libgcc-4.4.7-11.el6.x86_64                                 21/23
  Cleanup    : cpp-4.4.7-11.el6.x86_64                                    22/23
  Cleanup    : libgomp-4.4.7-11.el6.x86_64                                23/23
  Verifying  : gcc-c++-4.4.7-16.el6.x86_64                                 1/23
  Verifying  : libaio-devel-0.3.107-10.el6.x86_64                          2/23
  Verifying  : libgomp-4.4.7-16.el6.x86_64                                 3/23
  Verifying  : compat-libcap1-1.10-1.x86_64                                4/23
  Verifying  : xorg-x11-utils-7.5-6.el6.x86_64                             5/23
  Verifying  : libXxf86misc-1.0.3-4.el6.x86_64                             6/23
  Verifying  : libstdc++-4.4.7-16.el6.x86_64                               7/23
  Verifying  : compat-libstdc++-33-3.2.3-69.el6.x86_64                     8/23
  Verifying  : libXxf86dga-1.1.4-2.1.el6.x86_64                            9/23
  Verifying  : cpp-4.4.7-16.el6.x86_64                                    10/23
  Verifying  : libdmx-1.1.3-3.el6.x86_64                                  11/23
  Verifying  : libgcc-4.4.7-16.el6.x86_64                                 12/23
  Verifying  : gcc-4.4.7-16.el6.x86_64                                    13/23
  Verifying  : ksh-20120801-28.el6.x86_64                                 14/23
  Verifying  : oracle-rdbms-server-12cR1-preinstall-1.0-14.el6.x86_64     15/23
  Verifying  : libstdc++-devel-4.4.7-16.el6.x86_64                        16/23
  Verifying  : 1:xorg-x11-xauth-1.0.2-7.1.el6.x86_64                      17/23
  Verifying  : libXmu-1.1.1-2.el6.x86_64                                  18/23
  Verifying  : libstdc++-4.4.7-11.el6.x86_64                              19/23
  Verifying  : libgcc-4.4.7-11.el6.x86_64                                 20/23
  Verifying  : libgomp-4.4.7-11.el6.x86_64                                21/23
  Verifying  : gcc-4.4.7-11.el6.x86_64                                    22/23
  Verifying  : cpp-4.4.7-11.el6.x86_64                                    23/23

Installed:
  oracle-rdbms-server-12cR1-preinstall.x86_64 0:1.0-14.el6

Dependency Installed:
  compat-libcap1.x86_64 0:1.10-1     compat-libstdc++-33.x86_64 0:3.2.3-69.el6
  gcc-c++.x86_64 0:4.4.7-16.el6      ksh.x86_64 0:20120801-28.el6
  libXmu.x86_64 0:1.1.1-2.el6        libXxf86dga.x86_64 0:1.1.4-2.1.el6
  libXxf86misc.x86_64 0:1.0.3-4.el6  libaio-devel.x86_64 0:0.3.107-10.el6
  libdmx.x86_64 0:1.1.3-3.el6        libstdc++-devel.x86_64 0:4.4.7-16.el6
  xorg-x11-utils.x86_64 0:7.5-6.el6  xorg-x11-xauth.x86_64 1:1.0.2-7.1.el6

Dependency Updated:
  cpp.x86_64 0:4.4.7-16.el6               gcc.x86_64 0:4.4.7-16.el6
  libgcc.x86_64 0:4.4.7-16.el6            libgomp.x86_64 0:4.4.7-16.el6
  libstdc++.x86_64 0:4.4.7-16.el6

Complete!

B. Set NTP clock synchronization

For preventing time from being adjusted backward, you need to reconfigure NTP.

[root@primary01 ~]# vi /etc/sysconfig/ntpd
...
OPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid"
SYNC_HWCLOCK=no
NTPDATE_OPTIONS=""

C. Make sure the share memory mounted

Check the shared memory mounted like this, if not, add it.

[root@primary01 ~]# vi /etc/fstab
...
tmpfs  /dev/shm  /tmpfs  rw,exec  0 0

D. Create required groups and users

Add groups and users in a breath.

[root@primary01 ~]# groupadd oinstall
groupadd: group 'oinstall' already exists
[root@primary01 ~]# groupadd asmadmin
[root@primary01 ~]# groupadd asmdba
[root@primary01 ~]# groupadd asmoper
[root@primary01 ~]# groupadd dba
groupadd: group 'dba' already exists
[root@primary01 ~]# groupadd oper
[root@primary01 ~]# groupadd backupdba
[root@primary01 ~]# groupadd dgdba
[root@primary01 ~]# groupadd kmdba
[root@primary01 ~]# useradd grid -g oinstall -G asmadmin,asmdba,asmoper
[root@primary01 ~]# usermod -a -G asmdba oracle
[root@primary01 ~]# mkdir -p  /u01/app/12.1.0/grid
[root@primary01 ~]# mkdir -p /u01/app/grid
[root@primary01 ~]# mkdir -p /u01/app/oracle
[root@primary01 ~]# chown -R grid:oinstall /u01
[root@primary01 ~]# chown oracle:oinstall /u01/app/oracle
[root@primary01 ~]# chmod -R 775 /u01/
[root@primary01 ~]# passwd grid
Changing password for user grid.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
[root@primary01 ~]# passwd oracle
Changing password for user oracle.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

Please note that, some groups and user are created previously by Oracle Preinstallation RPM, so there's nothing wrong about the alert.

Check the identity of grid and oracle

[root@primary01 ~]# id grid
uid=54322(grid) gid=54321(oinstall) groups=54321(oinstall),54323(asmadmin),54324(asmdba),54325(asmoper)
[root@primary01 ~]# id oracle
uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54324(asmdba),54326(oper)

E. Limit resource consumption and disable security

Set resource limit for grid and oracle on both nodes.

[root@primary01 ~]# vi /etc/security/limits.conf
...
grid soft nofile 1024
grid hard nofile 65536
grid soft nproc 2047
grid hard nproc 16384
grid soft stack 10240
grid hard stack 32768

oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
oracle soft memlock unlimited
oracle hard memlock unlimited

Check the result.

[root@primary01 ~]# su - grid
[grid@primary01 ~]$ ulimit -Sa
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 33315
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 2047
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
[grid@primary01 ~]$ ulimit -Ha
core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 33315
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 65536
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 32768
cpu time               (seconds, -t) unlimited
max user processes              (-u) 16384
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
[grid@primary01 ~]$ exit
logout
[root@primary01 ~]# su - oracle
[oracle@primary01 ~]$ ulimit -Sa
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 33315
max locked memory       (kbytes, -l) 134217728
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 16384
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
[oracle@primary01 ~]$ ulimit -Ha
core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 33315
max locked memory       (kbytes, -l) 134217728
max memory size         (kbytes, -m) unlimited
open files                      (-n) 65536
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 32768
cpu time               (seconds, -t) unlimited
max user processes              (-u) 16384
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
[oracle@primary01 ~]$ exit
logout

Disable the security and firewall.

[root@primary01 ~]# vi /etc/selinux/config
...
SELINUX=disabled
[root@primary01 ~]# chkconfig iptables off
[root@primary01 ~]# service iptables stop
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Unloading modules:                               [  OK  ]

If you couldn't or wouldn't disable firewall, then you may also open port 1521 on Linux for your listener.

F. Install ASMLib for managing ASM disks

This step is optional, you can use udev instead of making block devices available for ASM candidate disks.

Install kmod-oracleasm package facilitated by yum.

[root@primary01 ~]# yum -y install kmod-oracleasm
Loaded plugins: security
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package kmod-oracleasm.x86_64 0:2.0.8-5.el6_7 will be installed
--> Processing Dependency: kernel >= 2.6.32-573.el6 for package: kmod-oracleasm-2.0.8-5.el6_7.x86_64
--> Running transaction check
---> Package kernel.x86_64 0:2.6.32-573.1.1.el6 will be installed
--> Processing Dependency: dracut-kernel >= 004-388.el6 for package: kernel-2.6.32-573.1.1.el6.x86_64
--> Running transaction check
---> Package dracut-kernel.noarch 0:004-356.0.1.el6 will be updated
---> Package dracut-kernel.noarch 0:004-388.0.1.el6 will be an update
--> Processing Dependency: dracut = 004-388.0.1.el6 for package: dracut-kernel-004-388.0.1.el6.noarch
--> Running transaction check
---> Package dracut.noarch 0:004-356.0.1.el6 will be updated
---> Package dracut.noarch 0:004-388.0.1.el6 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package           Arch      Version                 Repository            Size
================================================================================
Installing:
 kmod-oracleasm    x86_64    2.0.8-5.el6_7           public_ol6_latest     35 k
Installing for dependencies:
 kernel            x86_64    2.6.32-573.1.1.el6      public_ol6_latest     30 M
Updating for dependencies:
 dracut            noarch    004-388.0.1.el6         public_ol6_latest    125 k
 dracut-kernel     noarch    004-388.0.1.el6         public_ol6_latest     26 k

Transaction Summary
================================================================================
Install       2 Package(s)
Upgrade       2 Package(s)

Total download size: 30 M
Downloading Packages:
(1/4): dracut-004-388.0.1.el6.noarch.rpm                 | 125 kB     00:00
(2/4): dracut-kernel-004-388.0.1.el6.noarch.rpm          |  26 kB     00:00
(3/4): kernel-2.6.32-573.1.1.el6.x86_64.rpm              |  30 MB     04:07
(4/4): kmod-oracleasm-2.0.8-5.el6_7.x86_64.rpm           |  35 kB     00:00
--------------------------------------------------------------------------------
Total                                           125 kB/s |  30 MB     04:09
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : dracut-004-388.0.1.el6.noarch                                1/6
  Updating   : dracut-kernel-004-388.0.1.el6.noarch                         2/6
  Installing : kernel-2.6.32-573.1.1.el6.x86_64                             3/6
  Installing : kmod-oracleasm-2.0.8-5.el6_7.x86_64                          4/6
  Cleanup    : dracut-kernel-004-356.0.1.el6.noarch                         5/6
  Cleanup    : dracut-004-356.0.1.el6.noarch                                6/6
  Verifying  : dracut-kernel-004-388.0.1.el6.noarch                         1/6
  Verifying  : kernel-2.6.32-573.1.1.el6.x86_64                             2/6
  Verifying  : kmod-oracleasm-2.0.8-5.el6_7.x86_64                          3/6
  Verifying  : dracut-004-388.0.1.el6.noarch                                4/6
  Verifying  : dracut-004-356.0.1.el6.noarch                                5/6
  Verifying  : dracut-kernel-004-356.0.1.el6.noarch                         6/6

Installed:
  kmod-oracleasm.x86_64 0:2.0.8-5.el6_7

Dependency Installed:
  kernel.x86_64 0:2.6.32-573.1.1.el6

Dependency Updated:
  dracut.noarch 0:004-388.0.1.el6     dracut-kernel.noarch 0:004-388.0.1.el6

Complete!

Install oracleasm-support package via yum.

[root@primary01 ~]# yum -y install oracleasm-support
Loaded plugins: security
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package oracleasm-support.x86_64 0:2.1.8-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package               Arch       Version           Repository             Size
================================================================================
Installing:
 oracleasm-support     x86_64     2.1.8-1.el6       public_ol6_latest      73 k

Transaction Summary
================================================================================
Install       1 Package(s)

Total download size: 73 k
Installed size: 216 k
Downloading Packages:
oracleasm-support-2.1.8-1.el6.x86_64.rpm                 |  73 kB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : oracleasm-support-2.1.8-1.el6.x86_64                         1/1
  Verifying  : oracleasm-support-2.1.8-1.el6.x86_64                         1/1

Installed:
  oracleasm-support.x86_64 0:2.1.8-1.el6

Complete!

Install oracleasmlib rpm directly from oracle.com.

[root@primary01 ~]# rpm -Uvh http://download.oracle.com/otn_software/asmlib/oracleasmlib-2.0.4-1.el6.x86_64.rpm
Retrieving http://download.oracle.com/otn_software/asmlib/oracleasmlib-2.0.4-1.el6.x86_64.rpm
Preparing...                ########################################### [100%]
   1:oracleasmlib           ########################################### [100%]

Yes, we have installed ASMLib. But things haven't done yet.

On both nodes, configure ASMLib.

[root@primary01 ~]# oracleasm configure -i
Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library
driver.  The following questions will determine whether the driver is
loaded on boot and what permissions it will have.  The current values
will be shown in brackets ('[]').  Hitting <ENTER> without typing an
answer will keep that current value.  Ctrl-C will abort.

Default user to own the driver interface []: grid
Default group to own the driver interface []: asmadmin
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
[root@primary01 ~]# service oracleasm start
Initializing the Oracle ASMLib driver:                     [  OK  ]
Scanning the system for Oracle ASMLib disks:               [  OK  ]

Please note that, the main group to own the ASM disks should be asmadmin.

On node 1, create two candidate disks into ASMLib

[root@primary01 ~]# oracleasm createdisk asm01 /dev/disk/by-path/ip-192.168.15.101:3260-iscsi-iqn.2005-10.org.freenas.ctl:asm-t1-lun-1-part1
Writing disk header: done
Instantiating disk: done
[root@primary01 ~]# oracleasm createdisk asm02 /dev/disk/by-path/ip-192.168.15.101:3260-iscsi-iqn.2005-10.org.freenas.ctl:asm-t2-lun-2-part1
Writing disk header: done
Instantiating disk: done
[root@primary01 ~]# oracleasm listdisks
ASM01
ASM02

On node 2, just scan the disks and list them.

[root@primary02 ~]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
Instantiating disk "ASM02"
Instantiating disk "ASM01"
[root@primary02 ~]# oracleasm listdisks
ASM01
ASM02

Why did we use /dev/disk/by-path instead of /dev/disk/by-id for ASM candidates to create? Because iSCSI will randomly take disk id for the connected luns.

G. Edit grid and oracle profile before installation

The official documentation does not require you to configure grid and oracle profile, but I think a proper profile will make the installation more smoothly. We take the node 1 as an example.

[grid@primary01 ~]$ vi .bash_profile
...
umask 022
...
ORACLE_SID=+ASM1
ORACLE_BASE=/u01/app/grid
ORACLE_HOME=/u01/app/12.1.0/grid
...
PATH=$PATH:$HOME/.local/bin:$HOME/bin:$ORACLE_BASE/bin:$ORACLE_HOME/bin
export PATH ORACLE_SID ORACLE_BASE ORACLE_HOME
[oracle@primary01 ~]$ vi .bash_profile
...
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/12.1.0.2/db_1
ORACLE_SID=ora12c1
PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin

export PATH ORACLE_BASE ORACLE_HOME ORACLE_SID

H. Download and unzip software

We manipulate all the Oracle installation software only on node 1. Suppose that you have download all the software including grid infrastructure and database software into /tmp.

[root@primary01 ~]# cd /tmp
[root@primary01 tmp]# ll
total 4963008
-rw-r--r--. 1 root root 1673544724 Jul 31 16:20 linuxamd64_12102_database_1of2.zip
-rw-r--r--. 1 root root 1014530602 Jul 31 16:23 linuxamd64_12102_database_2of2.zip
-rw-r--r--. 1 root root 1747043545 Jul 31 16:28 linuxamd64_12102_grid_1of2.zip
-rw-r--r--. 1 root root  646972897 Jul 31 16:30 linuxamd64_12102_grid_2of2.zip
...

Unzip all the software and chown to grid or oracle.

[root@primary01 tmp]# unzip -q linuxamd64_12102_grid_1of2.zip
[root@primary01 tmp]# unzip -q linuxamd64_12102_grid_2of2.zip
[root@primary01 tmp]# unzip -q linuxamd64_12102_database_1of2.zip
[root@primary01 tmp]# unzip -q linuxamd64_12102_database_2of2.zip
[root@primary01 tmp]# chown -R grid:oinstall grid
[root@primary01 tmp]# chown -R oracle:oinstall database
[root@primary01 tmp]# ll
...
drwxr-xr-x 7 oracle oinstall        110 Jul  7  2014 database
drwxr-xr-x 7 grid   oinstall        129 Jul  7  2014 grid
...
[root@primary01 tmp]# du -sh grid
2.5G    grid
[root@primary01 tmp]# du -sh database
2.8G    database

Install cvuqdisk on both nodes. On node 1, after installing cvuqdisk, please scp the package to node 2.

[root@primary01 tmp]# cd grid/rpm
[root@primary01 rpm]# ll
total 12
-rwxr-xr-x 1 grid oinstall 8976 Jul  1  2014 cvuqdisk-1.0.9-1.rpm
[root@primary01 rpm]# scp cvuqdisk-1.0.9-1.rpm primary02:/tmp/
root@primary02's password:
cvuqdisk-1.0.9-1.rpm                          100% 8976     8.8KB/s   00:00
[root@primary01 rpm]# rpm -Uvh cvuqdisk-1.0.9-1.rpm
Preparing...                          ################################# [100%]
Using default group oinstall to install package
Updating / installing...
   1:cvuqdisk-1.0.9-1                 ################################# [100%]

On node 2:

[root@primary02 ~]# cd /tmp
[root@primary02 tmp]# rpm -Uvh cvuqdisk-1.0.9-1.rpm
Preparing...                ########################################### [100%]
Using default group oinstall to install package
   1:cvuqdisk               ########################################### [100%]

So far, we had prepared all required packages and configuration. Next, we will proceed to install grid infrastructure.

How to Build 12c RAC (4/6) - Installing Grid Infrastructure

4 thoughts on “How to Build 12c RAC (3/6) - Preparing for Installations of Grid and RAC”

      1. Hi Ed,

        Install kmod-oracleasm does not work with Oracle 8.2, and is not a rpm that can be downloaded, based on oracles documentation this is already installed by the oracleasm is no longer used

Leave a Reply

Your email address will not be published. Required fields are marked *