Oracle Database 19c RAC Kurulumu OS Hazırlıkları Part 1

Oracle Database 19c RAC Kurulumu

Part 1

OS Hazırlıkları

Gereksinimler

Vmware Workstation 16

Oracle Linux 7.9

Openfiler Iscsi Storage: 200gb

Oracle Database 19c

Oracle Grid 19c

Dns Server Windows 2016 (Optional): 192.168.10.100

Hostname

Unqname

Oracle
Sid

Asm
Sid

orarac1

orarac

orarac1

asm1

orarac2

orarac

orarac2

asm2

Hostname

ens33 public

ens35 priv

ens36 asm

Vip

Scan

orarac1

192.168.10.31

172.16.10.31

10.168.10.31

192.168.10.33

192.168.10.34

192.168.10.35

192.168.10.36

192.168.10.37

orarac2

192.168.10.32

172.16.10.32

10.168.10.32

Dns Server’a Host Kayıtlarının eklenmesi

Graphical user interface, table

Description automatically generated with medium confidence

Graphical user interface, application

Description automatically generated

Graphical user interface, text, application

Description automatically generated

orarac1 – orarac2 /etc/hosts dosyası

192.168.10.31 orarac1 orarac1.lab.local

192.168.10.32 orarac2 orarac2.lab.local

192.168.10.33 orarac1-vip orarac1-vip.lab.local

192.168.10.34 orarac2-vip orarac2-vip.lab.local

192.168.10.35 orarac-scan orarac-scan.lab.local

192.168.10.36 orarac-scan orarac-scan.lab.local

192.168.10.37 orarac-scan orarac-scan.lab.local

172.168.10.31 orarac1-priv orarac1-priv.lab.local

172.168.10.32 orarac2-priv orarac2-priv.lab.local

10.168.10.31 orarac1-asm orarac1-asm.lab.local

10.168.10.32 orarac2-asm orarac2-asm.lab.local

orarac1 – orarac2 kullanıcılar ve grupların oluşturulması

groupadd -g 54331 dba

groupadd -g 54332 oinstall

groupadd -g 54333 asmdba

groupadd -g 54334 asmoper

groupadd -g 54335 asmadmin

useradd -m -u 54341 -g oinstall -G dba,asmadmin,asmdba,asmoper -d /home/grid -s /bin/bash grid

useradd -m -u 54342 -g oinstall -G asmdba -d /home/oracle -s /bin/bash oracle

usermod -a -G asmdba oracle

orarac1 – orarac2 network ve fw servislerinin kapatılması

systemctl stop firewalld.service

systemctl disable firewalld.service

systemctl stop NetworkManager

systemctl disable NetworkManager

systemctl stop avahi-daemon

systemctl disable avahi-daemon

orarac1 – orarac2 selinux ayarı

nano /etc/selinux/config

# This file controls the state of SELinux on the system.

# SELINUX= can take one of these three values:

# enforcing – SELinux security policy is enforced.

# permissive – SELinux prints warnings instead of enforcing.

# disabled – No SELinux policy is loaded.

SELINUX=disabled

# SELINUXTYPE= can take one of three values:

# targeted – Targeted processes are protected,

# minimum – Modification of targeted policy. Only selected processes are protected.

# mls – Multi Level Security protection.

SELINUXTYPE=targeted

Ntp Client Ayarının Yapılması

[root@orarac1 ~]# yum install ntp -y

[root@orarac2 ~]# yum install ntp -y

[root@orarac1 ~]# ntpdate -q 0.pool.ntp.org

[root@orarac2 ~]# ntpdate -q 0.pool.ntp.org

[root@orarac1 ~]# systemctl start ntpd

[root@orarac2 ~]# systemctl start ntpd

[root@orarac1 ~]# systemctl enable ntpd

[root@orarac2 ~]# systemctl enable ntpd

orarac1 – orarac2 ilgili paketlerin kurulması ve linux update yapılması

yum install oracle-database-preinstall-19c -y

yum install oracleasm-support -y

yum update -y

orarac1 – orarac2 klasörlerini oluşturma ve ilgili kullanıcılara sahiplik verilmesi

mkdir -p /u01/app/grid/19.3.0/grid_1

mkdir -p /u01/app/grid/gridbase/

mkdir -p /u01/app/oracle/database/19.3.0/db_1

chown -R oracle.oinstall /u01/

chown -R grid.oinstall /u01/app/grid

chmod -R 775 /u01/

orarac1 “oracle” kullanıcısının profile tanımlamaları

nano /home/oracle/.bash_profile

export TMP=/tmp

export TMPDIR=$TMP

export ORACLE_HOSTNAME=orarac1.lab.local

export ORACLE_UNQNAME=orarac

export ORACLE_BASE=/u01/app/oracle/product/19.3.0/

export DB_HOME=$ORACLE_BASE/db_1

export ORACLE_HOME=$DB_HOME

export ORACLE_SID=orarac1

export ORACLE_TERM=xterm

export PATH=/usr/sbin:/usr/local/bin:$PATH

export PATH=$ORACLE_HOME/bin:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

orarac1 “grid” kullanıcısının profile tanımlamaları

nano /home/grid/.bash_profile

export TMP=/tmp

export TMPDIR=$TMP

export ORACLE_HOSTNAME=orarac1.lab.local

export ORACLE_BASE=/u01/app/grid/

export ORACLE_HOME=/u01/app/grid/19.3.0/grid_1

export GRID_HOME=/u01/app/grid/19.3.0/grid_1

export ORACLE_SID=+ASM1

export ORACLE_TERM=xterm

export PATH=/usr/sbin:/usr/local/bin:$PATH

export PATH=$ORACLE_HOME/bin:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

orarac2 “oracle” kullanıcısının profile tanımlamaları

nano /home/oracle/.bash_profile

export TMP=/tmp

export TMPDIR=$TMP

export ORACLE_HOSTNAME=orarac2.lab.local

export ORACLE_UNQNAME=orarac

export ORACLE_BASE=/u01/app/oracle/product/19.3.0/

export DB_HOME=$ORACLE_BASE/db_1

export ORACLE_HOME=$DB_HOME

export ORACLE_SID=orarac2

export ORACLE_TERM=xterm

export PATH=/usr/sbin:/usr/local/bin:$PATH

export PATH=$ORACLE_HOME/bin:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

orarac2 “grid” kullanıcısının profile tanımlamaları

nano /home/grid/.bash_profile

export TMP=/tmp

export TMPDIR=$TMP

export ORACLE_HOSTNAME=orarac2.lab.local

export ORACLE_BASE=/u01/app/grid/

export ORACLE_HOME=/u01/app/grid/19.3.0/grid_1

export GRID_HOME=/u01/app/grid/19.3.0/grid_1

export ORACLE_SID=+ASM2

export ORACLE_TERM=xterm

export PATH=/usr/sbin:/usr/local/bin:$PATH

export PATH=$ORACLE_HOME/bin:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

orarac1 – orarac2 kernel parametrelerinin ayarlanması

nano /etc/sysctl.conf

fs.file-max = 6815744

kernel.sem = 250 32000 100 128

kernel.shmmni = 4096

kernel.shmall = 1073741824

kernel.shmmax = 4398046511104

net.core.rmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048576

fs.aio-max-nr = 1048576

net.ipv4.ip_local_port_range = 9000 65500

orarac1 – orarac2 limit ayarları

nano /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

orarac1 – orarac2 (Dns server yok ise manuel eklenecek)

nano /etc/racdns

192.168.10.35 orarac-scan orarac-scan.lab.local

192.168.10.36 orarac-scan orarac-scan.lab.local

192.168.10.37 orarac-scan orarac-scan.lab.local

orarac1 – orarac2 (Dns server yok ise manuel eklenecek)

nano /etc/dnsmasq.conf

except-interface=virbr0

bind-interfaces

addn-hosts=/etc/racdns

orarac1 – orarac2 (Dns Çözümleme Kontrolü)

[root@orarac1 ~]# nslookup orarac-scan

Server: 192.168.10.100

Address: 192.168.10.100#53

Name: orarac-scan.lab.local

Address: 192.168.10.36

Name: orarac-scan.lab.local

Address: 192.168.10.35

Name: orarac-scan.lab.local

Address: 192.168.10.37

[root@orarac2 ~]# nslookup orarac-scan

Server: 192.168.10.100

Address: 192.168.10.100#53

Name: orarac-scan.lab.local

Address: 192.168.10.36

Name: orarac-scan.lab.local

Address: 192.168.10.35

Name: orarac-scan.lab.local

Address: 192.168.10.37