1.安装Oracle,不建数据库
2.下载oracleasm-support、oracleasm、oracleasmlib
http://www.oracle.com/technology/software/tech/linux/asmlib/rhel4.html
安装这三个包 rpm -UVH 包名
3.准备四个磁盘
sdb1,sdc1,sdd1,sde1
4.准备配置ASM:
root下运行
/etc/init.d/oracleasm configure
手动加载asmlib driver
/etc/init.d/oracleasm enable
建ASM磁盘
/etc/init.d/oracleasm VOL1 /dev/sdb1
/etc/init.d/oracleasm VOL2 /dev/sdc1
/etc/init.d/oracleasm VOL3 /dev/sdd1
/etc/init.d/oracleasm VOL4 /dev/sde1
/etc/init.d/oracleasm listdisks
5.建ASM实例
建初始文件
cd $ORACLE_HOME/dbs
vi init+ASM.ora
建密码文件
orapwd file=orapwd+ASM password= dba
建目录结构
mkdir -p $ORACLE_BASE/admin/+ASM/udump
mkdir -p $ORACLE_BASE/admin/+ASM/bdump
mkdir -p $ORACLE_BASE/admin/+ASM/cdump
启动实例
export ORACLE_SID=+ASM
sqlplus / as sysdba
startup
建spfile
create spfile from pfile
建diskgroup
create diskgroup dgroup1 normal redundancy
failgroup fgroup1 disk 'orcl:VOL1','orcl:VOL2'
failgroup fgroup2 disk 'orcl:VOL3','orcl:VOL4';
查看
select name,state from v$asm_diskgroup;
show parameter asm_diskgroups
6.建ASM数据库
运行dbca
sid为asmdemo
磁盘组选择dgroup1
7.启动ASM数据库
export ORACLE_SID=+ASM
sqlplus / as sysdba
startup
exit
export ORACLE_SID=asmdemo
sqlplus / as sysdba
startup
exit
8.关闭
export ORACLE_SID=asmdemo
sqlplus / as sysdba
shutdown immediate
exit
最好换个session
export ORACLE_SID=+ASM
sqlplus / as sysdba
shutdown immediate
exit
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/658698/viewspace-254567/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/658698/viewspace-254567/