I 配置DATA GRARD
I.1 database环境检测
主机名 |
public IP |
VIP |
PRIVATE IP |
SCAN IP |
instance |
scan instance |
RAC01 |
192.168.10.10 |
192.168.10.101 |
192.168.20.10 |
192.168.10.100 |
MAPP1 |
mapp |
RAC02 |
192.168.10.20 |
192.168.10.102 |
192.168.20.20 |
MAPP2 |
||
RACJL01 |
192.168.10.15 |
192.168.10.203 |
192.168.10.15 |
192.168.10.119 |
MAPP1 |
mappjl |
RACJL02 |
192.168.10.25 |
192.168.10.202 |
192.168.10.25 |
MAPP2 |
||
存储01 |
192.168.10.201,为mapp提供存储 |
|||||
存储02 |
192.168.10.199,为mappjl提供存储 |
1. 在sysctl.conf中修改如下参数
# Added for ORACLE Real Application Cluster
net.ipv4.conf.eth5.rp_filter = 2
net.ipv4.conf.eth4.rp_filter = 2
# oracle-rdbms-server-11gR2-preinstall setting for fs.file-max is 6815744
fs.file-max = 6815744
# oracle-rdbms-server-11gR2-preinstall setting for kernel.sem is'250 32000 100 128'
kernel.sem = 250 32000 100 128
# oracle-rdbms-server-11gR2-preinstall setting for kernel.shmmni is4096
kernel.shmmni = 4096
# oracle-rdbms-server-11gR2-preinstall setting for kernel.shmall is1073741824 on x86_64
# oracle-rdbms-server-11gR2-preinstall setting for kernel.shmall is2097152 on i386
kernel.shmall = 1073741824
# oracle-rdbms-server-11gR2-preinstall setting for kernel.shmmax is4398046511104 on x86_64
# oracle-rdbms-server-11gR2-preinstall setting for kernel.shmmax is4294967295 on i386
kernel.shmmax = 4398046511104
# oracle-rdbms-server-11gR2-preinstall setting fornet.core.rmem_default is 262144
net.core.rmem_default = 262144
# oracle-rdbms-server-11gR2-preinstall setting for net.core.rmem_maxis 4194304
net.core.rmem_max = 4194304
# oracle-rdbms-server-11gR2-preinstall setting fornet.core.wmem_default is 262144
net.core.wmem_default = 262144
# oracle-rdbms-server-11gR2-preinstall setting for net.core.wmem_maxis 1048576
net.core.wmem_max = 1048576
# oracle-rdbms-server-11gR2-preinstall setting for fs.aio-max-nr is1048576
fs.aio-max-nr = 1048576
# oracle-rdbms-server-11gR2-preinstall setting fornet.ipv4.ip_local_port_range is 9000 65500
net.ipv4.ip_local_port_range = 9000 65500
#hugepages
vm.nr_hugepages = 29669
vm.swappiness = 0
vm.dirty_background_ratio = 3
vm.dirty_ratio = 80
vm.dirty_expire_centisecs = 500
vm.dirty_writeback_centisecs = 100
2. 完成以下参数修改,也可在安装过程中通过fixup脚本完成
Parameter |
Modfied Value |
Comment |
semmsl |
250 |
/proc/sys/kernel/sem |
semmns |
32000 |
|
semopm |
100 |
|
semmni |
128 |
|
shmmax |
68719476736 |
/proc/sys/kernel/shmmax |
shmmni |
4096 |
/proc/sys/kernel/shmmni |
shmall |
4294967296 |
/proc/sys/kernel/shmall |
file-max |
6815744 |
/proc/sys/fs/file-max |
ip_local_port_range |
9000 |
/proc/sys/net/ipv4/ip_local_port_range |
65500 |
||
rmem_default |
262144 |
/proc/sys/net/core/rmem_default |
rmem_max |
4194304 |
/proc/sys/net/core/rmem_max |
wmem_default |
262144 |
/proc/sys/net/core/wmem_default |
wmem_max |
2097152 |
/proc/sys/net/core/wmem_max |
aio-max-nr |
1048576 |
/proc/sys/fs/aio-max-nr |
1.2检验组和用户设置
Name |
Type |
GID/UID |
Group Member |
oinstall |
group |
501 |
|
dba |
group |
502 |
|
oper |
group |
503 |
|
asmadmin |
group |
504 |
|
asmdba |
group |
506 |
|
asmoper |
group |
507 |
|
grid |
User |
501 |
oinstall,asmadmin,asmdba,asmoper,dba |
oracle |
User |
502 |
oinstall,dba,asmdba |
按上表规划在两个节点上都创建组和用户
1. 校验组
#cat /etc/group
oinstall:x:501:
dba:x:502:oracle,grid
oper:x:503:grid,oracle
asmadmin:x:504:grid
asmdba:x:506:grid,oracle
asmoper:x:507:grid
2. 检验用户设置
# id grid
uid=501(grid) gid=501(oinstall)groups=501(oinstall),502(dba),503(oper),
504(asmadmin),506(asmdba),507(asmoper)
# id oracle
uid=502(oracle) gid=501(oinstall)groups=501(oinstall),502(dba),503(oper),506(asmdba)
3. 校验/etc/security/limits.conf文件
# Added for RAC
# oracle-rdbms-server-11gR2-preinstall setting for nofile soft limitis 1024
oracle soft nofile 1024
# oracle-rdbms-server-11gR2-preinstall setting for nofile hard limitis 65536
oracle hard nofile 65536
# oracle-rdbms-server-11gR2-preinstall setting for nproc soft limitis 2047
oracle soft nproc 2047
# oracle-rdbms-server-11gR2-preinstall setting for nproc hard limitis 16384
oracle hard nproc 16384
# oracle-rdbms-server-11gR2-preinstall setting for stack soft limitis 10240KB
oracle soft stack 10240
# oracle-rdbms-server-11gR2-preinstall setting for stack hard limitis 32768KB
oracle hard stack 32768
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
# End of file
4. 校验文件/etc/profile
在/etc/profile文件中添加如下信息
# Added for RAC
if [ $USER = "oracle" ] || [ $USER = "grid" ];then
if [ $SHELL ="/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
1.3检验相关目录
1. 校验OracleInventory
# cat/etc/oraInst.loc
inventory_loc=/oracle/app/oraInventory
inst_group=oinstall
2. 校验ClusterwareInfrastructure产品路径
# su - grid
$echo $ORACLE_HOME
/oracle/11.2.0/grid
#echo $ORACLE_BASE
/u01/app/asmuser
3. 创建ORACLEDatabase产品路径
# su – oracle
$ echo $ORACLE_HOME
/u01/app/oracle/product/11.2.0/db_1
$echo $ORACLE_BASE
/oracle/app/oracle
1.4配置NTP服务
1. 修改NTP配置文件/etc/ntp.conf
添加如下条目
# Added for RAC
server 10.33.176.66 prefer
server 10.33.176.67
2. 编辑/etc/sysconfig/ntpd文件
添加-x标识,防止时间向回调整,如下所示:
# Drop root to id 'ntp:ntp' by default.
OPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid"
# Set to 'yes' to sync hw clock after successful ntpdate
SYNC_HWCLOCK=no
# Additional options for ntpdate
NTPDATE_OPTIONS=
3. 启动或重新NTP服务
# service ntpd start
# service ntpd restart
4. 设置开启器启动NTP服务
#chkconfig ntpd on
5. 校验NTP服务
# ntpq –p
1.5primary检验集群配置
检查总体状态
[grid@RACJL02~]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCH.dg
ONLINE ONLINE racjl01
ONLINE ONLINE racjl02
ora.CRS_VOTE.dg
ONLINE ONLINE racjl01
ONLINE ONLINE racjl02
ora.DATA.dg
ONLINE ONLINE racjl01
ONLINE ONLINE racjl02
ora.LISTENER.lsnr
ONLINE ONLINE racjl01
ONLINE ONLINE racjl02
ora.REDO.dg
ONLINE ONLINE racjl01
ONLINE ONLINE racjl02
ora.asm
ONLINE ONLINE racjl01 Started
ONLINE ONLINE racjl02 Started
ora.gsd
OFFLINE OFFLINE racjl01
OFFLINE OFFLINE racjl02
ora.