ITPub博客

首页 > 数据库 > Oracle > Redhat For Oracle11.2.0.4 RAC

Redhat For Oracle11.2.0.4 RAC

原创 Oracle 作者:xj951423274 时间:2018-06-27 09:27:20 0 删除 编辑

Redhat For Oracle11G RAC

一、软件准备

##oracle包

p13390677_112040_Linux-x86-64_1of7.zip

p13390677_112040_Linux-x86-64_2of7.zip

##grid包

p13390677_112040_Linux-x86-64_3of7.zip

kmod-oracleasm 版本需和操作系统对应

oracleasmlib-2.0.4-1.el6.x86_64.rpm

oracleasm-support-2.1.8-1.el6.x86_64.rpm

二、安装步骤

1,主机名和网络配置

10.3.1.65 node1

10.3.1.66 node2

10.3.1.67 node1-vip

10.3.1.68 node2-vip

192.168.11.200 node1-priv

192.168.11.201 node2-priv

10.3.1.69 rac-scan

2,关闭防火墙和SELINUX 服务

service iptables stop  

chkconfig iptables off

 

vim /etc/selinux/config    

SELINUX=disabled

 

setenforce 0 --临时关闭

3,关闭NTP服务,手动校时

service ntpd stop  

chkconfig ntpd off  

mv  /etc/ntp.conf /etc/ntp.conf.bak  

4,创建用户和组

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  

 

 

5,配置环境变量

NODE1_ORACLE:

   

    export PATH  

    export TMP=/tmp  

    export TMPDIR=$TMP   

    export ORACLE_SID=racdb1

    export ORACLE_BASE=/u01/oracle  

    export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1   

    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  

    export NLS_DATE_FORMAT='yyyy/mm/dd hh24:mi:ss'  

    umask 022  

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  

 

 

Node2_oracle:

 

export PATH  

export TMP=/tmp  

export TMPDIR=$TMP   

export ORACLE_SID=racdb2

export ORACLE_BASE=/u01/oracle  

export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1  

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  

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

 

 

6, 系统参数设置

    vim /etc/security/limits.conf  

      

    oracle           soft   nofile           1024  

    oracle           hard   nofile           65536  

    oracle           soft   nproc            2047  

    oracle           hard   nproc            16384  

    oracle           soft   stack            10240  

    oracle           hard   stack            32768  

    grid             soft   nofile           1024  

    grid             hard   nofile           65536  

    grid             soft   nproc            2047  

    grid             hard   nproc            16384  

    grid             soft   stack            10240  

    grid             hard   stack            32768  

    --注意将原来参数shmmall和shmmax注释掉  

    vim /etc/sysctl.conf  

    fs.aio-max-nr = 1048576  

    fs.file-max = 6815744  

    kernel.shmall = 1073741824  

    kernel.shmmax = 4398046511104  

    kernel.shmmni = 4096  

    kernel.sem = 250 32000 100 128  

    net.ipv4.ip_local_port_range = 9000 65500  

    net.core.rmem_default = 262144  

    net.core.rmem_max = 4194304  

    net.core.wmem_default = 262144  

    net.core.wmem_max = 1048576  

      

    --使sysctl生效  

    sysctl -p  

 

7,创建相关目录

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  

 

 

8,安装软件包

yum localinstall gcc compat-libstdc++-33 elfutils-libelf-devel glibc-devel glibc-headers gcc-c++ libaio-devel libstdc++-devel pdksh compat-libcap1-*

 

cd /grid/rpm/

rpm -ivh cvuqdisk-1.0.9-1.rpm

 

9,安装配置ASM

rpm -ivh kmod-oracleasm-2.0.8-4.el6_6.x86_64.rpm

rpm -ivh oracleasmlib-2.0.4-1.el6.x86_64.rpm

rpm -ivh oracleasm-support-2.1.8-1.el6.x86_64.rpm

service oracleasm createdisk VOT_OCR1 /dev/sdb1

service oracleasm createdisk VOT_OCR2 /dev/sdb2

service oracleasm listdisks

service oracleasm enable

 

10,安装grid

创建ASM DISK GROUP 本文使用ASMLIB方式创建的ASM DISK
ERROR: Could not create voting files. It spans across 161 AUs (max supported is 64 AUs)

BUG解决:选择ASM盘 指定路径 /dev/oracleasm/disks/*

Vi /etc/sysconfig/oracleasm

ORACLEASM_USE_LOGICAL_BLOCK_SIZE=yes
对于ASM DISK不能超过2T的问题,使用操作系统命令parted进行划分/dev/sdb1..5..N  然后在ASM 中createdisk

 

11,挂载ASM_DISK

asmca

12,安装oracle软件

13,创建数据库

dbca

 

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/28275505/viewspace-2156705/,如需转载,请注明出处,否则将追究法律责任。

上一篇: MySQL源码安装
下一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2013-07-29

  • 博文量
    22
  • 访问量
    29249