2009年4月5日星期日

Installing Oracle Database 11g Release 1(single instanece asm) on CentOS 5

工作需要,需要练习一下ASM的用法,自己也想学习一下这个东东,所以就做了
主要参考:
http://www.oracle.com/technology/pub/articles/smiley-11gr1-install.html
http://www.oracle-base.com/articles/11g/OracleDB11gR1InstallationOnEnterpriseLinux4and5.php

安装os,配置参数不谈了,上面的文档已经写的很清楚了。
主要是记录一下asm的如何实现的

参考很多的文档都是在vmware上实现的(虚拟出多个disk),因为就一部办公用的PC,而且不想用那个vmware,出于效率考虑,在一个sata的盘上实现是这样的:

在安装os的时候,在创建分区的时候,将希望做成asm disk的地方,用lvm来作,比如
我的disk是143G
我的做法是 os的安装用20G左右, 剩下的空间分了5个lvm每个25G左右

其他的安装方法和以上参考一样;

在安装Oracle的时候,
第一步,我是安装了oracle software,具体内容参考链接
第二部,创建oracle asm
[root@localhost software]# rpm -Uvh oracleasm-support-2.1.3-1.el5.x86_64.rpm
Preparing... ########################################### [100%]
1:oracleasm-support ########################################### [100%]
[root@localhost software]# ls
oracleasm-2.6.18-92.el5-2.0.5-1.el5.x86_64.rpm
oracleasmlib-2.0.4-1.el5.x86_64.rpm
oracleasm-support-2.1.3-1.el5.x86_64.rpm
[root@localhost software]# rpm -Uvh oracleasm-2.6.18-92.el5-2.0.5-1.el5.x86_64.rpm
Preparing... ########################################### [100%]
1:oracleasm-2.6.18-92.el5########################################### [100%]
[root@localhost software]# rpm -Uvh oracleasmlib-2.0.4-1.el5.x86_64.rpm
Preparing... ########################################### [100%]
1:oracleasmlib ########################################### [100%]



[root@localhost 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 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 ]
[root@localhost init.d]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 24603200 3197508 20135756 14% /
tmpfs 1953324 0 1953324 0% /dev/shm
[root@localhost init.d]# ./oracleasm createdisk VOL1 /dev/sda2
Marking disk "VOL1" as an ASM disk: [ OK ]
[root@localhost init.d]# ./oracleasm createdisk VOL2 /dev/sda3
Marking disk "VOL2" as an ASM disk: [ OK ]
[root@localhost init.d]# ./oracleasm createdisk VOL3 /dev/sda5
Marking disk "VOL3" as an ASM disk: [ OK ]

我这里的lvm是 2,3,5,6,8
先挂3个目的是,为了以后联系添加、删除的练习做备用

第3步是 创建Automatic Storage Management (ASM)
具体参考http://www.oracle.com/technology/pub/articles/smiley-11gr1-install.html#asm

第4步就是创建 database了
这一步我使用的是dbca

创建成功。

下一步就是联系一下asm的操作了。每天进步点点!

没有评论:

发表评论