跳轉到內容

RAC 攻擊 - Oracle 叢集資料庫在家/設定 ASMLIB

來自華夏公益教科書,開放書籍,開放世界


  1. 以 oracle 使用者身份登入到 collabn1 並開啟終端。切換到 root 使用者。
  2. 在兩個節點上安裝 ASMLib 並初始化磁碟。如果您已從之前的步驟中掛載了 cdrom,mount 命令可能會失敗(mount: /dev/cdrom-hda already mounted or /mnt/cdrom busy)。[root@collabn1 ~]# cd /mnt [root@collabn1 mnt]# mount /mnt/cdrom mount: block device /dev/cdrom-hda is write-protected, mounting read-only [root@collabn1 mnt]# mount /mnt/cdrom5 mount: block device /dev/cdrom-hdb is write-protected, mounting read-only # OracleASM rpm -Uvh */*/oracleasm-support* rpm -Uvh */*/oracleasm*el5-2* # (注意 - 這是小寫 EL5-2。) # 安裝介質中缺少;複製到 RAC 攻擊 DVD。 rpm -Uvh */oracleasmlib* [root@collabn1 mnt]# /etc/init.d/oracleasm configure 配置 Oracle ASM 庫驅動程式。這將配置 Oracle ASM 庫驅動程式的啟動時屬性。以下問題將確定驅動程式是否在啟動時載入以及它將具有哪些許可權。當前值將顯示在括號 ('[]') 中。按 <ENTER> 而不鍵入答案將保留該當前值。Ctrl-C 將中止。擁有驅動程式介面的預設使用者 []: oracle 擁有驅動程式介面的預設組 []: dba 在啟動時啟動 Oracle ASM 庫驅動程式 (y/n) [n]: y 在啟動時修復 Oracle ASM 磁碟的許可權 (y/n) [y]: y 正在寫入 Oracle ASM 庫驅動程式配置: 完成 正在初始化 Oracle ASMLib 驅動程式: [ 確定 ] 正在掃描系統以查詢 Oracle ASMLib 磁碟: [ 確定 ]
    [root@collabn1 ~]# /etc/init.d/oracleasm createdisk data /dev/sdb1
    Marking disk "data" as an ASM disk:                        [  OK  ]
    [root@collabn1 ~]# /etc/init.d/oracleasm createdisk backup /dev/sdc1
    Marking disk "backup" as an ASM disk:                      [  OK  ]
    [root@collabn1 ~]# /etc/init.d/oracleasm listdisks
    BACKUP
    DATA
    
    

    現在在第二臺虛擬機器上重複一些步驟

    [root@collabn1 ~]# ssh collabn2
     
    [root@collabn2 ~]# cd /mnt
     
    # OracleASM
    rpm -Uvh */*/oracleasm-support*
    rpm -Uvh */*/oracleasm*el5-2*
    # Missing from the install media; copied to RAC Attack DVD.
    rpm -Uvh */oracleasmlib*
     
    [root@collabn2 ~]# /etc/init.d/oracleasm configure
    Configuring the Oracle ASM library driver.
     
    This will configure the on-boot properties of the Oracle ASM library
    driver.  The following questions will determine whether the driver is
    loaded on boot and what permissions it will have.  The current values
    will be shown in brackets ('[]').  Hitting <ENTER> without typing an
    answer will keep that current value.  Ctrl-C will abort.
     
    Default user to own the driver interface []: oracle
    Default group to own the driver interface []: dba
    Start Oracle ASM library driver on boot (y/n) [n]: y
    Fix permissions of Oracle ASM disks on boot (y/n) [y]: y
    Writing Oracle ASM library driver configuration: done
    Initializing the Oracle ASMLib driver:                     [  OK  ]
    Scanning the system for Oracle ASMLib disks:               [  OK  ]
     
    [root@collabn2 ~]# /etc/init.d/oracleasm listdisks
    BACKUP
    DATA
    



華夏公益教科書