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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 11.2.0.4單例項ASM安裝報錯ohasd failed to ... line 73.單例ASMAI
- Oracle 11.2.0.4 rac for aix acfs異常環境的克隆環境ASM磁碟組掛載緩慢OracleAIASM
- ORACLE-LINUX環境字元介面單例項安裝OracleLinux字元單例
- 【Oracle】ASM例項安裝入門OracleASM
- RAC+DG(asm單例項)ASM單例
- 記錄一次Oracle 11.2.0.4 RAC異地恢復到單例項Oracle單例
- 【ASK_ORACLE】Relink ASM單例項資料庫詳細步驟OracleASM單例資料庫
- ORACLE 資料庫11.2.0.4 單例項伺服器IO等待高問題分析Oracle資料庫單例伺服器
- Oracle RAC環境下ASM磁碟組擴容OracleASM
- Oracle 11gR2 ASM例項記憶體管理OracleASM記憶體
- 通過ORACLE VM virtualbox環境安裝oracle 11G RAC(ASM)OracleASM
- 【ASM】Oracle asm刪除磁碟組注意事項ASMOracle
- ORACLE11GR2 RAC解除安裝ASM例項步驟OracleASM
- ASM單例項安裝後,需要手動設定ASM的引數檔案ASM單例
- ORACLE RAC 11.2.0.4 ASM加盤導致叢集重啟之ASM sga設定過小OracleASM
- oracle之 單例項監聽修改埠Oracle單例
- RAC安裝【AIX 7 + 11.2.0.4 + ASM】AIASM
- Spark程式設計環境搭建及WordCount例項Spark程式設計
- RAC和ASM環境下打patchASM
- ORACLE11.2.0.4 RAC+ ASM安裝方法 (作業系統CENTOS7.6)OracleASM作業系統CentOS
- ZooKeeper 系列(二)—— Zookeeper單機環境和叢集環境搭建
- 呀!ASM例項起不來可咋整ASM
- Oracle 11g RAC到單例項OGG同步Oracle單例
- 4.1. Oracle例項Oracle
- Oracle Far Sync例項Oracle
- 網路拓撲例項之RRPP單環(五)
- oracle資料庫與oracle例項Oracle資料庫
- Oracle 11G資料庫單例項安裝Oracle資料庫單例
- 【PSU】Oracle打PSU及解除安裝PSU(單例項)Oracle單例
- ORACLE windows和linux環境下 10g升級到11.2.0.4 並安裝11.2.0.4.19補丁OracleWindowsLinux
- [Oracle] -- 配置Oracle環境變數Oracle變數
- oracle 例項表查詢Oracle
- 純終端Linux環境或者無掛載顯示卡Linux環境執行Chrome例項LinuxChrome
- phpqrcode生成動態二維碼簡單例項PHP單例
- 【DB寶4】只需2步即可擁有Oracle19c的ASM+DB環境OracleASM
- oracle 11g 單例項資料庫的安裝Oracle單例資料庫
- 紅色警報 ORACLE RAC 11.2.0.4 FOR SOLARIS 10 ASM 和DB因叢集心跳丟失重啟OracleASM
- [20191128]11GR2 asm例項audit檔案.txtASM
- 【資料庫資料恢復】Oracle ASM例項無法掛載的資料恢復案例資料庫資料恢復OracleASM