一、安裝說明
1、環(huán)境說明
創(chuàng)新互聯(lián)主營雙橋網(wǎng)站建設(shè)的網(wǎng)絡(luò)公司,主營網(wǎng)站建設(shè)方案,成都app軟件開發(fā),雙橋h5小程序開發(fā)搭建,雙橋網(wǎng)站營銷推廣歡迎雙橋等地區(qū)企業(yè)咨詢
系統(tǒng)版本 | 數(shù)據(jù)庫版本 | 架構(gòu) | IP地址 | 補(bǔ)丁 |
---|---|---|---|---|
rhel6.9 | 11.2.0.4 | RAC | 192.168.3.2 | 29698727 |
rhel6.9 | 11.2.0.4 | RAC | 192.168.3.3 | 29698727 |
2、軟件存放位置規(guī)劃如下:
軟件 | 存放位置 |
---|---|
Grid | /u01/11.2.0/grid |
Oracle | /u01/app/oracle/product/11.2.0/db_1 |
3、RAC數(shù)據(jù)庫需要共享存儲:
CRSDG:3塊至少3GB以上的盤,用于存放ocr、voting disk,asm的spfile。
DATADG:至少200GB,用于存放redolog、控制文件、數(shù)據(jù)庫的spfile、數(shù)據(jù)庫的system表空間、undo表空間、temp表空間。根據(jù)實際業(yè)務(wù)需求,增加DATADG的容量。
ARCHDG:至少100GB,用戶存放歸檔日志。根據(jù)實際業(yè)務(wù)需求,增加DATADG的容量。
Diskgroup | 大小 |
---|---|
CRSDG | 3塊1GB存儲 |
DATADG | >=100GB |
ARCHDG | >=100GB |
二、安裝步驟
1、依賴包
cpp-4.8.2-16.el7.x86_64
glibc-headers-2.17-55.el7.x86_64
mpfr-3.1.1-4.el7.x86_64
compat-libstdc++-33-3.2.3
binutils-2.23.52.0.1-12.el7.x86_64
compat-libcap1-1.10-3.el7.x86_64
gcc-4.8.2-3.el7.x86_64
gcc-c++-4.8.2-3.el7.x86_64
glibc-2.17-36.el7.i686
glibc-2.17-36.el7.x86_64
glibc-devel-2.17-36.el7.i686
glibc-devel-2.17-36.el7.x86_64
ksh
libaio-0.3.109-9.el7.i686
libaio-0.3.109-9.el7.x86_64
libaio-devel-0.3.109-9.el7.i686
libaio-devel-0.3.109-9.el7.x86_64
libgcc-4.8.2-3.el7.i686
libgcc-4.8.2-3.el7.x86_64
libstdc++-4.8.2-3.el7.i686
libstdc++-4.8.2-3.el7.x86_64
libstdc++-devel-4.8.2-3.el7.i686
libstdc++-devel-4.8.2-3.el7.x86_64
libXi-1.7.2-1.el7.i686
libXi-1.7.2-1.el7.x86_64
libXtst-1.2.2-1.el7.i686
libXtst-1.2.2-1.el7.x86_64
make-3.82-19.el7.x86_64
sysstat-10.1.5-1.el7.x86_64
2、系統(tǒng)參數(shù)
可參考系統(tǒng)內(nèi)核參數(shù)MOS Doc ID: 169706.1
vi /etc/sysctl.conf:
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 10485760
kernel.shmmax = 34359738368
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
3、設(shè)置oracle用戶shell限制:
/etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768
4、/etc/pam.d/login添加:
session required pam_limits.so
/etc/profile添加:
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -u 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
5、hosts
vi /etc/hosts
192.168.3.2 tim1
10.10.10.1 tim1-priv
192.168.3.88 tim1-vip
192.168.3.3 tim2
10.10.10.2 tim1-priv
192.168.3.99 tim2-vip
192.168.3.111 rac-scan
6、用戶與組
groupadd -g 200 oinstall
groupadd -g 201 dba
groupadd -g 202 oper
groupadd -g 203 asmadmin
groupadd -g 204 asmoper
groupadd -g 205 asmdba
useradd -u 200 -g oinstall -G dba,asmdba,oper oracle
useradd -u 201 -g oinstall -G asmadmin,asmdba,asmoper,oper,dba grid
7、目錄
mkdir -p /u01/app/oraInventory
chown -R grid:oinstall /u01/app
chmod -R 775 /u01/app/oraInventory/
mkdir -p /u01/11.2.0/grid
chown -R grid:oinstall /u01/11.2.0
chmod -R 775 /u01/11.2.0
mkdir -p /u01/app/oracle
mkdir -p /u01/app/oracle/cfgtoollogs
mkdir -p /u01/app/oracle/product/11.2.0/db_1
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/app/oracle
8、環(huán)境變量
###注意以下環(huán)境變量參數(shù)為Node1,與Node2不同之處在于Oracle_sid。
grid用戶
export EDITOR=vi
export ORACLE_SID=+ASM1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/11.2.0/grid
export GRID_HOME=/u01/11.2.0/grid
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export THREADS_FLAG=native
export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin
umask 022
oracle用戶
export EDITOR=vi
export ORACLE_SID=prod1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin
umask 022
8、udev
###node1,node2都需要配置
[root@tim1 ~]#vi /etc/udev/rules.d/60-raw.rules 按照example編寫如下:
ACTION=="add", ENV{MAJOR}=="8",ENV{MINOR}=="33",RUN+="/bin/raw /dev/raw/raw1 %M %m"
ACTION=="add", ENV{MAJOR}=="8",ENV{MINOR}=="34",RUN+="/bin/raw /dev/raw/raw2 %M %m"
ACTION=="add", ENV{MAJOR}=="8",ENV{MINOR}=="35",RUN+="/bin/raw /dev/raw/raw3 %M %m"
ACTION=="add", ENV{MAJOR}=="8",ENV{MINOR}=="36",RUN+="/bin/raw /dev/raw/raw4 %M %m"
ACTION=="add", ENV{MAJOR}=="8",ENV{MINOR}=="37",RUN+="/bin/raw /dev/raw/raw5 %M %m"
ACTION=="add", ENV{MAJOR}=="8",ENV{MINOR}=="38",RUN+="/bin/raw /dev/raw/raw6 %M %m"
ACTION=="add", ENV{MAJOR}=="8",ENV{MINOR}=="39",RUN+="/bin/raw /dev/raw/raw7 %M %m"
ACTION=="add", ENV{MAJOR}=="8",ENV{MINOR}=="40",RUN+="/bin/raw /dev/raw/raw8 %M %m"
ACTION=="add", ENV{MAJOR}=="8",ENV{MINOR}=="41",RUN+="/bin/raw /dev/raw/raw9 %M %m"
ACTION=="add", ENV{MAJOR}=="8",ENV{MINOR}=="42",RUN+="/bin/raw /dev/raw/raw10 %M %m"
ACTION=="add", ENV{MAJOR}=="8",ENV{MINOR}=="43",RUN+="/bin/raw /dev/raw/raw11 %M %m"
KERNEL=="raw[1-9]", OWNER="grid", GROUP="dba", MODE="660"
KERNEL=="raw10", OWNER="grid", GROUP="dba", MODE="660"
KERNEL=="raw11", OWNER="grid", GROUP="dba", MODE="660"
[root@node1 ~]# start_udev
[root@node2 ~]# ll /dev/raw/raw*
crw-rw---- 1 grid dba 162, 1 Apr 17 21:10 /dev/raw/raw1
crw-rw---- 1 grid dba 162, 10 Apr 17 21:10 /dev/raw/raw10
crw-rw---- 1 grid dba 162, 11 Apr 17 21:10 /dev/raw/raw11
crw-rw---- 1 grid dba 162, 2 Apr 17 21:10 /dev/raw/raw2
crw-rw---- 1 grid dba 162, 3 Apr 17 21:10 /dev/raw/raw3
crw-rw---- 1 grid dba 162, 4 Apr 17 21:10 /dev/raw/raw4
crw-rw---- 1 grid dba 162, 5 Apr 17 21:10 /dev/raw/raw5
crw-rw---- 1 grid dba 162, 6 Apr 17 21:10 /dev/raw/raw6
crw-rw---- 1 grid dba 162, 7 Apr 17 21:10 /dev/raw/raw7
crw-rw---- 1 grid dba 162, 8 Apr 17 21:10 /dev/raw/raw8
crw-rw---- 1 grid dba 162, 9 Apr 17 21:10 /dev/raw/raw9
9、啟動圖形化
10、安裝grid
Grid只認(rèn)出了Node1節(jié)點,Node2需要手動添加一下。
11、安裝oracle
可將簡體中文加上
這是在向node2復(fù)制數(shù)據(jù),可以在node2的$ORACLE_HOME下,
通過du -sh 查看進(jìn)度
至此安裝結(jié)束?。】赡苡行﹦偭私鈕racle 的按此步驟會報錯,因為我沒有配置兩個節(jié)點grid、oracle用戶互信,其實可以在圖形化中操作,努力找一找吧!!
12、檢查
查看集群資源
[grid@tim1 ~]$ crsctl status res -t
檢查ASM狀態(tài)
[grid@tim1 ~]$ asmcmd -p
檢查ocr狀態(tài)
[grid@tim1 ~]$ ocrcheck
檢查voting disk狀態(tài)
[grid@tim1 ~]$ crsctl query css votedisk
檢查節(jié)點信息
[grid@tim1 ~]$ srvctl config nodeapps
檢查數(shù)據(jù)庫信息
[grid@tim1 ~]$ srvctl config database -d prod
檢查接口狀態(tài)
[grid@tim1 ~]$ oifcfg iflist -p -n
[grid@tim1 ~]$ oifcfg getif -global
檢查監(jiān)聽狀態(tài)
[grid@tim1 ~]$ lsnrctl status