一、Oracle 11g安裝html
略linux
詳細過程請參考:sql
http://blog.sina.com.cn/s/blog_7c5a82970101excf.htmlshell
和10g不一樣,11g中若是要單機使用asm須要安裝grid frastructure組件
安裝軟件就在grid包中,安裝時選擇第二個選項就能進入這個組件的安裝數據庫
二、安裝Oracleasm軟件包vim
rpm -ivh oracleasm-support-2.1.7-1.el5.x86_64.rpm oracleasmlib-2.0.4-1.el5.x86_64.rpm oracleasm-2.6.18-164.el5-2.0.5-1.el5.x86_64.rpmbash
一共三個oracle
下載位置:app
http://www.oracle.com/technetwork/server-storage/linux/downloads/rhel5-084877.htmlide
三、配置oracleasm並安裝磁盤組
/etc/init.d/oracleasm configure
/etc/init.d/oracleasm createdisk V1 /dev/sdb1
/etc/init.d/oracleasm createdisk V2 /dev/sdc1
四、安裝Oracle Grid Infrastructure
(1) 配置grid用戶
vim /etc/security/limits.conf
------------------------------------------
#Oracle configure shell parameters
oracle soft nofile 65536
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
grid soft nofile 65536
grid hard nofile 65536
grid soft nproc 16384
grid hard nproc 16384
vim /home/grid/.bashrc
export ORACLE_HOME=/u01/app/11.2.0/grid
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_OWNER=oracle
export ORACLE_SID=+ASM
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LANG=en_US
alias sqlplus='rlwrap sqlplus'
alias lsnrctl='rlwrap lsnrctl'
alias asmcmd='rlwrap asmcmd'
(2) oracle和grid用戶分別要屬於相應的用戶組
useradd -g oinstall -G dba,oper,asmdba,asmadmin oracle
useradd -g oinstall -G dba,asmadmin,asmdba,asmoper grid
(3) 安裝軟件
./runInstaller
選擇Install and Configure Gride Infrastructure for a Standalone Server
(4)指定磁盤位置
/dev/oracleasm/disks
五、使用dbca建立基於ASM的實例
注意:
必定要讓oracle在oinstall和asmadmin組和asmdba中,不然在oracle用戶下建立數據庫會沒法識別oracleasm磁盤組
若是出現asmca needs oracle grid infrastructure to configure asm的錯誤。那通常是由於在單節點安裝grid出現的常見問題,一種方法是從新運行一次grid下面的runInstaller(不推薦)。
還有一種方法是安裝後執行一個Perl腳本/u01/app/grid/product/11.2.0/grid/perl/bin/perl -I /u01/app/grid/product/11.2.0/grid/perl/lib/ -I /u01/app/11.2.0/grid/crs/install /u01/app/11.2.0/grid/crs/install/roothas.pl
這樣就能夠了。