Oracle Restart Database 21c
Este artigo contém todas as informações relacionadas à instalação do Oracle Restart Database 21c (Linux) sem ASM.
Fiz o teste e você pode usar o mesmo procedimento para as versões (12.2,18c, 19c).
Basta alterar o response_schema para a versão do grid e do banco de dados que deseja usar, no
response file.
1) Oracle Database Prerequisites Packages para Oracle Linux
Use este procedimento para instalar o pacote do grupo de pré-requisitos do banco de dados Oracle para seu software Oracle.
O pacote oracle-database-preinstall-21c instala todos os pacotes necessários para uma instalação de banco de dados Oracle e Oracle Grid Infrastructure. Ele também cria o usuário oracle e os grupos oinstall e dba para esse usuário.
Para instalar o pacote oracle-database-preinstall-21c, faça login como root e execute o seguinte comando no Linux:command on Linux:
[root@dutsDB ~]# yum install oracle-database-preinstall-21c
2) Instalando Oracle Grid Infrastructure Standalone Server para Oracle Linux em Silent Mode
Conclua essas etapas para instalar o Oracle Grid Infrastructure para um Standalone server em seguida, crie um banco de dados gerenciado pelo Oracle Restart
Você deve ter suas informações de rede, informações de armazenamento, usuários e grupos do sistema operacional disponíveis para você antes de iniciar a instalação. Você também deve estar preparado para executar scripts como root ou fornecer informações para automatizar os scripts de root .
a) Faça o login com o usuário (oracle).
b) Se esta for a primeira vez que você está instalando o software do Oracle, então crie os diretórios Oracle Base e o Oracle Inventory como parte do Oracle Optimal Flexible Architecture (OFA). Especifique o owner, grupo e permissões corretas para esses diretórios.
[oracle@dutsDB ~]# mkdir -p /u01/app/oraInventory
[oracle @dutsDB ~]# chown -R oracle:oinstall /u01/app/oracle
[oracle @dutsDB ~]# chown -R oracle:oinstall /u01/app/oraInventory
[oracle @dutsDB ~]# chmod -R 775 /u01/app
c) Baixe o Oracle Grid Infrastructure para a Standalone server, crie o diretório para instalar o grid e faça o unzip do arquivo de Grid assim como a última versão do Opatch.
[oracle@dutsDB u01]$ mkdir -p /u01/app/oracle/product/21.0.0/grid
[oracle@dutsDB u01]$ cd /u01/app/oracle/product/21.0.0/grid
[oracle@dutsDB grid]$ unzip -q /u01/binarios/Oracle_21_3_Grid.ziprm
[oracle@dutsDB grid]$ rm –rf OPatch
[oracle@dutsDB grid]$ unzip -q /u01/binarios/p6880880_190000_Linux-x86-64.zip
d) Crie o response file grid_setup.rsp.
oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v21.0.0
INVENTORY_LOCATION=/u01/app/oraInventory
oracle.install.option=CRS_SWONLY
ORACLE_BASE=/u01/app
oracle.install.asm.OSDBA=dba
oracle.install.asm.OSASM=oinstall
oracle.install.crs.config.ClusterConfiguration=STANDALONE
e) Após isso execute gridSetup.sh com a opção applyRU e o silent mode:
[oracle@dutsDB grid]$ ./gridSetup.sh -silent -responseFile /u01/binarios/grid_setup.rsp
Launching Oracle Grid Infrastructure Setup Wizard...
The response file for this session can be found at:
/u01/app/oracle/product/21.0.0/grid/install/response/grid_2021-09-10_10-55-55AM.rsp
You can find the log of this install session at:
/tmp/GridSetupActions2021-09-10_10-55-55AM/gridSetupActions2021-09-10_10-55-55AM.log
As a root user, execute the following script(s):
1. /u01/app/oraInventory/orainstRoot.sh
2. /u01/app/oracle/product/21.0.0/grid/root.sh
Execute /u01/app/oraInventory/orainstRoot.sh on the following nodes:
[dutsDB]
Execute /u01/app/oracle/product/21.0.0/grid/root.sh on the following nodes:
[dutsDB]
Successfully Setup Software.
Moved the install session logs to:
/u01/app/oraInventory/logs/GridSetupActions2021-09-10_10-55-55AM
[oracle@dutsDB grid]$
f) Após a conclusão da configuração e execute o script /u01/app/oracle/product/21.0.0/grid/root.sh with root user.
[root@dutsDB ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@dutsDB ~]# /u01/app/oracle/product/21.0.0/grid/root.sh
Check /u01/app/oracle/product/21.0.0/grid/install/root_dutsDB_2021-09-10_11-07-57-619366648.log for the output of root script
[root@dutsDB ~]#
[root@dutsDB ~]#
g) Execute o script /u01/app/oracle/product/21.0.0/grid/crs/install/roothas.sh com usuário root.
[root@dutsDB ~]# /u01/app/oracle/product/21.0.0/grid/crs/install/roothas.sh
Using configuration parameter file: /u01/app/oracle/product/21.0.0/grid/crs/install/crsconfig_params
2021-09-10 11:08:47: Got permissions of file /u01/app/crsdata/dutsdb/crsconfig: 0775
2021-09-10 11:08:47: Got permissions of file /u01/app/crsdata: 0775
2021-09-10 11:08:47: Got permissions of file /u01/app/crsdata/dutsdb: 0775
The log of current session can be found at:
/u01/app/crsdata/dutsdb/crsconfig/roothas_2021-09-10_11-08-47AM.log
2021/09/10 11:09:03 CLSRSC-363: User ignored prerequisites during installation
Redirecting to /bin/systemctl restart rsyslog.service
LOCAL ADD MODE
Creating OCR keys for user 'oracle', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node dutsdb successfully pinned.
2021/09/10 11:17:27 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
dutsdb 2021/09/10 11:11:57 /u01/app/crsdata/dutsdb/olr/backup_20210910_113257.olr
2021/09/10 11:33:32 CLSRSC-327: Successfully configured Oracle Restart for a standalone server
[oracle@dutsDB bin]$ ./crsctl status res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ons
OFFLINE OFFLINE dutsdb STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 OFFLINE OFFLINE STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE dutsdb STABLE
--------------------------------------------------------------------------------
[oracle@dutsDB bin]$
3) Instalando o Oracle Database 21c para Oracle Linux com Silent Mode
Conclua essas etapas para instalar o Oracle Database 21c.
a) Faça o login com o usuário (oracle).
b) Crie o diretório do Oracle home e faça o unzip do arquivo do Oracle Database, assim como a última versão do Opatch
[oracle@dutsDB grid]$ mkdir -p /u01/app/oracle/product/21.0.0/dbhome_1
[oracle@dutsDB grid]$ cd /u01/app/oracle/product/21.0.0/dbhome_1
[oracle@dutsDB dbhome_1]$ unzip -q /u01/binarios/Oracle_21_3_Database.zip
[oracle@dutsDB dbhome_1]$ rm -rf OPatch/
[oracle@dutsDB dbhome_1]$ unzip -q /u01/binarios/p6880880_190000_Linux-x86-64.zip
[oracle@dutsDB dbhome_1]$
c) Crie o response file db_setup.rsp.
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v21.0.0
oracle.install.option=INSTALL_DB_SWONLY
UNIX_GROUP_NAME=dba
INVENTORY_LOCATION=/u01/app/oraInventory
ORACLE_HOME=/u01/app/oracle/product/21.0.0/dbhome_1
ORACLE_BASE=/u01/app
oracle.install.db.InstallEdition=EE
oracle.install.db.OSDBA_GROUP=dba
oracle.install.db.OSOPER_GROUP=oinstall
oracle.install.db.OSBACKUPDBA_GROUP=oinstall
oracle.install.db.OSDGDBA_GROUP=dba
oracle.install.db.OSKMDBA_GROUP=dba
oracle.install.db.OSRACDBA_GROUP=dba
d) Execute o runinstaller com opção do applyRU e o silent mode:
[oracle@dutsDB dbhome_1]$ ./runInstaller -silent -responseFile /u01/binarios/db_setup.rsp -ignorePrereqFailure
Launching Oracle Database Setup Wizard...
The response file for this session can be found at:
/u01/app/oracle/product/21.0.0/dbhome_1/install/response/db_2021-09-10_12-17-55PM.rsp
You can find the log of this install session at:
/u01/app/oraInventory/logs/InstallActions2021-09-10_12-17-55PM/installActions2021-09-10_12-17-55PM.log
As a root user, execute the following script(s):
1. /u01/app/oracle/product/21.0.0/dbhome_1/root.sh
Execute /u01/app/oracle/product/21.0.0/dbhome_1/root.sh on the following nodes:
[dutsDB]
Successfully Setup Software.
e) Após a conclusão da configuração e execute o script /u01/app/oracle/product/21.0.0/dbhome_1/root.sh com usuário root.
[root@dutsDB ~]# /u01/app/oracle/product/21.0.0/dbhome_1/root.sh
Check /u01/app/oracle/product/21.0.0/dbhome_1/install/root_dutsDB_2021-09-10_12-33-41-458028241.log for the output of root script
[root@dutsDB ~]#
[root@dutsDB ~]# cat /u01/app/oracle/product/21.0.0/dbhome_1/install/root_dutsDB_2021-09-10_12-33-41-458028241.log
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/21.0.0/dbhome_1
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
[root@dutsDB ~]#
Agora crie seu banco de dados e verifique se ele foi adicionado no Oracle Restart.
[oracle@dutsDB ~]$ crsctl status res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ons
OFFLINE OFFLINE dutsdb STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 OFFLINE OFFLINE STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.duts.db
1 ONLINE ONLINE dutsdb Open,HOME=/u01/app/o
racle/product/21.0.0
/dbhome_1,STABLE
ora.duts.dutspdb.pdb
1 ONLINE ONLINE dutsdb STABLE
ora.evmd
1 ONLINE ONLINE dutsdb STABLE
--------------------------------------------------------------------------------
[oracle@dutsDB ~]$
[oracle@dutsDB ~]$ sqlplus
SQL*Plus: Release 21.0.0.0.0 - Production on Fri Sep 10 14:19:51 2021
Version 21.3.0.0.0
Copyright (c) 1982, 2021, Oracle. All rights reserved.
Enter user-name: / as sysdba
Connected to:
Oracle Database 21c Enterprise Edition Release 21.0.0.0.0 - Production
Version 21.3.0.0.0
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 DUTSPDB READ WRITE NO
SQL>
Espero que isso te ajude!!!
Fique ligado, seguindo no twitter @aontalba e no Linkedin
Disclaimer: “The postings on this site are my own and don’t necessarily represent may actual employer positions, strategies or opinions. The information here was edited to be useful for general purpose, specific data and identifications was removed to allow reach generic audience and to be useful