Installing Oracle 12c RAC on Linux 6

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Installing Oracle 12c RAC on Linux 6相关的知识,希望对你有一定的参考价值。

1.修改hosts文件

vi /etc/sysconfig/network-scripts/ifcfg-eth0

#Public

192.168.1.240   node1

192.168.1.241   node2   

#Virtual 

192.168.1.242   node1-vip   

192.168.1.243   node2-vip

#Private

192.168.0.240   node1-priv

192.168.0.241   node2-priv

#SCAN

192.168.1.245   node-cluster   cluster-scan

2.关闭防火墙

service iptables stop

chkconfig iptables off

setenforce 0

3.配置SELinux为

vi /etc/selinux/config

selinux=permissive

4.添加组

groupadd -g 54321 oinstall

groupadd -g 54322 dba

groupadd -g 54323 oper

groupadd -g 54325 asmdba

groupadd -g 54328 asmadmin

groupadd -g 54329 asmoper

5.添加用户

useradd -u 54321 -g oinstall -G dba,oper,asmdba oracle

useradd -u 54322 -g oinstall -G dba,asmdba,asmadmin,asmoper grid

passwd oracle

passwd grid

6.配置Oracle用户的shell限制

vi /etc/security/limits.confs

添加内容

# Grid user

grid soft nofile 2047

grid hard nofile 65536

grid soft nproc 16384

grid hard nproc 16384

grid soft stack 10240

grid hard stack 32768

grid hard memlock 134217728

grid soft memlock 134217728

# Oracle user

oracle soft nofile 2047

oracle hard nofile 65536

oracle soft nproc 16384

oracle hard nproc 16384

oracle soft stack 10240

oracle hard stack 32768

oracle hard memlock 134217728

oracle soft memlock 134217728

7.新建安装目录

mkdir -p /u01/app/12.1.0/grid

mkdir -p /u01/app/grid

mkdir -p /u01/app/oracle

chown -R grid:oinstall /u01

chown oracle:oinstall /u01/app/oracle

chmod -R 775 /u01/

8.编辑vi /etc/pam.d/login

session required /lib64/security/pam_limits.so

session required pam_limits.so

9.删除NTP

/sbin/service ntpd stop

chkconfig ntpd off

mv /etc/ntp.conf /etc/ntp.conf.org

rm /var/run/ntpd.pid

/etc/init.d/avahi-daemon stop

chkconfig avahi-daemon off

10.配置环境变量

vi .bash_profile

#grid用户下

ORACLE_SID=+ASM1; export ORACLE_SID

ORACLE_BASE=/u01/app/grid; export ORACLE_BASE

ORACLE_HOME=/u01/app/12.1.0/grid; export ORACLE_HOME

ORACLE_TERM=xterm; export ORACLE_TERM

PATH=$ORACLE_HOME/bin:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib; export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib; export CLASSPATH

export TEMP=/tmp

export TMPDIR=/tmp

#oracle

ORACLE_SID=salmandb1; export ORACLE_SID

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE

ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1; export ORACLE_HOME

ORACLE_TERM=xterm; export ORACLE_TERM

PATH=$ORACLE_HOME/bin:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib; export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib; export CLASSPATH

export TEMP=/tmp

export TMPDIR=/tmp

11.配置存储ASM

for i in b c d e f g ;

do

echo "KERNEL==\"sd*\", BUS==\"scsi\", PROGRAM==\"/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/\$name\", RESULT==\"`/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/sd$i`\", NAME=\"asm-disk$i\", OWNER=\"grid\", GROUP=\"asmadmin\", MODE=\"0660\""      >> /etc/udev/rules.d/99-oracle-asmdevices.rules

done

重新启动服务/sbin/start_udev

然后编辑: vi /etc/rc.d/rc.local

chown -h grid:asmadmin /dev/asm-diskb

chown -h grid;asmadmin /dev/asm-diskc

chown -h grid:asmadmin /dev/asm-diskd

chown -h grid:asmadmin /dev/asm-diske

chown -h grid:asmadmin /dev/asm-diskf

chown -h grid:asmadmin /dev/asm-diskg

chmod 660 /dev/asm-diskb

chmod 660 /dev/asm-diskc

chmod 660 /dev/asm-diskd

chmod 660 /dev/asm-diske

chmod 660 /dev/asm-diskf

chmod 660 /dev/asm-diskg


忘记编辑内核参数了vi /etc/sysctl.conf

fs.file-max = 6815744

kernel.sem = 250 32000 100 128

kernel.shmmni = 4096

kernel.shmall = 4294967296

kernel.shmmax = 4398046511104

kernel.panic_on_oops = 1

net.core.rmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048576

fs.aio-max-nr = 1048576

net.ipv4.ip_local_port_range = 9000 65500




本文出自 “VMware/Oracle” 博客,请务必保留此出处http://123124432.blog.51cto.com/12616119/1904443

以上是关于Installing Oracle 12c RAC on Linux 6的主要内容,如果未能解决你的问题,请参考以下文章

Installing Oracle 11G RAC on Linux 6

Oracle 12C Rac到Rac搭建ADG

oracle 12c r2 rac + ORA-28040

Oracle 12C RAC集群搭建

oracle12c rac搭建时主机名无效问题的解决

Oracle12c RAC数据导出至Oracle11g