Advertisement

Monday, August 6, 2018

Oracle Database - Grid Infrastructure / RAC 18c Installation - Part 2/3

In this blog I discuss from the part where you have setup your machine and ready to do your Linux configuration

(Make sure you have internet connectivity)
Linux Configuration
1. Install rpm's via yum

  • yum install oracle-database-preinstall-18c.x86_64 -y
  • yum install oracleasm-support -y
  • yum install kmod-oracleasm.x86_64 -y
  • yum install bind -y
2. Groups and User Addition

  • groupadd -g 54331 asmadmin
  • useradd -g oinstall -G asmadmin,dba -u 54232 grid
  • Set password for root, oracle and grid user
3. Copy secure/limits.d
  • cd /etc/security/limits.d/
  • cp oracle-database-preinstall-18c.conf grid-database-preinstall-18c.conf [Replace oracle by grid user]
4. Add huge pages
  • vi /etc/sysctl.conf
  • vm.nr_hugepages = 10000
  • sysctl --system
5. Swap Creation - Refer Blog - Swap Creation

6. Update Contents of /etc/profile 

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

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

Network Configuration

7.  Contents of /etc/hosts file 
(The key thing here is to configure your machines as per below addresses. 
There will be 3 interfaces on Virtual box One public, 2 private to Cluster - One for ASM communcation and one Private for Cluster Communcation

192.168.10.11 rac18c01.novalocal rac18c01
192.168.10.12 rac18c02.novalocal rac18c02
192.168.10.21 rac18c01-vip.novalocal rac18c01-vip
192.168.10.22 rac18c02-vip.novalocal rac18c02-vip

192.168.20.11 rac18c01-priv01.novalocal rac18c01-priv01
192.168.20.12 rac18c02-priv01.novalocal rac18c02-priv01

192.168.30.11 rac18c01-priv02.novalocal rac18c01-priv02
192.168.30.12 rac18c02-priv02.novalocal rac18c02-priv02

8. DNS Configuration 
(After you clone the machine - make sure you disable named service on the cloned machine 

File - /etc/named.conf - Make the changes as given below

Change 1  - Add highlighted entry
options {
        listen-on port 53 { 127.0.0.1;192.168.10.11; };  

Change 1.1
        allow-query     { 192.168.10.0/24; };

Change 2 - remove the below section
zone "." IN {
type hint;
file "named.ca";
};

Change 3 -  and add this in the end of the file

zone "novalocal" IN {
type master;
file "novalocal.zone";
allow-update { none; };
};


Create file /var/named/localdomain.zone with contents as below

cat /var/named/novalocal.zone

$TTL  86400
@ IN SOA      novalocal. novalocal.(
42          ; serial (d. adams)
3H          ; refresh
15M         ; retry
1W          ; expiry
1D )        ; minimum

                                 IN NS   rac18c01.novalocal.
localhost                        IN A    127.0.0.1
rac18c01.novalocal.                IN A    192.168.10.11
rac18c02.novalocal.                IN A    192.168.10.12
rac18c01-vip.novalocal.            IN A    192.168.10.21
rac18c02-vip.novalocal.            IN A    192.168.10.22
rac-scan.novalocal.            IN A    192.168.10.31
rac-scan.novalocal.            IN A    192.168.10.32
rac-scan.novalocal.            IN A    192.168.10.33


File - /etc/resolv.conf - create this file as below 

[root@rac1 network-scripts]# cat /etc/resolv.conf

nameserver 192.168.10.11

search localdomain

options attempts:1

options timeout:1

Finally enable the named.service and restart it
Note - the systemctl utiltity used instead of conventional chkconfig and service utility

systemctl enable named.service
systemctl restart named.service


9.  ORACLEASM Configuration
[root@rac18c01 tmp]# 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@rac18c01 ~]# oracleasm init


[root@rac18c01 ~]# oracleasm createdisk OCR_VOTE1 /dev/xvdb1
Writing disk header: done
Instantiating disk: done

[root@rac18c01 ~]# oracleasm createdisk OCR_VOTE2 /dev/xvdc1
Writing disk header: done
Instantiating disk: done

[root@rac18c01 ~]# oracleasm createdisk OCR_VOTE3 /dev/xvdd1
Writing disk header: done
Instantiating disk: done


[root@rac18c01 ~]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
Instantiating disk "OCR_VOTE1"
Instantiating disk "OCR_VOTE2"
Instantiating disk "OCR_VOTE3"

10.  Create Directories and Unzip Software 

mkdir /u01 
mkdir /u01/app
chown root:oinstall /u01 /u01/app
chmod 755 /u01 /u01/app

mkdir /u01/app/180
chown grid:oinstall /u01/app/180
chmod 755 /u01/app/180

mkdir /u01/app/grid
chown grid:oinstall /u01/app/grid
chmod 755 /u01/app/grid

mkdir /u01/app/oraInventory
chown grid:oinstall /u01/app/oraInventory
chmod 755 /u01/app/oraInventory

[As grid user]
mkdir -p /u01/app/180/grid

Unzip software on Node 1 in /u01/app/180/grid directory

No comments:
Write comments