ASM單例項(Oracle 11.2.0.4)環境(二)
五.安裝grid
5.1 安裝依賴包yum -y install binutils-* compat-libstdc++-* gcc-* gcc-c++-* glibc-* glibc-devel libaio-* libaio-devel libgcc-4.1.2 libstdc++-* libstdc++-devel make sysstat elfutils-libelf-devel unixODBC-* unixODBC-devel-* elfutils-libelf-devel
pdksh包安裝
rpm –ivh rpm -ivh pdksh-5.2.14-30.x86_64.rpm5.2修改核心引數檔案
(如果是記憶體不一樣需要修改kernel.shmall,kernel.shmmax )
修改/etc/sysctl.conf
註釋掉之前引數
sed -i '/kernel\.shmmax/s/^/#/' /etc/sysctl.conf
sed -i '/kernel\.shmall/s/^/#/' /etc/sysctl.conf
編輯/etc/sysctl.conf
echo -e "#oracle insert\n">>/etc/sysctl.conf
echo "fs.aio-max-nr = 1048576">>/etc/sysctl.conf
echo "fs.file-max = 6815744">>/etc/sysctl.conf
echo "kernel.shmall = 4194304">>/etc/sysctl.conf
echo "kernel.shmmax = 15536870912">>/etc/sysctl.conf
echo "kernel.shmmni = 4096">>/etc/sysctl.conf
echo "kernel.sem = 250 32000 100 128">>/etc/sysctl.conf
echo "net.ipv4.ip_local_port_range = 9000 65500">>/etc/sysctl.conf
echo "net.core.rmem_default = 262144">>/etc/sysctl.conf
echo "net.core.rmem_max = 4194304">>/etc/sysctl.conf
echo "net.core.wmem_default = 262144">>/etc/sysctl.conf
echo "net.core.wmem_max = 1048586">>/etc/sysctl.conf
modprobe bridge
儲存配置
sysctl –p
修改/etc/security/limits.conf
echo "grid soft nofile 1024">>/etc/security/limits.conf
echo "grid hard nofile 65536">>/etc/security/limits.conf
echo "grid soft nproc 2047">>/etc/security/limits.conf
echo "grid hard nproc 16384">>/etc/security/limits.conf
echo "grid soft stack 10240">>/etc/security/limits.conf
echo "grid hard stack 32768">>/etc/security/limits.conf
echo "oracle soft nofile 1024">>/etc/security/limits.conf
echo "oracle hard nofile 65536">>/etc/security/limits.conf
echo "oracle soft nproc 2047">>/etc/security/limits.conf
echo "oracle hard nproc 16384">>/etc/security/limits.conf
echo "oracle soft stack 10240">>/etc/security/limits.conf
修改/etc/pam.d/login
echo "oracle hard stack 32768">>/etc/security/limits.confecho "session required pam_limits.so" >> /etc/pam.d/login
新建檔案 /etc/profile.d/oracle-grid.sh,新增以下內容
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -u 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
if [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -u 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi5.3 新增相應使用者及許可權
groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
groupadd -g 54324 asmadmin
groupadd -g 54325 asmdba
groupadd -g 54326 asmoper
useradd -u 54321 -g oinstall -G dba,oper,asmdba oracle
useradd -u 54322 -g oinstall -G asmadmin,asmdba,asmoper grid
usermod -a -G dba grid
mkdir -p /u01/app/grid
mkdir -p /u01/app/11.2.0/grid
chown -R grid:oinstall /u01
mkdir /u01/app/oracle
chown oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/5.4 修改grid及oracle 使用者環境變數
Oracle:
PATH=$PATH:$HOME/bin
export ORACLE_SID=netdata
export ORACLE_UNQNAME=netdata
export PS1="`/bin/hostname -s`-`whoami`-> "
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export NLS_DATE_FORMAT='yyyy-mm-dd hh24:mi:ss'
export PATH
grid:
PATH=$PATH:$HOME/bin
export ORACLE_SID=+ASM
export PS1="`/bin/hostname -s`-`whoami`-> "
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/11.2.0/grid
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib32
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export NLS_DATE_FORMAT='yyyy-mm-dd hh24:mi:ss'
export PATH
~5.5 關閉ntp服務及刪除ntp配置檔案
mv /etc/ntp.conf /etc/ntp.conf.bak
/etc/init.d/ntpd stop
chkconfig ntpd off5.6 安裝grid軟體
上傳grid 包到/tmp下
unzip p13390677_112040_Linux-x86-64_3of7.zip
cd grid
./Runinstall.sh
執行指令碼
/u01/app/oraInventory/orainstRoot.sh
/u01/app/11.2.0/grid/root.sh5.7 netca建立監聽5.8 執行相關指令碼
/u01/app/11.2.0/grid/crs/install/roothas.pl5.9 Asmca建立磁碟組
如果找到裝置修改disk_strings
/dev/asm-*
六 安裝oracle軟體及建庫
6.1安裝oracle軟體上傳軟體至/tmp下
解壓
unzip p13390677_112040_Linux-x86-64_1of7.zip
unzip p13390677_112040_Linux-x86-64_2of7.zip
安裝軟體選擇僅安裝軟體
Cd database
./runinstall.sh
執行指令碼
/u01/app/oracle/product/11.2.0/db_1/root.sh6.2 DBCA建庫
設定SGA ,PGA,Process,歸檔路徑,Redofile路徑及大小,字符集,dbfile路徑等相關引數6.3 新增相關服務
新增監聽 srvctl管理
srvctl add listener
srvctl add asm -l LISTENER
啟動
crsctl start resource ora.LISTENER.lsnr
修改資料庫自啟
crsctl modify resource "ora.netdata.db" -attr "AUTO_START=1"
啟動所有服務
ASM1-137-7-grid-> crs_start -all
CRS-2501: Resource 'ora.ons' is disabled
Attempting to start `ora.evmd` on member `asm1-137-7`
Attempting to start `ora.LISTENER.lsnr` on member `asm1-137-7`
Attempting to start `ora.cssd` on member `asm1-137-7`
Attempting to start `ora.diskmon` on member `asm1-137-7`
Start of `ora.diskmon` on member `asm1-137-7` succeeded.
Start of `ora.evmd` on member `asm1-137-7` succeeded.
Start of `ora.LISTENER.lsnr` on member `asm1-137-7` succeeded.
Start of `ora.cssd` on member `asm1-137-7` succeeded.
Attempting to start `ora.asm` on member `asm1-137-7`
Start of `ora.asm` on member `asm1-137-7` succeeded.
Attempting to start `ora.DATA1.dg` on member `asm1-137-7`
Start of `ora.DATA1.dg` on member `asm1-137-7` succeeded.
Attempting to start `ora.netdata.db` on member `asm1-137-7`
Start of `ora.netdata.db` on member `asm1-137-7` succeeded.
CRS-2660: Resource 'ora.ons' or all of its instances are disabled
檢視狀態
ASM1-137-7-grid-> crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.DATA1.dg ora....up.type ONLINE ONLINE asm1-137-7
ora....ER.lsnr ora....er.type ONLINE ONLINE asm1-137-7
ora.asm ora.asm.type ONLINE ONLINE asm1-137-7
ora.cssd ora.cssd.type ONLINE ONLINE asm1-137-7
ora.diskmon ora....on.type OFFLINE OFFLINE
ora.evmd ora.evm.type ONLINE ONLINE asm1-137-7
ora.netdata.db ora....se.type ONLINE ONLINE asm1-137-7
ora.ons ora.ons.type OFFLINE OFFLINE
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24486203/viewspace-2142209/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ASM單例項(Oracle 11.2.0.4)環境(一)ASM單例Oracle
- 單機環境配置ASM例項ASM
- 單機環境安裝配置ASM例項ASM
- (轉)Oracle rac環境下清除asm例項OracleASM
- Windows平臺模擬單例項ASM環境Windows單例ASM
- 單例項環境下Oracle 11.2.0.3升級到11.2.0.4的過程單例Oracle
- 【ASM學習】在windows 環境下建立ASM例項ASMWindows
- Rman 單例項filesystem(Windows)恢復到ASM環境(Linux)單例WindowsASMLinux
- 單例項刪除ASM例項單例ASM
- Oracle單例項+ASM新增控制檔案Oracle單例ASM
- rac環境 asmcmd用法;首先設定oracle_home oracle_sid(asm例項)ASMOracle
- Oracle 11.2.0.4 rac for aix acfs異常環境的克隆環境ASM磁碟組掛載緩慢OracleAIASM
- Hibernate(二):Hibernate搭建開發環境+簡單例項開發環境單例
- 11.2.0.4單例項ASM安裝報錯ohasd failed to ... line 73.單例ASMAI
- 11.2環境ASM例項spfile放在ASM磁碟組的訪問方式ASM
- oracle11g asm單例項重建hasOracleASM單例
- Oracle單例項+ASM啟動與關閉Oracle單例ASM
- ORACLE-LINUX環境字元介面單例項安裝OracleLinux字元單例
- 刪除Linux非rac環境下的ASM例項LinuxASM
- 單例項環境利用備份恢復RAC資料庫(二)單例資料庫
- 單機搭建ASM環境ASM
- redhat 6.5之oracle 11.2.0.4 asm例項異常抽取asm配置資訊之amdu初識之一RedhatOracleASM
- oracle 收集asm例項資訊OracleASM
- 刪除Linux非rac環境下的ASM例項(轉)LinuxASM
- 10g rac asm 恢復到 單例項(二)ASM單例
- 利用STANDBY將單例項資料庫升級為RAC環境(二)單例資料庫
- RAC+DG(asm單例項)ASM單例
- 單例項的duplicate(non ASM)單例ASM
- Window下安裝Oracle ASM單例項資料庫OracleASM單例資料庫
- Oracle 10gR2 下配置簡單ASM例項Oracle 10gASM
- Oracle 11.2.0.4 從單例項,使用RMAN 異機恢復到RACOracle單例
- Oracle 11.2.0.3 管理ASM例項OracleASM
- Oracle 11.2.0.3管理ASM例項OracleASM
- Oracle RAC 高可用性體系結構與叢集 單例項環境與 Oracle RAC 環境對比Oracle單例
- DBA強化實戰系列第一期:centos6.4安裝oracle11.2.0.4單例項asmCentOSOracle單例ASM
- 在HACMP環境下裝單例項9IACM單例
- RAC環境只啟動單例項資料庫單例資料庫
- 單節點執行ASM例項ASM