本文主要是介绍Centos6.5安装Oracle11.2.0.4 RAC(完整版),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
环境参数:Linux:Centos6.5 Grid和Oracle:11.2.0.4一、环境配置
1.配置Node1和Node2两个节点之间的网卡
Node1:
[root@rac1 network-scripts]# cat ifcfg-eth0
DEVICE=eth0
HWADDR=08:00:27:E6:6A:DF
TYPE=Ethernet
UUID=543aef46-94aa-442f-9259-8584588c5e66
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
IPADDR=192.168.8.221
NETMASK=255.255.255.0
GATEWAY=192.168.8.1
DNS1=221.228.255.1[root@rac1 network-scripts]# cat ifcfg-eth1
DEVICE=eth1
HWADDR=08:00:27:72:5A:8F
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
IPADDR=172.168.1.18
Node2:
[root@rac2 network-scripts]# cat ifcfg-eth0
DEVICE=eth0
HWADDR=08:00:27:1B:D9:5A
TYPE=Ethernet
UUID=543aef46-94aa-442f-9259-8584588c5e66
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
IPADDR=192.168.8.223
NETMASK=255.255.255.0
GATEWAY=192.168.8.1
DNS1=221.228.255.1[root@rac2 network-scripts]# cat ifcfg-eth1
DEVICE=eth1
HWADDR=08:00:27:39:5F:8C
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
IPADDR=172.168.1.19
2.配置/etc/hosts主机文件
[root@rac1 network-scripts]# cat /etc/hosts127.0.0.1 localhost
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6#node1
192.168.8.221 rac1 rac1.oracle.com
192.168.8.222 rac1-vip
172.168.1.18 rac1-priv#node2
192.168.8.223 rac2 rac2.oracle.com
192.168.8.224 rac2-vip
172.168.1.19 rac2-priv#scan-ip
192.168.8.225 rac-cluster rac-cluster-scan
3.配置DNS(略,可以暂时不配置)4.关闭防火墙
service iptables stop
chkconfig iptables off
5.关闭Selinux
vim /etc/selinux/config SELINUX=disabled
6.创建用户和组
--创建用户:
groupadd -g 1000 oinstall
groupadd -g 1200 asmadmin
groupadd -g 1201 asmdba
groupadd -g 1202 asmoper
groupadd -g 1300 dba
groupadd -g 1301 oper
--创建组:
useradd -u 1100 -g oinstall -G asmadmin,asmdba,asmoper grid
useradd -u 1101 -g oinstall -G dba,oper,asmdba oracle
--创建密码:
passwd grid
passwd oracle
7.配置用户的环境变量
Node1:
--grid用户:
export PATH
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_SID=+ASM1
export ORACLE_BASE=/u01/grid
export ORACLE_HOME=/u01/app/grid/11.2.0
export NLS_DATE_FORMAT='yyyy/mm/dd hh24:mi:ss'
export TNS_ADMIN=$ORACLE_HOME/network/admin
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export LANG=en_US
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
umask 022
--oracle用户:
export PATH
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=rac1
export ORACLE_SID=orcl1
export ORACLE_BASE=/u01/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
export ORACLE_UNQNAME=orcl
export TNS_ADMIN=$ORACLE_HOME/network/admin
#export ORACLE_TERM=xterm
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export LANG=en_US
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export NLS_DATE_FORMAT='yyyy/mm/dd hh24:mi:ss'
umask 022
Node2:
--grid用户:
export PATH
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_SID=+ASM2
export ORACLE_BASE=/u01/grid
export ORACLE_HOME=/u01/app/grid/11.2.0
export NLS_DATE_FORMAT='yyyy/mm/dd hh24:mi:ss'
export TNS_ADMIN=$ORACLE_HOME/network/admin
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export LANG=en_US
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
umask 022
--oracle用户:
export PATH
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=rac2
export ORACLE_SID=orcl2
export ORACLE_BASE=/u01/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
export ORACLE_UNQNAME=orcl
export TNS_ADMIN=$ORACLE_HOME/network/admin
#export ORACLE_TERM=xterm
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export LANG=en_US
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export NLS_DATE_FORMAT='yyyy/mm/dd hh24:mi:ss'
umask 022
8.创建所需目录
mkdir -p /u01/grid
mkdir -p /u01/app/grid/11.2.0
mkdir -p /u01/oracle
chown -R oracle:oinstall /u01
chown -R grid:oinstall /u01/grid
chown -R grid:oinstall /u01/app/grid/11.2.0
chmod -R 775 /u01
9.配置limits.con
f增加如配置
vim /etc/security/limits.conforacle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft stack 10240
oracle hard
这篇关于Centos6.5安装Oracle11.2.0.4 RAC(完整版)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!