跳转到内容

RAC 攻击 - Oracle 集群数据库在家/安装网格基础架构 (ASM)

来自维基教科书,开放世界中的开放书籍


  1. 作为 oracle 用户,启动网格安装程序。在第一个屏幕上,选择 安装和配置集群的网格基础架构,然后单击 下一步。[oracle@collabn1 ~]$ /mnt/cdrom*/grid/runInstaller


  2. 选择 高级安装,然后单击 下一步
  3. 接受默认语言(英语)并选择 下一步
  4. 将集群命名为 collab,并确保 SCAN 名称是 collab-scan,端口为 1521,然后单击 下一步
  5. 添加节点 collabn2,VIP 为 collabn2-vip,然后选择 下一步 以验证集群配置。
  6. 验证子网 192.168.78.0 上的 eth0 是 PUBLIC,子网 172.16.100.0 上的 eth1 是 PRIVATE,然后单击 下一步
  7. 选择将集群软件文件存储在 ASM 中,然后选择 下一步
  8. 创建一个名为 DATA 的磁盘组,使用外部冗余,仅使用磁盘 ORCL:DATA,然后单击 下一步
  9. 选择对所有帐户使用相同的密码,并输入密码 racattack,然后单击 下一步。(忽略 Oracle 不喜欢此密码的消息。)
  10. 不要使用 IPMI。单击 下一步
  11. 将 OSDBA 组设置为 asmdba,将 OSOPER 组设置为 asmoper,将 OSASM 组设置为 asmadmin。然后单击 下一步
  12. 接受 /u01/app/oracle 的 ORACLE_BASE 位置,并使用 /u01/grid/oracle/product/11.2.0/grid_1 的 ORACLE_HOME 位置。然后单击 下一步
  13. 接受 /u01/app/oraInventory 的默认清单位置,然后选择 下一步
  14. 先决条件检查将执行。将发出警告,表明三个检查失败:物理内存、交换空间和网络时间协议。单击 复选框 以忽略所有,然后单击 下一步
  15. 在 oracle 用户的主目录中 保存 一个名为 grid.rsp 的响应文件。然后单击 完成 以安装网格基础架构。


  16. 出现提示时,以 root 用户身份打开一个终端并运行两个 root.sh 脚本。确保在 两个节点 上运行 两个脚本
    [oracle@collabn1 ~]$ su -
    Password: racattack
    
    [root@collabn1 ~]# /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@collabn1 ~]# /u01/grid/oracle/product/11.2.0/grid_1/root.sh
    Running Oracle 11g root.sh script...
    
    The following environment variables are set as:
        ORACLE_OWNER= oracle
        ORACLE_HOME=  /u01/grid/oracle/product/11.2.0/grid_1
    
    Enter the full pathname of the local bin directory: [/usr/local/bin]: /usr/bin
       Copying dbhome to /usr/bin ...
       Copying oraenv to /usr/bin ...
       Copying coraenv to /usr/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.sh script.
    Now product-specific root actions will be performed.
    2011-03-30 16:49:13: Parsing the host name
    2011-03-30 16:49:13: Checking for super user privileges
    2011-03-30 16:49:13: User has super user privileges
    Using configuration parameter file: /u01/grid/oracle/product/11.2.0/grid_1/crs/install/crsconfig_params
    Creating trace directory
    LOCAL ADD MODE
    Creating OCR keys for user 'root', privgrp 'root'..
    Operation successful.
      root wallet
      root wallet cert
      root cert export
      peer wallet
      profile reader wallet
      pa wallet
      peer wallet keys
      pa wallet keys
      peer cert request
      pa cert request
      peer cert
      pa cert
      peer root cert TP
      profile reader root cert TP
      pa root cert TP
      peer pa cert TP
      pa peer cert TP
      profile reader pa cert TP
      profile reader peer cert TP
      peer user cert
      pa user cert
    Adding daemon to inittab
    CRS-4123: Oracle High Availability Services has been started.
    ohasd is starting
    CRS-2672: Attempting to start 'ora.gipcd' on 'collabn1'
    CRS-2672: Attempting to start 'ora.mdnsd' on 'collabn1'
    CRS-2676: Start of 'ora.mdnsd' on 'collabn1' succeeded
    CRS-2676: Start of 'ora.gipcd' on 'collabn1' succeeded
    CRS-2672: Attempting to start 'ora.gpnpd' on 'collabn1'
    CRS-2676: Start of 'ora.gpnpd' on 'collabn1' succeeded
    CRS-2672: Attempting to start 'ora.cssdmonitor' on 'collabn1'
    CRS-2676: Start of 'ora.cssdmonitor' on 'collabn1' succeeded
    CRS-2672: Attempting to start 'ora.cssd' on 'collabn1'
    CRS-2672: Attempting to start 'ora.diskmon' on 'collabn1'
    CRS-2676: Start of 'ora.diskmon' on 'collabn1' succeeded
    CRS-2676: Start of 'ora.cssd' on 'collabn1' succeeded
    CRS-2672: Attempting to start 'ora.ctssd' on 'collabn1'
    CRS-2676: Start of 'ora.ctssd' on 'collabn1' succeeded
    
    ASM created and started successfully.
    
    DiskGroup DATA created successfully.
    
    clscfg: -install mode specified
    Successfully accumulated necessary OCR keys.
    Creating OCR keys for user 'root', privgrp 'root'..
    Operation successful.
    CRS-2672: Attempting to start 'ora.crsd' on 'collabn1'
    CRS-2676: Start of 'ora.crsd' on 'collabn1' succeeded
    CRS-4256: Updating the profile
    Successful addition of voting disk 6b7c5142d3214fe9bf4d4273f0ff11fd.
    Successfully replaced voting disk group with +DATA.
    CRS-4256: Updating the profile
    CRS-4266: Voting file(s) successfully replaced
    ##  STATE    File Universal Id                File Name Disk group
    --  -----    -----------------                --------- ---------
     1. ONLINE   6b7c5142d3214fe9bf4d4273f0ff11fd (ORCL:DATA) [DATA]
    Located 1 voting disk(s).
    CRS-2673: Attempting to stop 'ora.crsd' on 'collabn1'
    CRS-2677: Stop of 'ora.crsd' on 'collabn1' succeeded
    CRS-2673: Attempting to stop 'ora.asm' on 'collabn1'
    CRS-2677: Stop of 'ora.asm' on 'collabn1' succeeded
    CRS-2673: Attempting to stop 'ora.ctssd' on 'collabn1'
    CRS-2677: Stop of 'ora.ctssd' on 'collabn1' succeeded
    CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'collabn1'
    CRS-2677: Stop of 'ora.cssdmonitor' on 'collabn1' succeeded
    CRS-2673: Attempting to stop 'ora.cssd' on 'collabn1'
    CRS-2677: Stop of 'ora.cssd' on 'collabn1' succeeded
    CRS-2673: Attempting to stop 'ora.gpnpd' on 'collabn1'
    CRS-2677: Stop of 'ora.gpnpd' on 'collabn1' succeeded
    CRS-2673: Attempting to stop 'ora.gipcd' on 'collabn1'
    CRS-2677: Stop of 'ora.gipcd' on 'collabn1' succeeded
    CRS-2673: Attempting to stop 'ora.mdnsd' on 'collabn1'
    CRS-2677: Stop of 'ora.mdnsd' on 'collabn1' succeeded
    CRS-2672: Attempting to start 'ora.mdnsd' on 'collabn1'
    CRS-2676: Start of 'ora.mdnsd' on 'collabn1' succeeded
    CRS-2672: Attempting to start 'ora.gipcd' on 'collabn1'
    CRS-2676: Start of 'ora.gipcd' on 'collabn1' succeeded
    CRS-2672: Attempting to start 'ora.gpnpd' on 'collabn1'
    CRS-2676: Start of 'ora.gpnpd' on 'collabn1' succeeded
    CRS-2672: Attempting to start 'ora.cssdmonitor' on 'collabn1'
    CRS-2676: Start of 'ora.cssdmonitor' on 'collabn1' succeeded
    CRS-2672: Attempting to start 'ora.cssd' on 'collabn1'
    CRS-2672: Attempting to start 'ora.diskmon' on 'collabn1'
    CRS-2676: Start of 'ora.diskmon' on 'collabn1' succeeded
    CRS-2676: Start of 'ora.cssd' on 'collabn1' succeeded
    CRS-2672: Attempting to start 'ora.ctssd' on 'collabn1'
    CRS-2676: Start of 'ora.ctssd' on 'collabn1' succeeded
    CRS-2672: Attempting to start 'ora.asm' on 'collabn1'
    CRS-2676: Start of 'ora.asm' on 'collabn1' succeeded
    CRS-2672: Attempting to start 'ora.crsd' on 'collabn1'
    CRS-2676: Start of 'ora.crsd' on 'collabn1' succeeded
    CRS-2672: Attempting to start 'ora.evmd' on 'collabn1'
    CRS-2676: Start of 'ora.evmd' on 'collabn1' succeeded
    CRS-2672: Attempting to start 'ora.asm' on 'collabn1'
    CRS-2676: Start of 'ora.asm' on 'collabn1' succeeded
    CRS-2672: Attempting to start 'ora.DATA.dg' on 'collabn1'
    CRS-2676: Start of 'ora.DATA.dg' on 'collabn1' succeeded
    CRS-2672: Attempting to start 'ora.registry.acfs' on 'collabn1'
    CRS-2676: Start of 'ora.registry.acfs' on 'collabn1' succeeded
    
    collabn1     2011/03/30 16:59:35     /u01/grid/oracle/product/11.2.0/grid_1/cdata/collabn1/backup_20110330_165935.olr
    Preparing packages for installation...
    cvuqdisk-1.0.7-1
    Configure Oracle Grid Infrastructure for a Cluster ... succeeded
    Updating inventory properties for clusterware
    Starting Oracle Universal Installer...
    
    Checking swap space: must be greater than 500 MB.   Actual 968 MB    Passed
    The inventory pointer is located at /etc/oraInst.loc
    The inventory is located at /u01/app/oraInventory
    'UpdateNodeList' was successful.
    
  17. [root@collabn1 ~]# vmstat 3 4
    procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
     r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
     0  0 660156  11868   6472 263348   33  229  1505  2740 1194 2407  8 22 44 27  0
     2  0 660156  11884   6472 263364    0    0     1     3  712 3635  2  4 90  4  0
     1  0 660156  11884   6480 263368    0    0     0    34  701 3565  1  3 90  6  0
     4  0 660156  11884   6480 263372    0    0     1     5  721 3642  2  8 88  2  0
    
    [root@collabn1 ~]# ssh collabn2
    root@collabn2's password: racattack
    -bash: oraenv: No such file or directory
    [root@collabn2 ~]# /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@collabn2 ~]# /u01/grid/oracle/product/11.2.0/grid_1/root.sh
    Running Oracle 11g root.sh script...
    
    The following environment variables are set as:
        ORACLE_OWNER= oracle
        ORACLE_HOME=  /u01/grid/oracle/product/11.2.0/grid_1
    
    Enter the full pathname of the local bin directory: [/usr/local/bin]: /usr/bin
       Copying dbhome to /usr/bin ...
       Copying oraenv to /usr/bin ...
       Copying coraenv to /usr/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.sh script.
    Now product-specific root actions will be performed.
    2011-03-30 17:04:26: Parsing the host name
    2011-03-30 17:04:26: Checking for super user privileges
    2011-03-30 17:04:26: User has super user privileges
    Using configuration parameter file: /u01/grid/oracle/product/11.2.0/grid_1/crs/install/crsconfig_params
    Creating trace directory
    LOCAL ADD MODE
    Creating OCR keys for user 'root', privgrp 'root'..
    Operation successful.
    Adding daemon to inittab
    CRS-4123: Oracle High Availability Services has been started.
    ohasd is starting
    CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node collabn1, number 1, and is terminating
    An active cluster was found during exclusive startup, restarting to join the cluster
    CRS-2672: Attempting to start 'ora.mdnsd' on 'collabn2'
    CRS-2676: Start of 'ora.mdnsd' on 'collabn2' succeeded
    CRS-2672: Attempting to start 'ora.gipcd' on 'collabn2'
    CRS-2676: Start of 'ora.gipcd' on 'collabn2' succeeded
    CRS-2672: Attempting to start 'ora.gpnpd' on 'collabn2'
    CRS-2676: Start of 'ora.gpnpd' on 'collabn2' succeeded
    CRS-2672: Attempting to start 'ora.cssdmonitor' on 'collabn2'
    CRS-2676: Start of 'ora.cssdmonitor' on 'collabn2' succeeded
    CRS-2672: Attempting to start 'ora.cssd' on 'collabn2'
    CRS-2672: Attempting to start 'ora.diskmon' on 'collabn2'
    CRS-2676: Start of 'ora.diskmon' on 'collabn2' succeeded
    CRS-2676: Start of 'ora.cssd' on 'collabn2' succeeded
    CRS-2672: Attempting to start 'ora.ctssd' on 'collabn2'
    CRS-2676: Start of 'ora.ctssd' on 'collabn2' succeeded
    CRS-2672: Attempting to start 'ora.drivers.acfs' on 'collabn2'
    CRS-2676: Start of 'ora.drivers.acfs' on 'collabn2' succeeded
    CRS-2672: Attempting to start 'ora.asm' on 'collabn2'
    CRS-2676: Start of 'ora.asm' on 'collabn2' succeeded
    CRS-2672: Attempting to start 'ora.crsd' on 'collabn2'
    CRS-2676: Start of 'ora.crsd' on 'collabn2' succeeded
    CRS-2672: Attempting to start 'ora.evmd' on 'collabn2'
    CRS-2676: Start of 'ora.evmd' on 'collabn2' succeeded
    
    collabn2     2011/03/30 17:12:32     /u01/grid/oracle/product/11.2.0/grid_1/cdata/collabn2/backup_20110330_171232.olr
    Preparing packages for installation...
    cvuqdisk-1.0.7-1
    Configure Oracle Grid Infrastructure for a Cluster ... succeeded
    Updating inventory properties for clusterware
    Starting Oracle Universal Installer...
    
    Checking swap space: must be greater than 500 MB.   Actual 1205 MB    Passed
    The inventory pointer is located at /etc/oraInst.loc
    The inventory is located at /u01/app/oraInventory
    'UpdateNodeList' was successful.
    
    


  18. 运行完两个脚本后,返回安装程序窗口,然后单击 确定 以继续运行配置助手。
  19. 集群验证实用程序将失败,因为 NTP 未运行。如果需要,请检查日志文件末尾的错误消息。然后单击 确定 关闭消息框,然后单击 下一步 以继续。
  20. 您现在应该看到最终屏幕!单击 关闭 退出安装程序。



华夏公益教科书