Algumas vezes, por questões de compatibilidade, alguns fornecedores podem pedir para que você, DBA, realize instalações de versões mais antigas, pois são aquelas que estão homologadas na aplicação que será implantada. É seu papel mencionar que a tecnologia envolvida já possui versões mais recentes, seus benefícios e a questão de Suporte do fornecedor. Mas é quase certo que você será demandado a instalar e dar manutenção em versões que não são a última disponível. Neste artigo, compartilho a instalação do GRID Infrastructure 12.1.0.2 em Oracle Linux 7.7.
Se você ainda não possui as mídias de instalação, poderá fazer isso no Oracle Software Delivery, disponibilizado pela Oracle.
Após logar no site, selecione “Release” e pesquise pelo termos ORACLE GRID:

Ao realizar o check-out:

Aceitando os termos.

Ao clicar nos 2 links, o site fará automaticamente o download solicitado:

Download iniciado:

A versão do Oracle Linux será a 7.7:
[user@hostname 12.1.0.2]$ cat /etc/*release*
Oracle Linux Server release 7.7
NAME="Oracle Linux Server"
VERSION="7.7"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.7"
PRETTY_NAME="Oracle Linux Server 7.7"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:7:7:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://bugzilla.oracle.com/"
ORACLE_BUGZILLA_PRODUCT="Oracle Linux 7"
ORACLE_BUGZILLA_PRODUCT_VERSION=7.7
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=7.7
Red Hat Enterprise Linux Server release 7.7 (Maipo)
Oracle Linux Server release 7.7
cpe:/o:oracle:linux:7:7:server
Ajustando o bash_profile:
[user@hostname 12.1.0.2]$ cd
[user@hostname ~]$ vi .bash_profile
Conteúdo:
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
ORACLE_SID=+ASM
ORACLE_BASE=/grid/base
ORACLE_HOME=/grid/product
GRID_HOME=$ORACLE_HOME
ORA_CRS_HOME=$ORACLE_HOME
LD_LIBRARY_PATH=$ORACLE_HOME/lib
PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID ORACLE_BASE ORACLE_HOME GRID_HOME LD_LIBRARY_PATH PATH
alias ll='ls -l --color'
alias home='cd $ORACLE_HOME'
alias base='cd $ORACLE_BASE'
alias sql='sqlplus "/ as sysdba"'
alias crs='cd $ORACLE_HOME/bin'
alias tns='cd $ORACLE_HOME/network/admin'
alias asmtrace='cd $ORACLE_BASE/diag/asm/+asm/+ASM1/trace'
Criando os diretórios:
[user@hostname ~]$ mkdir -p /grid/base
[user@hostname ~]$ mkdir -p /grid/product
Carregando a bash_profile:
[user@hostname ~]$ . .bash_profile
[user@hostname ~]$ echo $ORACLE_SID
+ASM
[user@hostname ~]$ echo $ORACLE_HOME
/grid/product
Após o download das mídias finalizar, as copiei para o $GRID_HOME:
[user@hostname product]$ pwd
/grid/product
[user@hostname product]$ ll
total 2337920
-rw-r--r-- 1 user oinstall 1747043545 Mar 7 11:34 V46096-01_1of2.zip
-rw-r--r-- 1 user oinstall 646972897 Mar 7 11:31 V46096-01_2of2.zip
Descompactando:
[user@hostname product]$ unzip V46096-01_1of2.zip
Archive: V46096-01_1of2.zip
creating: grid/
creating: grid/rpm/
inflating: grid/rpm/cvuqdisk-1.0.9-1.rpm
. . .
extracting: grid/stage/sizes/oracle.crs.Complete.sizes.properties
inflating: grid/stage/sizes/oracle.crs.12.1.0.2.0.sizes.properties
[user@hostname product]$ unzip V46096-01_2of2.zip
Archive: V46096-01_2of2.zip
creating: grid/stage/Components/oracle.has.crs/
creating: grid/stage/Components/oracle.has.crs/12.1.0.2.0/
. . .
inflating: grid/stage/Components/oracle.rdbms/12.1.0.2.0/1/DataFiles/filegroup19.jar
inflating: grid/install/.oui
A pasta grid foi criada com os dois arquivos unzip. Os removi, pois não serão mais úteis:
[user@hostname product]$ ll
total 2337924
drwxr-xr-x 7 user oinstall 4096 Jul 7 2014 grid
-rw-r--r-- 1 user oinstall 1747043545 Mar 7 11:34 V46096-01_1of2.zip
-rw-r--r-- 1 user oinstall 646972897 Mar 7 11:31 V46096-01_2of2.zip
[user@hostname product]$ rm -rf V46096-01_1of2.zip V46096-01_2of2.zip
[user@hostname product]$ ll
total 4
drwxr-xr-x 7 user oinstall 4096 Jul 7 2014 grid
Entrando da pasta grid:
[user@hostname product]$ cd grid/
[user@hostname grid]$ ll
total 44
drwxr-xr-x 4 user oinstall 4096 Mar 7 11:36 install
drwxrwxr-x 2 user oinstall 4096 Jul 7 2014 response
drwxr-xr-x 2 user oinstall 4096 Jul 7 2014 rpm
-rwxr-xr-x 1 user oinstall 5085 Dec 20 2013 runcluvfy.sh
-rwxr-xr-x 1 user oinstall 8534 Jul 7 2014 runInstaller
drwxrwxr-x 2 user oinstall 4096 Jul 7 2014 sshsetup
drwxr-xr-x 14 user oinstall 4096 Jul 7 2014 stage
-rwxr-xr-x 1 user oinstall 500 Feb 6 2013 welcome.html
Exportando o DISPLAY e chamando o runInstaller:
[user@hostname grid]$ export DISPLAY=XXX.XX.XXX.:0.0
[user@hostname grid]$ ./runInstaller &
[1] 119012
[user@hostname grid]$ Starting Oracle Universal Installer...
Checking Temp space: must be greater than 415 MB. Actual 4614 MB Passed
Checking swap space: must be greater than 150 MB. Actual 11718 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2020-03-07_11-38-56AM. Please wait ...
[1]+ Done ./runInstaller
[user@hostname grid]$
Escolhendo a opção de Standalone Server:

Escolhendo o idioma:

Geralmente crio um DiskGroup apenas para a instalação do GRID. Como de costume, estou preservando o nome dos discos e DG para sigilo do ambiente:

Digitando senha:

Incluirei o ambiente no E.M posteriormente:

Next:

Os diretórios serão apresentados de acordo com o que foi setado na bash_profile:

Clique em YES:

Diretório do Orainventory:

Next:

Validação dos Pré-Requisitos:

Sumário de instalação:

Progresso da instalação:

Scripts:

[root@hostname ~]# XXXXX/oraInventory/orainstRoot.sh
Changing permissions of XXXXXX/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of XXXXXX/oraInventory to oinstall.
The execution of the script is complete.
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'hostname'
CRS-2673: Attempting to stop 'ora.evmd' on 'hostname'
CRS-2677: Stop of 'ora.evmd' on 'hostname' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'hostname' has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
2020/03/07 12:05:13 CLSRSC-327: Successfully configured Oracle Restart for a standalone server

Finalizado:

Como estamos preparando o ambiente para a instalação do Oracle Database, vou aproveitar também para realizar a criação dos outros DiskGroups dentro do ASM. Antes disso, vamos avaliar se nossa instância está no ar:
[user@hostname grid]$ ps -ef | grep pmon
user 127192 1 0 12:07 ? 00:00:00 asm_pmon_+ASM
user 127682 115968 0 12:09 pts/0 00:00:00 grep --color=auto pmon
[user@hostname grid]$ sqlplus / as sysasm
SQL*Plus: Release 12.1.0.2.0 Production on Sat Mar 7 12:09:19 2020
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Automatic Storage Management option
SQL> select instance_name,status from v$instance;
INSTANCE_NAME STATUS
---------------- ------------
+ASM STARTED
SQL> select banner from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
PL/SQL Release 12.1.0.2.0 - Production
CORE 12.1.0.2.0 Production
TNS for Linux: Version 12.1.0.2.0 - Production
NLSRTL Version 12.1.0.2.0 - Production
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Automatic Storage Management option
[user@hostname grid]$ asmcmd lsdg
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 4096 1048576 5119 5057 0 5057 0 N GRID/
[user@hostname grid]$
[user@hostname grid]$
Chamando o asmca (interface gráfica):
[user@hostname grid]$ asmca &
[1] 127875
[user@hostname grid]$
Clicando em Create:

Criando o DG de Archive:



Após a criação de todos os DGs:

[user@hostname grid]$ asmcmd lsdg
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 4096 1048576 20479 20426 0 20426 0 N ARCH/
MOUNTED EXTERN N 512 4096 1048576 51199 51146 0 51146 0 N DATA/
MOUNTED EXTERN N 512 4096 1048576 51199 51146 0 51146 0 N FRA/
MOUNTED EXTERN N 512 4096 1048576 5119 5057 0 5057 0 N GRID/
Pingback: Instalação do Oracle Software + Criação de Banco de Dados 12.1.0.2 – Bruno Santos da Silva
Pingback: Instalação do Oracle Software + Criação de Banco de Dados 12.1.0.2 Standalone – SWIV