oracle 19c-rac 部署-文件分析

1、/u01/app/oraInventory/orainstRoot.sh

#!/bin/sh

AWK=/bin/awk

CHMOD=/bin/chmod

CHGRP=/bin/chgrp

CP=/bin/cp

ECHO=/bin/echo

MKDIR=/bin/mkdir

RUID=`/usr/bin/id|AWK -F\\( '{print 1}'|AWK -F\\= '{print 2}'`

if [ ${RUID} != "0" ];then

$ECHO "This script must be executed as root"

exit 1

fi

if [ ! -d "/etc" ]; then

$MKDIR -p /etc;

fi

$CHMOD 755 /etc;

if [ -f "/u01/app/oraInventory/oraInst.loc" ]; then

$CP /u01/app/oraInventory/oraInst.loc /etc/oraInst.loc;

$CHMOD 644 /etc/oraInst.loc

else

INVPTR=/etc/oraInst.loc

INVLOC=/u01/app/oraInventory

GRP=oinstall

PTRDIR="`dirname $INVPTR`";

Create the software inventory location pointer file

if [ ! -d "$PTRDIR" ]; then

MKDIR -p PTRDIR;

fi

ECHO "Creating the Oracle inventory pointer file (INVPTR)";

ECHO inventory_loc=INVLOC > $INVPTR

ECHO inst_group=GRP >> $INVPTR

chmod 644 $INVPTR

Create the inventory directory if it doesn't exist

if [ ! -d "$INVLOC" ];then

ECHO "Creating the Oracle inventory directory (INVLOC)";

MKDIR -p INVLOC;

fi

fi

$ECHO "Changing permissions of /u01/app/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions for world.

";

$CHMOD -R g+rw,o-rwx /u01/app/oraInventory;

if [ $? != 0 ]; then

$ECHO "OUI-35086:WARNING: chmod of /u01/app/oraInventory

Adding read,write permissions for group.

,Removing read,write,execute permissions for world.

failed!";

fi

$ECHO "Changing groupname of /u01/app/oraInventory to oinstall.";

$CHGRP -R oinstall /u01/app/oraInventory;

if [ $? != 0 ]; then

$ECHO "OUI-10057:WARNING: chgrp of /u01/app/oraInventory to oinstall failed!";

fi

$ECHO "The execution of the script is complete."

2、/u01/app/19.0.0/grid_1/root.sh

#!/bin/sh

unset WAS_ROOTMACRO_CALL_MADE

. /u01/app/19.0.0/grid_1/install/utl/rootmacro.sh "$@"

. /u01/app/19.0.0/grid_1/install/utl/rootinstall.sh

Invoke standalone rootadd_rdbms.sh

/u01/app/19.0.0/grid_1/rdbms/install/rootadd_rdbms.sh

/u01/app/19.0.0/grid_1/rdbms/install/rootadd_filemap.sh

/u01/app/19.0.0/grid_1/crs/config/rootconfig.sh $@

EXITCODE=$?

if [ $EXITCODE -ne 0 ]; then

exit $EXITCODE

fi

3、2个节点分别执行过程如下

root@hydb1 \~\]# /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@hydb1 \~\]# /u01/app/19.0.0/grid_1/root.sh Performing root user operation. The following environment variables are set as: ORACLE_OWNER= grid ORACLE_HOME= /u01/app/19.0.0/grid_1 Enter the full pathname of the local bin directory: \[/usr/local/bin\]: Copying dbhome to /usr/local/bin ... Copying oraenv to /usr/local/bin ... Copying coraenv to /usr/local/bin ... Creating /etc/oratab file... 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. Relinking oracle with rac_on option Using configuration parameter file: /u01/app/19.0.0/grid_1/crs/install/crsconfig_params The log of current session can be found at: /u01/app/grid/crsdata/hydb1/crsconfig/rootcrs_hydb1_2024-07-27_09-49-00AM.log 2024/07/27 09:49:05 CLSRSC-594: Executing installation step 1 of 19: 'ValidateEnv'. 2024/07/27 09:49:05 CLSRSC-594: Executing installation step 2 of 19: 'CheckFirstNode'. 2024/07/27 09:49:06 CLSRSC-594: Executing installation step 3 of 19: 'GenSiteGUIDs'. 2024/07/27 09:49:07 CLSRSC-594: Executing installation step 4 of 19: 'SetupOSD'. 2024/07/27 09:49:07 CLSRSC-594: Executing installation step 5 of 19: 'CheckCRSConfig'. 2024/07/27 09:49:07 CLSRSC-594: Executing installation step 6 of 19: 'SetupLocalGPNP'. 2024/07/27 09:49:15 CLSRSC-594: Executing installation step 7 of 19: 'CreateRootCert'. 2024/07/27 09:49:18 CLSRSC-594: Executing installation step 8 of 19: 'ConfigOLR'. 2024/07/27 09:49:31 CLSRSC-594: Executing installation step 9 of 19: 'ConfigCHMOS'. 2024/07/27 09:49:31 CLSRSC-594: Executing installation step 10 of 19: 'CreateOHASD'. 2024/07/27 09:49:34 CLSRSC-594: Executing installation step 11 of 19: 'ConfigOHASD'. 2024/07/27 09:49:35 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service' 2024/07/27 09:49:53 CLSRSC-594: Executing installation step 12 of 19: 'SetupTFA'. 2024/07/27 09:49:53 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'. 2024/07/27 09:49:53 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'. 2024/07/27 09:50:15 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'. 2024/07/27 09:50:19 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'. ASM has been created and started successfully. \[DBT-30001\] Disk groups created successfully. Check /u01/app/grid/cfgtoollogs/asmca/asmca-240727AM095048.log for details. 2024/07/27 09:51:21 CLSRSC-482: Running command: '/u01/app/19.0.0/grid_1/bin/ocrconfig -upgrade grid oinstall' 2024/07/27 09:51:25 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector. CRS-4256: Updating the profile Successful addition of voting disk f4631caedf0a4f05bf57a869c74e873f. Successful addition of voting disk baff495863cb4f8abfbb4c5672c2eb17. Successful addition of voting disk 53a621ee406d4f7dbf7eacb6e77e79c8. Successful addition of voting disk 9b212924120f4f06bf76b94934b54bc5. Successful addition of voting disk bc511241684c4fe9bfc56768adeb3b4f. Successfully replaced voting disk group with +CRS. CRS-4256: Updating the profile CRS-4266: Voting file(s) successfully replaced ## STATE File Universal Id File Name Disk group -- ----- ----------------- --------- --------- 1. ONLINE f4631caedf0a4f05bf57a869c74e873f (/dev/mapper/asm-crs1) \[CRS

  1. ONLINE baff495863cb4f8abfbb4c5672c2eb17 (/dev/mapper/asm-crs2) [CRS]

  2. ONLINE 53a621ee406d4f7dbf7eacb6e77e79c8 (/dev/mapper/asm-crs3) [CRS]

  3. ONLINE 9b212924120f4f06bf76b94934b54bc5 (/dev/mapper/asm-crs4) [CRS]

  4. ONLINE bc511241684c4fe9bfc56768adeb3b4f (/dev/mapper/asm-crs5) [CRS]

Located 5 voting disk(s).

2024/07/27 09:52:04 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.

2024/07/27 09:53:06 CLSRSC-343: Successfully started Oracle Clusterware stack

2024/07/27 09:53:06 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.

2024/07/27 09:53:48 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.

INFO\] \[DBT-30001\] Disk groups created successfully. Check /u01/app/grid/cfgtoollogs/asmca/asmca-240727AM095349.log for details. 2024/07/27 09:54:17 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded \[root@hydb1 \~\]# \[root@hydb2 \~\]# /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@hydb2 \~\]# /u01/app/19.0.0/grid_1/root.sh Performing root user operation. The following environment variables are set as: ORACLE_OWNER= grid ORACLE_HOME= /u01/app/19.0.0/grid_1 Enter the full pathname of the local bin directory: \[/usr/local/bin\]: Copying dbhome to /usr/local/bin ... Copying oraenv to /usr/local/bin ... Copying coraenv to /usr/local/bin ... Creating /etc/oratab file... 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. Relinking oracle with rac_on option Using configuration parameter file: /u01/app/19.0.0/grid_1/crs/install/crsconfig_params The log of current session can be found at: /u01/app/grid/crsdata/hydb2/crsconfig/rootcrs_hydb2_2024-07-27_09-55-19AM.log 2024/07/27 09:55:21 CLSRSC-594: Executing installation step 1 of 19: 'ValidateEnv'. 2024/07/27 09:55:21 CLSRSC-594: Executing installation step 2 of 19: 'CheckFirstNode'. 2024/07/27 09:55:22 CLSRSC-594: Executing installation step 3 of 19: 'GenSiteGUIDs'. 2024/07/27 09:55:22 CLSRSC-594: Executing installation step 4 of 19: 'SetupOSD'. 2024/07/27 09:55:22 CLSRSC-594: Executing installation step 5 of 19: 'CheckCRSConfig'. 2024/07/27 09:55:23 CLSRSC-594: Executing installation step 6 of 19: 'SetupLocalGPNP'. 2024/07/27 09:55:23 CLSRSC-594: Executing installation step 7 of 19: 'CreateRootCert'. 2024/07/27 09:55:23 CLSRSC-594: Executing installation step 8 of 19: 'ConfigOLR'. 2024/07/27 09:55:32 CLSRSC-594: Executing installation step 9 of 19: 'ConfigCHMOS'. 2024/07/27 09:55:32 CLSRSC-594: Executing installation step 10 of 19: 'CreateOHASD'. 2024/07/27 09:55:33 CLSRSC-594: Executing installation step 11 of 19: 'ConfigOHASD'. 2024/07/27 09:55:33 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service' 2024/07/27 09:55:49 CLSRSC-594: Executing installation step 12 of 19: 'SetupTFA'. 2024/07/27 09:55:49 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'. 2024/07/27 09:55:49 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'. 2024/07/27 09:56:08 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'. 2024/07/27 09:56:09 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'. 2024/07/27 09:56:16 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'. 2024/07/27 09:56:59 CLSRSC-343: Successfully started Oracle Clusterware stack 2024/07/27 09:56:59 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'. 2024/07/27 09:57:06 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'. 2024/07/27 09:57:09 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded \[root@hydb2 \~\]# 2024/07/27 09:57:14 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector. \[root@hydb2 \~\]#

相关推荐
机灵猫1 分钟前
Redis 在订单系统中的实战应用:防重、限流与库存扣减
数据库·redis·缓存
木易2.07 分钟前
从零构建RAG知识库管理系统(二)
数据库·oracle
程序新视界17 分钟前
什么是MySQL JOIN查询的驱动表和被驱动表?
数据库·后端·mysql
lingggggaaaa1 小时前
小迪安全v2023学习笔记(一百三十四讲)—— Windows权限提升篇&数据库篇&MySQL&MSSQL&Oracle&自动化项目
java·数据库·windows·笔记·学习·安全·网络安全
小光学长1 小时前
基于Vue的保护动物信息管理系统r7zl6b88 (程序+源码+数据库+调试部署+开发环境)带论文文档1万字以上,文末可获取,系统界面在最后面。
前端·数据库·vue.js
一匹电信狗1 小时前
【MySQL】数据库的相关操作
linux·运维·服务器·数据库·mysql·ubuntu·小程序
TDengine (老段)3 小时前
连接 TDengine 遇到报错 “failed to connect to server, reason: Connection refused” 怎么办?
大数据·数据库·物联网·时序数据库·iot·tdengine·涛思数据
李慕婉学姐4 小时前
Springboot黄河文化科普网站5q37v(程序+源码+数据库+调试部署+开发环境)带论文文档1万字以上,文末可获取,系统界面在最后面。
数据库·spring boot·后端
Cabbage_acmer4 小时前
MySQL期中考试突击!
数据库·mysql
Lu Yao_4 小时前
Redis 缓存
数据库·redis·缓存