在Linux平台上,从Oracle 11gR2开始,不论是单实例的库,还是RAC库,如果需要用到ASM时,通常都需要单独安装Grid Infrastructure软件。而在Linux平台上以图形界面【OUI Oracle Universal Installer】安装Oracle 11gR2 Grid软件过程中,会提示以root用户执行orainstRoot.sh和root.sh脚本【如下图一:单实例安装,图二:RAC安装】。
那么这两个脚本分别做了什么,有什么作用呢?本文简单记录:
Oracle Central Inventory 目录默认情况下,位于$ORACLE_BASE的上一级目录下,如下图三:
|
1 2 3 4 5 6 7 8 9 10 |
11gOCM->pwd /u01/app 11gOCM>ls total 20 drwxrwxr-x. 3 grid drwxr-xr-x drwxrwxr-x. 8 grid drwxrwxr-x. 8 oracle oinstall 4096 Nov drwxrwx—. 6 grid 11gOCM-> |
|
1 2 3 4 5 |
11gOCM-> cat/etc/oraInst.loc inventory_loc=/u01/app/oraInventory inst_group=oinstall 11gOCM-> |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
11gOCM->pwd /u01/app/11.2.0/grid/bin 11gOCM-> ll oraenv dbhome coraenv -rwxr-xr-x. 1 grid oinstall 5778 Jan -rwxr-xr-x. 1 grid oinstall 2415 Jan -rwxr-xr-x. 1 grid oinstall 6183 Jan 11gOCM-> ll/usr/local/bin/ total 232 -rwxr-xr-x. 1 grid root -rwxr-xr-x. 1 grid root -rwxr-xr-x. 1 grid root -rwxr-xr-x 11gOCM-> |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
11gOCM->cat/etc/oratab #Backup file is # # This file is used by ORACLE utilities. # and updated by either Database Configuration Assistant while creating # a database or ASM Configuration Assistant while creating ASM instance. # A colon, ‘:’, is used as the field
terminator. # the entry. # # Entries are of the form: # # # The first and second fields are the system identifier and home # directory of the database respectively. # to the dbstart utility that the database should , “Y”, or should not, # “N”, be brought up at system boot time. # # Multiple entries with the same $ORACLE_SID are not allowed. # # +ASM:/u01/app/11.2.0/grid:N
orcl:/u01/app/oracle/product/11.2.0/db_1:N 11gOCM-> |
|
1 2 3 4 5 6 7 8 9 |
11gOCM->cat/etc/init/oracle-ohasd.conf # Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. # # Oracle OHASD startup start on runlevel [35] stop respawn exec/etc/init.d/init.ohasd run >/dev/null2>&1 |
这是Oracle Enterprise Linux 6及以上版本的操作系统上的变化,在以前版本的操作系统下,由/etc/inittab文件来控制的条目均转移到/etc/init下单个文件来控制。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/7766893/viewspace-1115669/ ,如需转载,请注明出处,否则将追究法律责任。