SHARE
TWEET

CertificaçãoBD - Projeto RAC em casa - parte 2 - O RAC!

vjunior1981 Oct 28th, 2016 (edited) 145 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ## Link download ASMlib
  2. http://www.oracle.com/technetwork/server-storage/linux/asmlib/ol6-1709075.html
  3.  
  4.  
  5. ## Link correção 11.2.0.1 RHEL/OEL 6 (video por volta dos 2h e 6m - inicio do script com problema)
  6. http://myorastuff.blogspot.com.br/2015/10/crs-4124-oracle-high-availability.html
  7.  
  8.  
  9. #### Editar arquivos conforme post acima no node 1 e depois copiar para o node 2.
  10. #### Isso pode ser feito antes mesmo de se executar o root no node1, caso não queira passar pelo mesmo problema. :)
  11.  
  12. #### Link para download dos arquivos já editados. Não foram testados em outro ambiente que não o do vídeo.
  13. https://www.dropbox.com/s/poyx2k45eg7wa8l/oracle-ohasd.conf?dl=0
  14. https://www.dropbox.com/s/0mqvdyjdz28zmn7/s_crsconfig_lib.pm?dl=0
  15.  
  16. [root@certbd1 ~]# scp -rp /etc/init/oracle-ohasd.conf root@192.168.56.102:/etc/init/oracle-ohasd.conf
  17. [root@certbd1 ~]# scp -rp /u01/app/11.2.0.1/grid/crs/install/s_crsconfig_lib.pm oracle@192.168.56.102:/u01/app/11.2.0.1/grid/crs/install/s_crsconfig_lib.pm
  18.  
  19.  
  20. # .bashrc
  21.  
  22. # Source global definitions
  23. if [ -f /etc/bashrc ]; then
  24.     . /etc/bashrc
  25. fi
  26.  
  27. # User specific aliases and functions
  28.  
  29. # Oracle Settings  ####### Setar o SID e HOSTNAME de acordo com o node
  30. export TMP=/tmp
  31. export TMPDIR=$TMP
  32. export EDITOR=vi
  33. export NLS_DATE_FORMAT='DD/MM/YY HH24:MI:SS'
  34. export NLS_LANG='AMERICAN_AMERICA.AL32UTF8'
  35.  
  36. export ORACLE_HOSTNAME=certbd2.localdomain
  37. export ORACLE_UNQNAME=certbd
  38. export ORACLE_BASE=/u01/app/oracle
  39. export GRID_HOME=/u01/app/11.2.0.1/grid
  40. export GH=$GRID_HOME
  41. export DB_HOME=$ORACLE_BASE/product/11.2.0.1/db_1
  42. export ORACLE_HOME=$DB_HOME
  43. export OH=$DB_HOME
  44. export ORACLE_SID=certbd2
  45. export ORACLE_TERM=xterm
  46. export BASE_PATH=/usr/sbin:$PATH
  47. export OPATCH_RDBMS=$ORACLE_HOME/OPatch
  48. export OPATCH_GRID=$GRID_HOME/OPatch
  49. export PATH=$ORACLE_HOME/bin:$BASE_PATH
  50.  
  51. export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
  52. export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
  53.  
  54. alias grid_env='. /home/oracle/grid_env'
  55. alias db_env='. /home/oracle/db_env'
  56.  
  57.  
  58.  
  59. ##### db_env  ####### Setar o SID de acordo com o node
  60.  
  61. # Oracle Settings
  62. export ORACLE_SID=certbd2
  63. export ORACLE_HOME=$DB_HOME
  64. export PATH=$ORACLE_HOME/bin:$OPATCH_RDBMS:$BASE_PATH
  65. export ALERT=$ORACLE_BASE/diag/rdbms/$ORACLE_SID/$ORACLE_SID/trace/alert_$ORACLE_SID.log
  66.  
  67. export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
  68. export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
  69.  
  70.  
  71.  
  72. ##### grid_env  ####### Setar o SID de acordo com o node
  73. # Oracle Settings
  74. export ORACLE_SID=+ASM2
  75. export ORACLE_HOME=$GRID_HOME
  76. export PATH=$ORACLE_HOME/bin:$OPATCH_GRID:$BASE_PATH
  77. export ALERT=$ORACLE_BASE/diag/asm/+asm/$ORACLE_SID/trace/alert_$ORACLE_SID.log
  78.  
  79. export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
  80. export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
  81.  
  82.  
  83.  
  84.  
  85. # Create the disks and associate them with VirtualBox as virtual media.
  86. VBoxManage createhd --filename /disco1/VirtualBoxVms/rac-certbd/asm1.vdi --size 5120 --format VDI --variant Fixed
  87. VBoxManage createhd --filename /disco1/VirtualBoxVms/rac-certbd/asm2.vdi --size 5120 --format VDI --variant Fixed
  88. VBoxManage createhd --filename /disco1/VirtualBoxVms/rac-certbd/asm3.vdi --size 5120 --format VDI --variant Fixed
  89. VBoxManage createhd --filename /disco1/VirtualBoxVms/rac-certbd/asm4.vdi --size 5120 --format VDI --variant Fixed
  90.  
  91. # Connect them to the VM.
  92. VBoxManage storageattach certbd1 --storagectl "SATA" --port 1 --device 0 --type hdd     --medium /disco1/VirtualBoxVms/rac-certbd/asm1.vdi --mtype shareable
  93. VBoxManage storageattach certbd1 --storagectl "SATA" --port 2 --device 0 --type hdd     --medium /disco1/VirtualBoxVms/rac-certbd/asm2.vdi --mtype shareable
  94. VBoxManage storageattach certbd1 --storagectl "SATA" --port 3 --device 0 --type hdd     --medium /disco1/VirtualBoxVms/rac-certbd/asm3.vdi --mtype shareable
  95. VBoxManage storageattach certbd1 --storagectl "SATA" --port 4 --device 0 --type hdd     --medium /disco1/VirtualBoxVms/rac-certbd/asm4.vdi --mtype shareable
  96.  
  97. # Connect them to the VM.
  98. VBoxManage storageattach certbd2 --storagectl "SATA" --port 1 --device 0 --type hdd     --medium /disco1/VirtualBoxVms/rac-certbd/asm1.vdi --mtype shareable
  99. VBoxManage storageattach certbd2 --storagectl "SATA" --port 2 --device 0 --type hdd     --medium /disco1/VirtualBoxVms/rac-certbd/asm2.vdi --mtype shareable
  100. VBoxManage storageattach certbd2 --storagectl "SATA" --port 3 --device 0 --type hdd     --medium /disco1/VirtualBoxVms/rac-certbd/asm3.vdi --mtype shareable
  101. VBoxManage storageattach certbd2 --storagectl "SATA" --port 4 --device 0 --type hdd     --medium /disco1/VirtualBoxVms/rac-certbd/asm4.vdi --mtype shareable
RAW Paste Data
Want to get better at Bash?
Learn to code Bash in 2017
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top