ITPub博客

首页 > 数据库 > Oracle > 12c R1 RAC安装

12c R1 RAC安装

原创 Oracle 作者:Curry_0316 时间:2016-03-19 13:21:57 0 删除 编辑
图片部分可参考笔记:
http://note.youdao.com/share/?id=a52fb36f6dd215a5e50162027bc88f35&type=note

一、安装需求

详细安装规范请官方文档:

http://docs.oracle.com/database/121/LADBI/chklist.htm#LADBI8050

 

###########################################

#           oracle官方安装要求            #

###########################################

验证系统要求

     To determine the distribution and version of Linux installed, enter one of the following commands:

     # cat /etc/oracle-release

                    # cat /etc/redhat-release

                    # cat /etc/SuSE-release

                    # lsb_release -id

     查看内存大小 free -m

     # grep MemTotal /proc/meminfo

     查看交换空间

     # grep SwapTotal /proc/meminfo

     确认内核

     # uname -r

     Supported distributions:

                            Oracle Linux 6 with the Unbreakable Enterprise kernel: 2.6.39-200.24.1.el6uek.x86_64 or later

                            Oracle Linux 6 with the Red Hat Compatible kernel: 2.6.32-71.el6.x86_64 or later

     查看磁盘空间,Oracle 12c R1 x64企业版的磁盘空间要求6.4 GB以上。

     # df -h

 

Ⅰ、硬件

1. 最低硬件要求

      a.) Random Access Memory (RAM)::

           At least 1 GB RAM for Oracle Database installations

           At least 4 GB of RAM for Oracle Grid Infrastructure for a standalone server including installations where you plan to install Oracle Database

         

          Ensure that your system meets the following memory requirements:

                                                Minimum: 1 GB of RAM

                                                Recommended: 2 GB of RAM or more

 

      b.) 交换磁盘空间与系统物理内存的比例如下:

                                     RAM         交换空间

                                     1 GB 到 2 GB 之间        RAM 大小的 1.5 倍

                                     2 GB 到 16 GB 之间     等于 RAM 的大小

                                     超过 16 GB     16 GB

     注:以上推荐值(摘自《Oracle Database Installation Guide 12c Release 1 (12.1) for Linux》)是安装的最低要求。优化/改进 RDBMS 性能可能需要更多 RAM 和交换空间。

 

     c.) At least 1 GB allocated to /tmp.

     d.) 约 6.5 GB 的本地磁盘空间用于数据库软件文件。

     e.) 如果要在安装期间创建预配置数据库,则所选文件系统必须至少具有 2 GB 空闲磁盘空间。

          对于生产数据库,必须根据数据库的使用来估算磁盘空间要求。

 

  2. 支持在 ext2、ext3 和 ext4 文件系统上运行 Oracle 数据库(有关详细信息,请参阅 Note:236826.1)。

 

Ⅱ、软件

   1. 经过认证的 Linux 操作系统

       Oracle Linux 6

       Red Hat Enterprise Linux 6

   2. Oracle 推荐使用默认软件程序包 (RPM) 安装 Linux 操作系统,并且在安装期间不要定制 RPM。有关“default-RPMs”的详细信息,请参阅 Note 376183.1, "Defining a "default RPMs" installation of the RHEL OS" 或 Note 401167.1, "Defining a "default RPMs" installation of the Oracle Enterprise Linux (OEL) OS"。

 

   3. Linux 内核要求

                             Supported distributions:

                            Oracle Linux 6 with the Unbreakable Enterprise kernel: 2.6.39-200.24.1.el6uek.x86_64 or later

                            Oracle Linux 6 with the Red Hat Compatible kernel: 2.6.32-71.el6.x86_64 or later

 

 

二、安装前环境准备

1、创建组和用户

安装RAC的时候两台服务器的用户和组需要完全一样

/usr/sbin/groupadd -g 54321 oinstall

/usr/sbin/groupadd -g 54322 dba

/usr/sbin/groupadd -g 54323 oper

/usr/sbin/groupadd -g 54324 backupdba

/usr/sbin/groupadd -g 54325 dgdba

/usr/sbin/groupadd -g 54326 kmdba

/usr/sbin/groupadd -g 54327 asmdba

/usr/sbin/groupadd -g 54328 asmoper

/usr/sbin/groupadd -g 54329 asmadmin

/usr/sbin/useradd -u 54321 -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba,oper oracle

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

 

passwd oracle

passwd grid

 

注:

/usr/sbin/userdel oracle         --删除用户

/usr/sbin/groupdel dba          --删除组

/usr/sbin/usermod -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba[,oper] oracle

 

2、创建oracle相关目录

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/

 

3、编辑文件/etc/sysctl.conf

添加下面的内容

fs.aio-max-nr = 1048576

fs.file-max = 6815744

kernel.shmall = 2097152

kernel.shmmax = 8362831872

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 = 1048586

kernel.shmall = 2097152

fs.file-max = 6815744

fs.aio-max-nr = 1048576

kernel.panic_on_oops = 1    --这个参数是12R1的bug,需要配置

 

执行以下命令使参数生效:

# /sbin/sysctl –p

4、编辑文件/etc/security/limits.conf

添加以下内容:

oracle   soft   nproc     2047

oracle   hard   nproc     16384

oracle   soft   nofile    1024

oracle   hard   nofile    65536

oracle   soft   stack     10240

oracle   hard   stack     10240

grid   soft   nproc     2047

grid   hard   nproc     16384

grid   soft   nofile    1024

grid   hard   nofile    65536

grid   soft   stack     10240

grid   hard   stack     10240

修改后  ulimit -a  查看

注:limits.conf 文件发生更改时,这些更改立即生效。但是,如果 Oracle 用户已登录,

则这些更改将在注销这些用户并重新登录之后生效。必须先完成此操作,然后再使用这些帐户进行安装。

5、编辑/etc/pam.d/login 文件

确保加载了最新版本的 PAM,添加以下行(如果还没有这些内容):

session    required     pam_limits.so

6、编辑/etc/profile

验证当前 ulimit,如果需要则增大。可以采用多种方式完成此操作,推荐方法是在 /etc/profile 中添加以下行

if [ $USER = "oracle" ] || [ $USER = "grid" ]; then

    if [ $SHELL = "/bin/ksh" ]; then

       ulimit -u 16384

       ulimit -n 65536

    else

       ulimit -u 16384 -n 65536

    fi

    umask 022

fi

 

7、上传oracle安装介质


8、编辑/etc/hosts文件,并确认ip和主机名的对应

#Public IP

192.168.67.150 node1

192.168.67.151 node2

 

#VIP

192.168.67.160 node1-vip

192.168.67.161 node2-vip

 

#Private IP

192.168.10.99 node1-prv

192.168.10.100 node2-prv

 

#Scan IP

192.168.67.164 scanip12c

 

cat /etc/sysconfig/network

hostname

9、关闭防火墙

chkconfig --list iptables

chkconfig iptables off

chkconfig --list iptables

service iptables stop

service network restart

 

10、安装oracle 12.1需要的rpm包

见官方文档:http://docs.oracle.com/database/121/LADBI/pre_install.htm#LADBI7536

 

Packages for Oracle Linux 6 and Red Hat Enterprise Linux 6

The following packages (or later versions) must be installed:

binutils-2.20.51.0.2-5.11.el6 (x86_64)

compat-libcap1-1.10-1 (x86_64)

compat-libstdc++-33-3.2.3-69.el6 (x86_64)

compat-libstdc++-33-3.2.3-69.el6 (i686)

gcc-4.4.4-13.el6 (x86_64)

gcc-c++-4.4.4-13.el6 (x86_64)

glibc-2.12-1.7.el6 (i686)

glibc-2.12-1.7.el6 (x86_64)

glibc-devel-2.12-1.7.el6 (x86_64)

glibc-devel-2.12-1.7.el6 (i686)

ksh

libgcc-4.4.4-13.el6 (i686)

libgcc-4.4.4-13.el6 (x86_64)

libstdc++-4.4.4-13.el6 (x86_64)

libstdc++-4.4.4-13.el6 (i686)

libstdc++-devel-4.4.4-13.el6 (x86_64)

libstdc++-devel-4.4.4-13.el6 (i686)

libaio-0.3.107-10.el6 (x86_64)

libaio-0.3.107-10.el6 (i686)

libaio-devel-0.3.107-10.el6 (x86_64)

libaio-devel-0.3.107-10.el6 (i686)

libXext-1.1 (x86_64)

libXext-1.1 (i686)

libXtst-1.0.99.2 (x86_64)

libXtst-1.0.99.2 (i686)

libX11-1.3 (x86_64)

libX11-1.3 (i686)

libXau-1.0.5 (x86_64)

libXau-1.0.5 (i686)

libxcb-1.5 (x86_64)

libxcb-1.5 (i686)

libXi-1.3 (x86_64)

libXi-1.3 (i686)

make-3.81-19.el6

sysstat-9.0.4-11.el6 (x86_64)

nfs-utils-1.2.3-15.0.1

 

使用yum批量安装,以下安装包中还有一些是进行系统操作时可能需要的安装包,如系统存在会自动过滤

yum -y install binutils* compat-libstdc* glibc-2* ksh* libaio* make-3* compat-libcap1* gcc-4* gcc-c* libstdc++-devel* sysstat* glibc-devel* libgcc-4* libstdc++-4* unixODBC-2* unixODBC-devel-2* elfutils-libelf-devel* libXp* xorg-x11-apps libXext* libXtst* libX11* libXau* libxcb* libXi* nfs-utils-1.2.3-15.0.1 *ssh* zip unzip setuptool traceroute ntp parted

 

检查是否安装成功

rpm -q binutils compat-libstdc++ gcc glibc libaio libgcc libstdc++ make sysstat unixodbc

 

接下来11和12这两步以前在11g的时候没有配置过,但是看12c官方文档有建议配置

11、Disabling Transparent HugePages

To check if Transparent HugePages is enabled run one of the following commands as the root user:

         Red Hat Enterprise Linux kernels:

                   # cat /sys/kernel/mm/redhat_transparent_hugepage/enabled

         Other kernels:

                   # cat /sys/kernel/mm/transparent_hugepage/enabled

         The following is a sample output that shows Transparent HugePages is being used as the [always] flag is enabled.

         [always] never

        

 To disable Transparent HugePages perform the following steps:

         Add the following entry to the kernel boot line in the /etc/grub.conf file:

         transparent_hugepage=never

         For example:

         title Oracle Linux Server (2.6.32-300.25.1.el6uek.x86_64)

        root (hd0,0)

        kernel /vmlinuz-2.6.32-300.25.1.el6uek.x86_64 ro root=LABEL=/ transparent_hugepage=never

        initrd /initramfs-2.6.32-300.25.1.el6uek.x86_64.img

        

         Restart the system to make the changes permanent.

 

12、Setting Disk I/O Scheduler on Linux

echo deadline > /sys/block/${ASM_DISK}/queue/scheduler

 

echo deadline > /sys/block/sdc/queue/scheduler

echo deadline > /sys/block/sde/queue/scheduler

echo deadline > /sys/block/sdd/queue/scheduler

echo deadline > /sys/block/sdf/queue/scheduler

echo deadline > /sys/block/sdk/queue/scheduler

echo deadline > /sys/block/sdi/queue/scheduler

echo deadline > /sys/block/sdg/queue/scheduler

echo deadline > /sys/block/sdh/queue/scheduler

echo deadline > /sys/block/sdj/queue/scheduler

 

13、Checking Shared Memory File System Mount on Linux

         Ensure that the /dev/shm mount area is of type tmpfs and is mounted with the following options:

■ With rw and exec permissions set on it

■

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

请登录后发表评论 登录
全部评论

注册时间:2014-10-11

  • 博文量
    89
  • 访问量
    280148