前期规划:
(1),确认集群节点数量,每个节点的主机名;
(2),区分public,private NIC;确认每个主机的3个IP地址;
(3),数据库存储技术选型(asm/ocfs/raw/other);
(4),存储空间规划,包括软件安装位置,数据库文件位置规划;
安装部署
(1),配置主机名和3个IP地址;RPM包检查;
(2),磁盘分区;配置裸设备;
(3),系统要求(OS KERNEL参数,空间要求);
(4),创建oracle用户,要求每个节点UID,GID相同;
(5),定义oracle用户的环境变量,包括$ORACLE_HOME,$ORACLE_BASE,资源数量限制;
(6),用户等价;节点时间同步;
(7),hangcheck-timer模块配置;
安装部署
(1),安装oracle clusterware,安装后进行检查;
(2),安装oracle database;创建asm磁盘;
(3),配置listener,创建asm,创建rac数据库;
(4),安装后测试,failover和loadbalance;
groupadd -g 600 dba
groupadd oinstall -g 601
useradd -u 600 -g oinstall -G dba oracle
-----------
两个节点:
[oracle@dbs .ssh]$cd /home
[oracle@dbs .ssh]$mkdir -pv .ssh
[oracle@dbs .ssh]$chmod 700 .ssh
[oracle@dbs .ssh]$cd .ssh
[oracle@dbs .ssh]$ ssh-keygen -t rsa
[oracle@dbs .ssh]$ ssh-keygen -t dsa
[oracle@dbs .ssh]$ cat *.pub > authorized_keys
节点分别做:
[oracle@dbs .ssh]$ scp authorized_keys dbp:/home/oracle/.ssh/keys_dbs
[oracle@dbp .ssh]$cat keys_dbs >> authorized_keys
[oracle@dbp .ssh]$scp authorized_keys dbs:/home/oracle/.ssh/.
dbs:
[oracle@dbs .ssh]$ ssh dbp
[oracle@dbs .ssh]$ ssh dbp-priv
dbp:
[oracle@dbp .ssh]$ssh dbs
[oracle@dbp .ssh]$ssh dbs-priv
----
[root@dbp ~]# modprobe hangcheck-timer
=------------
[root@dbp ~]# vim /etc/modprobe.conf
vim /etc/sysctl.conf
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
kernel.shmall = 268435456
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_max = 262144
net.core.wmem_default = 262144
---from 大话oracle rac