?
?
2.2 禁用防火墙和SELNUX(所有节点)
?
关闭防火墙:
service iptables status service iptables stop chkconfig iptables off chkconfig iptables --list
?
设置/etc/selinux/config 文件,将SELINUX设置为disabled。
[root@rac1 ~]# cat/etc/selinux/config # This file controls the state of SELinuxon the system. # SELINUX= can take one of these threeva lues: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=disabled # SELINUXTYPE= can take one of these twovalues: # targeted - Targeted processes are protected, # mls - Multi Level Security protection. SELINUXTYPE=targeted
?
2.3 配置时间同步(所有节点)
?
这里我们使用CTSS.所以要停用 NTP 服务,并从初始化序列中禁用该服务,并删除 ntp.conf 文件。以 root 用户身份在两个 OracleRAC 节点上运行以下命令:
[root@rac1 ~]# /sbin/service ntpd stop Shutting down ntpd: [ OK ] [root@rac1 ~]# chkconfig ntpd off [root@rac1 ~]# mv /etc/ntp.conf/etc/ntp.conf.original [root@rac1 ~]# chkconfig ntpd --list ntpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off [root@rac2 ~]# /sbin/service ntpd stop Shutting down ntpd: [ OK ] [root@rac2 ~]# chkconfig ntpd off [root@rac2 ~]# mv /etc/ntp.conf/etc/ntp.conf.original [root@rac2 ~]# chkconfig ntpd --list ntpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
还要删除以下文件:
rm /var/run/ntpd.pid
此文件保存了 NTP 后台程序的 pid。
?
2.4 创建目录结构(所有节点)
mkdir -p /u01/gridsoft/12.1.0 mkdir -p /u01/gridbase chown -R grid:oinstall /u01 chown -R grid:oinstall /u01 mkdir -p/u01/oracle/12.1.0/db_1 chown-R oracle:oinstall /u01/oracle chmod -R 775 /u01
2.5 配置环境变量
2.5.1 Grid用户
修改grid用户的.bash_profile.注意每个节点的不同内容:
export ORACLE_SID=+ASM1 #export ORACLE_SID=+ASM2 export ORACLE_BASE=/u01/gridbase export ORACLE_HOME=/u01/gridsoft/12.1.0 exportPATH=$ORACLE_HOME/bin:$PATH:/usr/local/bin/:. export TEMP=/tmp export TMP=/tmp export TMPDIR=/tmp umask 022
?
2.5.2 Oracle 用户
修改oracle 用户的.bash_profile,注意每个节点的不同内容:
ORACLE_SID=cndba1;export ORACLE_SID
#ORACLE_SID=cndba2;export ORACLE_SID
ORACLE_UNQNAME=cndba;export ORACLE_UNQNAME
JAVA_HOME=/usr/local/java; export JAVA_HOME
ORACLE_BASE=/u01/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/12.1.0/db_1; exportORACLE_HOME
ORACLE_TERM=xterm; export ORACLE_TERM
NLS_DATE_FORMAT="YYYY:MM:DDHH24:MI:SS"; export NLS_DATE_FORMAT
NLS_LANG=american_america.ZHS16GBK; exportNLS_LANG
TNS_ADMIN=$ORACLE_HOME/network/admin; exportTNS_ADMIN
ORA_NLS11=$ORACLE_HOME/nls/data; exportORA_NLS11
PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin:$ORA_CRS_HO