可參見oracle 官方安裝文檔:
http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/11g/r2/prod/install/gridinstss/gridinstss.htm#t2s1
圖檔太多了,就沒有上傳,下次整理再補....
ORACLE 11g GRID安裝
1. ASM磁盤建立.. 2
1.1. oracleasmlib 和 安裝ASM包(root身份)2
1.2. 配置oracleasm(root身份)2
1.3. 準備磁盤裝置.. 3
1.3.1. 給虛拟機增加硬碟.. 3
1.3.2. 進入作業系統 fdisk 格式化硬碟(root身份)4
1.4. 建立asm磁盤卷裝置(root身份)6
1.4.1. 異常錯誤處理.. 6
1.5. 準備grid安裝軟體.. 7
1.6. 安裝grid. 7
1.7. 安裝grid. 21
1. ASM磁盤建立
1.1. oracleasmlib 和 安裝ASM包(root身份)
此相關軟體包下載下傳位址:
http://www.oracle.com/technetwork/server-storage/linux/downloads/rhel5-084877.html#oracleasm_rhel5_x86
注意,請順序安裝,如果中間卻少相關系統包,請找到相關包進行安裝;
rpm -vhi oracleasm-support-2.1.7-1.el5.i386.rpm
rpm -ivh oracleasm-2.6.18-194.el5-2.0.5-1.el5.i686.rpm
rpm -vhi oracleasmlib-2.0.4-1.el5.i386.rpm
rpm -vhi oracleasm-2.6.18-194.el5debug-2.0.5-1.el5.i686.rpm
rpm -vhi oracleasm-2.6.18-194.el5-debuginfo-2.0.5-1.el5.i686.rpm
rpm -vhi oracleasm-2.6.18-194.el5PAE-2.0.5-1.el5.i686.rpm
rpm -vhi oracleasm-2.6.18-194.el5xen-2.0.5-1.el5.i686.rpm
在我們的實驗裡,我需要如下系統包:
kernel-debug-2.6.18-194.el5.i686.rpm
kernel-PAE-2.6.18-194.el5.i686.rpm
kernel-xen-2.6.18-194.el5.i686.rpm
1.2. 配置oracleasm(root身份)
[[email protected] oracle]# /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
Scan for 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 ]
[[email protected] oracle]#
1.3. 準備磁盤裝置
1.3.1. 給虛拟機增加硬碟
一路點 next 直到建立盤成功;
1.3.2. 進入作業系統 fdisk 格式化硬碟(root身份)
[[email protected] oracle]# fdisk -l
Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 2610 20860402+ 8e Linux LVM
Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table
[[email protected] oracle]#
[[email protected] oracle]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
The number of cylinders for this disk is set to 1044.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1044, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1044, default 1044): +5000m
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (610-1044, default 610):
Using default value 610
Last cylinder or +size or +sizeM or +sizeK (610-1044, default 1044):
Using default value 1044
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[[email protected] oracle]#
[[email protected] oracle]# fdisk -l
Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 2610 20860402+ 8e Linux LVM
Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 609 4891761 83 Linux
/dev/sdb2 610 1044 3494137+ 83 Linux
[[email protected] oracle]#
1.4. 建立asm磁盤卷裝置(root身份)
[[email protected] oracle]#
[[email protected] oracle]# /etc/init.d/oracleasm createdisk vol1 /dev/sdb1
Marking disk "vol1" as an ASM disk: [ OK ]
[[email protected] oracle]# /etc/init.d/oracleasm createdisk vol2 /dev/sdb2
Marking disk "vol2" as an ASM disk: [ OK ]
[[email protected] oracle]#
[[email protected] oracle]# /etc/init.d/oracleasm listdisks
VOL1
VOL2
1.4.1. 異常錯誤處理
如果出出現錯誤:Marking disk "VOL1" as an ASM disk: [FAILED]
檢視日志
[[email protected]_catalog disks]# less /var/log/oracleasm
1.如果是如下錯誤資訊:
Disk "VOL1" does not exist or is not instantiated
Writing disk header: done
Instantiating disk: oracleasm-instantiate-disk: Unable to open manager: No such file or directory
failed
Clearing disk header: done
此表示沒有啟用 oracleasm 需要執行:
[[email protected]_catalog ~]# /etc/init.d/oracleasm enable
2.如果是如下錯誤資訊:
Device "/dev/sdc1" is already labeled for ASM disk "VOL1"
解決的兩種方法:
1). 删除已存在的asm盤
/etc/init.d/oracleasm deletedisk VOL1
2). 更名增加asm盤
/etc/init.d/oracleasm createdisk volX /dev/sdb1
1.5. 準備grid安裝軟體
[[email protected] ~]$ cd /oracle_soft/
[[email protected] oracle_soft]$ ls
database p10404530_112030_LINUX_3of7.zip
[[email protected] oracle_soft]$ unzip p10404530_112030_LINUX_3of7.zip
[[email protected] oracle_soft]$ ls
database grid p10404530_112030_LINUX_3of7.zip
[[email protected] oracle_soft]$
[oracl[email protected] oracle_soft]$
[[email protected] oracle_soft]$ rm -rf p10404530_112030_LINUX_3of7.zip
[[email protected] oracle_soft]$
[[email protected] oracle_soft]$ ls
database grid
1.6. 建立資料庫
請見相關章節
有個奇怪現象,我沒有配置系統啟動asm執行個體與oracle執行個體,怎麼一啟作業系統就随系統啟動了...