Primeiro é preciso instalar os pacotes do ASM. // First you need to install OS packages ASM.
yum install -y oracleasm-support oracleasm expat-devel libao
wget http://download.oracle.com/otn_software/asmlib/oracleasmlib-2.0.12-1.el6.x86_64.rpm
rpm -ivh oracleasmlib-2.0.12-1.el6.x86_64.rpm
Caso esteja utilizando outra plataforma, acesse o site da oracle e baixe o asmlib correto. Veja o exemplo, abaixo, para o caso de um redhat 6: // If you are using another platform, please visit the Oracle website and download the correct asmlib . See the example below for the case of a RedHat 6:
http://www.oracle.com/technetwork/server-storage/linux/asmlib/rhel6-1940776.html
1) Configure o Oracle ASM. // Configure the Oracle ASM.
# /etc/init.d/oracleasm configure -i
1ª Variavel = grid
2ªVariavel=oinstall
3ª e 4ª = [y]
2) Crie a partição primária nos discos que farão parte do ASM. // Create a primary partition on disks that will be part of ASM.
# ls /dev/sd*
# fdisk /dev/sdb
n (nova partição)
p (primária)
1 (numero da partição)
enter (default primeiro cilindro)
enter (default último cilindro)
w (gravar alterações)
3) Configurar Multipath se não o Grid InfraStructure não irá achar os ASM DISKS. Rode em todos os nodes: // Configure Multipath is not the Grid infrastructure will not find the ASM DISKS . Turn on all nodes :
3.1) Modifique o /etc/sysconfig/oracleasm com: // Modify the # /etc/sysconfig/oracleasm with:
ORACLEASM_SCANORDER=”dm”
ORACLEASM_SCANEXCLUDE=”sd”
3.2) Restart o asmlib: // restart the asmlib:
# /etc/init.d/oracleasm restart
3.3) O Resultado Final terá que ficar assim: // The End Result will have to look like this:
# /usr/sbin/oracleasm configure
ORACLEASM_ENABLED=true
ORACLEASM_UID=grid
ORACLEASM_GID=oinstall
ORACLEASM_SCANBOOT=true
ORACLEASM_SCANORDER="dm"
ORACLEASM_SCANEXCLUDE="sd"
ORACLEASM_USE_LOGICAL_BLOCK_SIZE="false"
4) Crie os discos ASM. // create ASM disks.
# /etc/init.d/oracleasm createdisk DSKASM1 /dev/sdb1
# /etc/init.d/oracleasm createdisk DSKASM2 /dev/sdc1
4.1) Liste os discos ASM para conferir. // Liste The ASM disk to check.
# /etc/init.d/oracleasm listdisks
DSKASM1
DSKASM2
5) Crie os diretórios de instalação, altere o owner e de permissão recursiva 775. // Create Installation directories, change the owner and permission recursively 775.
mkdir -p /u01/app/grid
mkdir -p /u01/app/grid/12.1.0
chown -R oracle:oinstall /u01
chmod -R 775 /u01/
groupadd -g 1000 oinstall
groupadd -g 1020 asmadmin
groupadd -g 1021 asmdba
groupadd -g 1031 dba
useradd -u 1100 -g oinstall -G asmadmin,asmdba grid
useradd -u 1101 -g oinstall -G dba,asmdba oracle
6) Defina as variáveis de ambiente. // Set the environment variables.
# vi /home/grid/./.bash_profile
TMP=/tmp
TMPDIR=$TMP
TEMP=$TMP
export ORACLE_SID=+ASM1
export ORACLE_BASE=/u01/app/oracle
export GRID_HOME=/u01/app/12.1.0.1/grid
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0.1/dbhome_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORACLE_TERM=xterm
export
PATH=$PATH:$ORACLE_HOME/bin:$PATH:$GRID_HOME/bin:/usr/bin:/sbin:/usr/
sbin:$ORACLE_HOME/OPatch
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export PS1="[${LOGNAME}@`hostname -s`:"'${PWD} [${ORACLE_SID}] ]$ '
export PERL_HOME=/usr/local/perl
export PERL5LIB=$PERL_HOME/lib
export SQLPATH=/home/oracle/scripts-ora
7)Defina a configuração do Arquivo: vi /etc/security/limits.conf // Set the archive configuration: vi /etc/security/limits.conf
grid soft noproc 131072
grid hard noproc 131072
grid soft nofile 131072
grid hard nofile 131072
grid soft core unlimited
grid hard core unlimited
grid soft memlock unlimited
grid hard memlock unlimited
8)# su -grid
$ cd /home/grid
$ unzip linuxamd64_12102_grid_1of2.zip
$ unzip linuxamd64_12102_grid_2of2.zip
$ cd /home/grid/grid
$ ./runInstaller
9) Marque a opção “Skip software update” e clique em “Next”. // Check the "Skip update software" and click "Next".
Escolha a opção “Standalone Server” e clique em “Next”. // Choose "Standalone Server" and click "Next".
Escolha o idioma e clique em “Next”. // Choose your language and click "Next."
Nesse momento será criado o “Disc Group DATA”. // At that moment will be created the "Disc Group DATA".
Escolha “Redundancy” Normal. // Select "Redundancy" Normal.
“Alocation Unit”(AL) 1MB. // "Alocation Unit" (AL) 1MB.
Selecione dois discos para compor o “Disc Group DATA”. // Select two disks to compose the "Disc Group DATA".
Clique em “Next”. // Click "Next."
Defina a senha para a instância ASM e clique em “Next”. // Set the password for the ASM instance and click "Next."
Selecione os grupos “oinstall” e clique em “Next”. // Select groups "oinstall" and click "Next."
Como as variáveis ORACLE_BASE e GRID_HOME foram definidas, a tela já traz os campos para instalação preenchidos corretamente, clique em “Next”. // As the ORACLE_BASE and GRID_HOME variables were defined, the screen already has the facility to fields filled in correctly, click "Next".
Clique em “Next”. // Click "Next."
Clique em “Install”. // Click "Install".
Nesse momento deve ser rodado os scripts como “root” que a instalação pede. // At this point must be run scripts as "root" the installation asks.
Abra um novo terminal como root e execute os scripts. // Open a new terminal as root and run the scripts.
cd /u01/app/oraInventory
./orainstRoot.sh
cd /u01/app/oracle/product/11.2.0/grid
./root.sh
Feche o terminal. // Close the terminal.
Clique em “OK” na janela onde pede que os scripts sejam executados. // Click "OK" in the window which asks the scripts to run.
Instalação concluída, clique em “Close”. // Installation complete, click "Close".
Como criar o diskgroup no ASM?
1) Neste passo será criado o Diskgroup +DATA onde ficarão armazenados os Dados do novo Database. // This step will create the diskgroup + DATA where the new data will be stored Database.
Iniciar instalador: // Starting installer:
vi /home/oracle/./.bash_profile
acrescentar: export GRID_HOME=/u01/app/oracle/product/11.2.0/grid
ou digitar: export GRID_HOME=/u01/app/oracle/product/11.2.0/grid
cd $GRID_HOME/bin
./asmca
My Linkedin: https://www.linkedin.com/in/salom%C3%A3o-netto-0667851a?trk=nav_responsive_tab_profile
Nenhum comentário:
Postar um comentário