天天看點

oracle11g 建立ASM執行個體

        oracle11g的ASM建立放在grid裡面了,是以要先安裝grid.

        一:初始化環境  

Last login: Thu May 22 11:26:13 2014
[[email protected] ~]# groupadd -g 500 oinstall
[[email protected] ~]# 
[[email protected] ~]# groupadd -g 501 dba
[[email protected] ~]# 
[[email protected] ~]# groupadd -g 502 oper
[[email protected] ~]# 
[[email protected] ~]# groupadd -g 600 asmadmin
[[email protected] ~]# 
[[email protected] ~]# groupadd -g 601 asmoper
[[email protected] ~]# 
[[email protected] ~]# groupadd -g 602 asmdba
[[email protected] ~]# 
[[email protected] ~]# useradd -g oinstall -G dba,asmdba,oper oracle
[[email protected] ~]# 
[[email protected] ~]# useradd -g oinstall -G asmadmin,asmdba,asmoper,dba grid
[[email protected] ~]# 
[[email protected] ~]# mkdir -p /u01/app/oracle/product/grid
[[email protected] ~]# 
[[email protected] ~]# mkdir -p /u01/app/oracle/product/db_1
[[email protected] ~]# 
[[email protected] ~]# chown -R grid:oinstall /u01
[[email protected] ~]# 
[[email protected] ~]# chown -R oracle:oinstall /u01/app/oracle/product/db_1
[[email protected] ~]# 
[[email protected] ~]# chmod -R 775 /u01
[[email protected] ~]# 
[[email protected] ~]# passwd oracle
Changing password for user oracle.
New UNIX password: 
BAD PASSWORD: it is too simplistic/systematic
Retype new UNIX password: 
passwd: all authentication tokens updated successfully.
[[email protected] ~]# 
[[email protected] ~]# 
[[email protected] ~]# passwd grid
Changing password for user grid.
New UNIX password: 
BAD PASSWORD: it is too simplistic/systematic
Retype new UNIX password: 
passwd: all authentication tokens updated successfully.
[[email protected] ~]# 
           

       二:編輯使用者環境

配置 grid 使用者環境變量:
[[email protected] /]# vi /home/grid/.bash_profile
export ORACLE_SID=+ASM
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/grid
export ORACLE_TERM=xterm
export TMP=/tmp
export TMPDIR=$TMP
PATH=$PATH:$HOME/bin
export PATH=/usr/sbin:$PATH:$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
[[email protected] /]# source /home/grid/.bash_profile
配置oracle 使用者環境變量:
[[email protected] /]# vi /home/oracle/.bash_profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_SID=ora11g
export ORACLE_OWNER=oracle
export ORACLE_TERM=vt100
export PATH=$PATH:$ORACLE_HOME/bin:$HOME/bin
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export CLASSPATH
[[email protected] /]#source /home/oracle/.bash_profile
           

       除了這個以外還要修改limits.conf     /etc/pam.d/login   /etc/profile    /etc/sysctl.conf 等系統相關檔案這裡不再列出。

三:配置raw裝置

     可參靠我之前寫的:http://blog.csdn.net/suyishuai/article/details/26344107

     配置好以後,驗證

[[email protected] dev]# 
[[email protected] dev]# ls -al asm-disk*
brw-rw---- 1 grid oinstall 8, 17 May 22 17:24 asm-disk1
brw-rw---- 1 grid oinstall 8, 33 May 22 17:24 asm-disk2
brw-rw---- 1 grid oinstall 8, 49 May 22 17:04 asm-disk3
[[email protected] dev]# 
[[email protected] dev]# 
           

四:用grid使用者運作安裝包,界面如下

oracle11g 建立ASM執行個體
oracle11g 建立ASM執行個體
oracle11g 建立ASM執行個體
oracle11g 建立ASM執行個體
oracle11g 建立ASM執行個體

如果這個時候,你選擇路徑後,不出來,檢查raw的宿主。如下圖

oracle11g 建立ASM執行個體

繼續

oracle11g 建立ASM執行個體
oracle11g 建立ASM執行個體
oracle11g 建立ASM執行個體
oracle11g 建立ASM執行個體

提示少rpm包。這個比10G太先進了。。。自己找包安裝吧

oracle11g 建立ASM執行個體
oracle11g 建立ASM執行個體
oracle11g 建立ASM執行個體

五:安裝成功驗證

[[email protected] dev]# su - grid
[[email protected] ~]$ 
[[email protected] ~]$ 
[[email protected] ~]$ 
[[email protected] ~]$ srvctl status asm
ASM is running on shu3
[[email protected] ~]$ 
[[email protected] ~]$ srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s): shu3
[[email protected] ~]$ 
[[email protected] ~]$ asmca --出現下面界面
           
oracle11g 建立ASM執行個體

 在11.2.0.4這個版本裡面,ASM是開機啟動的。

繼續閱讀