Neste Lab vamos realizar a configuração inicial no SO e instalação do Grid Infrastructure.
Requisitos: Oracle Linux 7 instalado. Instalador Grid Infrastructure. 2x Placas de Rede (Public / Private Network)
Atualize o SO e executa a instalação dos pré-requisitos.
# hostnamectl set-hostname rac01 # vi /etc/resolv.conf # yum -y update # yum -y install oracle-epel-release-el7.x86_64 net-tools # yum -y install unzip wget vim rlwrap rsync oracle-database-preinstall-19c.x86_64 nss rsync glibc iscsi-initiator-utils
Desabilite o Firewalld e Selinux
# systemctl disable firewalld # systemctl disable firewalld # vi /etc/sysconfig/selinux # setenforce 0
Configuração de DNS (SCAN):
# yum -y install dnsmasq # vim /etc/resolv.conf > search localdomain > nameserver 192.168.253.141 # vim /etc/hosts >192.168.253.147 rac01-scan.localdomain rac01-scan >192.168.253.148 rac01-scan.localdomain rac01-scan >192.168.253.149 rac01-scan.localdomain rac01-scan # systemctl restart dnsmasq # systemctl enable dnsmasq # nslookup rac01-scan
Configure os IP’s
# vim /etc/hosts > # Public > 192.168.253.141 rac1.localdomain rac1 > 192.168.253.142 rac2.localdomain rac2 > # Private > 192.168.0.141 rac1-priv.localdomain rac1-priv > 192.168.0.142 rac2-priv.localdomain rac2-priv > # Virtual > 192.168.253.143 rac1-vip.localdomain rac1-vip > 192.168.253.144 rac2-vip.localdomain rac2-vip
Configure os Grupos e Diretórios
# groupadd asmadmin # groupadd asmdba # groupadd asmoper # usermod -g oinstall -G dba,oper,asmadmin,asmdba,asmoper oracle # mkdir -p /u01/app/oracle # mkdir -p /u01/app/19.3.0.0/grid # chown -R oracle:oinstall /u01/ # chmod -R 775 /u01 # passwd oracle
Configure o .profileGRID
$ vim /home/oracle/.profileGRID
Reinicie as máquinas
# init 6
Configuração dos Discos
# systemctl enable iscsid # systemctl start iscsid # iscsiadm -m discovery -t sendtargets -p 192.168.253.140 > 192.168.253.140:3260,1 iqn.2019-11.com:rac01 # vi /etc/iscsi/initiatorname.iscsi > iqn.2019-11.com:rac01 # iscsiadm -m node -login # lsblk ou lsblk -S # chown oracle:asmadmin /dev/sdb
Configuração GRID Home
$ . ~/.profileGRID $ dbh $ unzip /u01/stage/LINUX.X64_193000_grid_home.zip # rpm -ivh /u01/app/19.3.0.0/grid/cv/rpm/cvuqdisk-1.0.10-1.rpm # scp /u01/app/19.3.0.0/grid/cv/rpm/cvuqdisk-1.0.10-1.rpm rac02:/root/ # ssh -t root@rac02 'rpm -ivh /root/cvuqdisk-1.0.10-1.rpm'
Configuração AFD – ASM FILTER DRIVER
Na máquina RAC1 configure os discos
# export ORACLE_HOME=/u01/app/19.3.0.0/grid # export ORACLE_BASE=/u01/app/oracle # $ORACLE_HOME/bin/asmcmd afd_refresh # $ORACLE_HOME/bin/asmcmd afd_scan # $ORACLE_HOME/bin/asmcmd afd_state # $ORACLE_HOME/bin/asmcmd afd_label DATA01 /dev/sdb --init # $ORACLE_HOME/bin/asmcmd afd_lslbl /dev/sdb # rm -rf /u01/app/oracle/diag/
Instalação Grid Infrastructure
Na máquina RAC1 com usuário Oracle, inicie a instalação do Grid Infrastructure
$ . ~/.profileGRID $ dbh $ ./gridSetup.sh