RAC_do_Lab

Page 1

RAC – Linux RH 3.0 com NFS para estudo Apenas para estudo de RAC em casa. Índice Desenho da Solução HDs particionados com Partition Magic 8.0: 3 1 ) Instalar RedHat 3.0 – Default boot text 3 2 ) Alterar Hostname e /etc/hosts 4 3 ) Criação de grupo e usuário 4 4 ) Criando chave de autenticação nos servidores 4 5 ) Exportar NFS no servidor origem 5 6 ) Adicionar o hagcheck-timer no /etc/modules.conf 5 7 ) Ajuste parâmetros de Rede 6 8 ) Limites do usuário 6 9 ) Parâmetros de memória , semaphore e arquivo 6 10 ) Boot 6 11 ) Instalando CRS 7 12 ) Instalando o Binário do Banco com RAC 9 13 ) Adicionar entradas no .bash_profile 10 14) Brincar com o RAC 10 15) Fonte 11

Desenho da Solução HDs particionados com Partition Magic 8.0:


1 ) Instalar RedHat 3.0 – Default boot text 1.1 ) Partições padrões /tmp, /boot , / e 900 M Swap + /oradata (para no servidor Origem o NFS) 1,5G + /u01 (nos dois servidores este abrigará o Oracle_Home + CRS_HOME 1.2 ) Se instalar customizado escolher – Application Developer

2 ) Alterar Hostname e /etc/hosts 2.1) Hostname Para fixar, colocar hostname e domínio no /etc/sysconfig/network Para valer por este boot -> hostname rac1pub.hugo hostname rac2pub.hugo 2.2) edição do /etc/hosts - em todos os nós 127.0.0.1 localhost.localdomain localhost 192.168.0.3 rac1pub.hugo rac1pub 192.168.0.6 rac2pub.hugo rac2pub


192.168.1.3 rac1pri.hugo rac1pri 192.168.1.6 rac2pri.hugo rac2pri 192.168.0.10 rac1vip.hugo rac1vip 192.168.0.11 rac2vip.hugo rac2vip Rede Pública 192.168.1.x (ligadas com modem/switch wireless) rede privada 192.168.0.x (ligada com cabo Cross entre as duas máquinas)

3 ) Criação de grupo e usuário 3.1 ) Criar em todos os nós com a mesma numeração, 700 foi aleatório: groupadd –g 700 dba groupadd –g 701 oinstall useradd –u 700 –g oinstall –G dba oracle 3.2 ) Alterar a senha do Oracle passwd oracle

4 ) Criando chave de autenticação nos servidores 4.1 ) criar a chave em cada servidor su – oracle ssh-keygen –r dsa –b 1024 (não entrar com chave, colocar enter em tudo, dsa pode ser substituído por rsa) 4.2) copiar a chave de todos os servidores em um arquivo cat /home/oracle/.ssh/dd_dsa.pub >> /home/oracle/.ssh/authorized_keys obter todos os dd_dsa.pub em um arquivo authorized_keys com cat >> O mesmo authorized_keys pode ser copiado para todos os servidores 4.3) Editar o config do ssh para não dar Warning de Xforward


vi /home/oracle/.ssh/config Host * ForwardX11 no 4.4) Verificar se está e se não tiver instalar o rhs-server-0.17... rpm –Uvh rsh-server-0.17.17.i386.rpm chkconfig rsh on chkconfig rlogin on service xinetd reload 4.5) Editar o /etc/hosts.equiv +rac1pub oracle +rac2pub oracle +rac1pri oracle +rac2pri oracle +rac1vip oracle +rac1vip oracle (testar rsh e ssh entre os servidores, todos os nomes pub e pri)

5 ) Exportar NFS no servidor origem 5.1) Editar o /etc/exports # /oradata *(rw) 5.2) iniciar o nfs /etc/init.d/nfs start exportfs –a


5.3) Opções do NFS vi /etc/modules.conf options nfs nfs_uncached_io=1 5.4) Colocar o nfs no servidor destino vi /etc/fstab rac1pri:/oradata /oradata nfs rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,noarc,vers=3,timeo=600 0 0 para montar mount /oradata

6 ) Adicionar o hagcheck-timer no /etc/modules.conf options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180

7 ) Ajuste parâmetros de Rede vi /etc/sysctl.conf net.core.rmem_default=262144 net.core.wmem_default=262144 net.core.rmem_max=262144 net.core.wmem_max=262144

8 ) Limites do usuário vi /etc/security/limits.conf oracle soft nofile 63536 oracle hard nofile 63536 oracle soft nproc 16384 oracle hard nproc 16384


9 ) Parâmetros de memória , semaphore e arquivo echo "kernel.shmmax=2147483648" >> /etc/sysctl.conf echo "kernel.shmmni=4096" >> /etc/sysctl.conf echo "kernel.shmall=2097152" >> /etc/sysctl.conf echo "kernel.sem=250 32000 100 128" >> /etc/sysctl.conf echo "fs.file-max=65536" >> /etc/sysctl.conf

10 ) Boot Antes de iniciar a instalação faça um reboot, lembrando que a ordem interfere no NFS Inicie o servidor de NFS primeiro

11 ) Instalando CRS Setar as variáveis ORACLE_BASE=/u01 ORACLE_SID=rac1 Oracle 10g Cluster Ready Services (CRS) R1 (10.1.0.2) Iniciar no servidor de NFS $ /mnt/cdrom/runInstaller - Welcome Screen: Click Next - Inventory directory and credentials: Click Next - Unix Group Name: Use "oinstall". - Root Script Window: Open another window, login as root, and run /tmp/orainstRoot.sh on the node where you launched runInstaller. After you've run the script, click Continue.


- File Locations: I used the recommended default values: Destination Name: OraCr10g_home1 Destination Path: /u01/oraclele/product/10.1.0/crs_1 Click Next - Language Selection: Click Next - Cluster Configuration: Cluster Name: crs Cluster Nodes: Public Node Name: rac1pub Private Node Name: rac1prv Public Node Name: rac2pub Private Node Name: rac2prv Public Node Name: rac3pub Private Node Name: rac3prv Click Next - Private Interconnect Enforcement: Interface Name: eth0 Subnet: 192.168.0.0 Interface Type: Public Interface Name: eth1 Subnet: 192.168.1.0 Interface Type: Private Click Next - Oracle Cluster Registry: OCR Location: /oradata/OCRFile Click Next - Voting Disk: Voting disk file name: /oradata/CSSFile Click Next - Root Script Window: Open another window, login as root, and execute /u01/oraInventory/orainstRoot.sh on ALL RAC Nodes!


NOTE: For any reason Oracle does not create the log directory "/u01/product/10.1.0/crs_1/log". If there are problems with CRS, it will create log files in this directory, but only if it exists. Therefore make sure to create this directory as oracle: oracle$ mkdir /u01/product/10.1.0/crs_1/log After you've run the script, click Continue. - Setup Privileges Script Window: Open another window, login as root, and execute /u01/product/10.1.0/crs_1/root.sh on ALL RAC Nodes one by one! Note that his can take a while. On the last RAC node, the output of the script was as follows: ... CSS is active on these nodes. rac1pub rac2pub rac3pub CSS is active on all nodes. Oracle CRS stack installed and running under init(1M) Click OK - Summary: Click Install - When installation is completed, click Exit. One way to verify the CRS installation is to display all the nodes where CRS was installed: oracle$ /u01/product/10.1.0/crs_1/bin/olsnodes -n


rac1pub 1 rac2pub 2 rac3pub 3

12 ) Instalando o Binรกrio do Banco com RAC $ /mnt/cdrom/runInstaller - Welcome Screen: Click Next - File Locations: I used the default values: Destination Name: raDb10g_home1 Destination Path: /u01/product/10.1.0/db_1 Click Next. - Hardware Cluster Installation Mode: Select "Cluster Installation" Click "Select All" to select all servers: rac1pub, rac2pub, rac3pub Click Next NOTE: If it stops here and the status of a RAC node is "Node not reachable", then perform the following checks: - Check if the node where you launched OUI is able to do ssh without a passphrase to the RAC node where the status is set to "Node not reachable". - Check if the CRS is running this RAC node. - Installation Type: I selected "Enterprise Edition". Click Next. - Product-specific Prerequisite Checks:


Make sure that the status of each Check is set to "Succeeded". Click Next - Database Configuration: << Criar um banco teste >> datafiles devem ser alocados no /oradata/rac/data/ por exemplo - Summary: Click Install - Setup Privileges Window: Open another window, login as root, and execute /u01/product/10.1.0/db_1/root.sh on ALL RAC Nodes one by one! NOTE: Make also sure that X is relinked to your local desktop since this script will launch the "VIP Configuration Assistant" tool which is a GUI based utility! VIP Configuration Assistant Tool: (This Assistant tool will come up only once when root.sh is executed the first time in your RAC cluster) - Welcome Click Next - Network Interfaces: 2 interfaces, eth0 and eth1. Click Next - Virtual IPs for cluster nodes: (for the alias names and IP address, see Setting Up the /etc/hosts File) Node Name: rac1pub IP Alias Name: rac1vip IP address: 192.168.1.10 Subnet Mask: 255.255.255.0


Node Name: rac2pub IP Alias Name: rac2vip IP address: 192.168.1.11 Subnet Mask: 255.255.255.0 Click Next - Summary: Click Finish - Configuration Assistant Progress Dialog: Click OK after configuration is complete. - Configuration Results: Click Exit Click OK to close the Setup Privilege Window. - End of Installation: Click Exit

13 ) Adicionar entradas no .bash_profile export ORACLE_BASE=/u01 export ORACLE_SID=rac1 (para cara node deve ser o nome da instância rac1, rac2) export ORACLE_HOME=$ORACLE_BASE/product/10.1.0/db_1 export PATH=$PATH:$ORACLE_HOME/bin export LD_LIBRARY_PATH=$ORACLE_HOME/lib Obs: a cópia feita pelo Instalador do Oracle do nó de instalação para o segundo nó demora bastante.

14) Brincar com o RAC Sugestão, alterar os parâmetros de load_balance e failover nos tnsnames.


Ideal ter uma terceira máquina para conectar, ligada ao mesmo hub. Shutar a máquina node 2. e reiniciar. Verificar as entradas no initab feitas pelo instalador. Verificar a criação do Virtual IP feita pelo instalador. (ifconfig –a)

15) Fonte http://www.puschitz.com/InstallingOracle10gRAC.shtml http://metalink.oracle.com


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.