ITPub博客

首页 > 数据库 > Oracle > [RAC] Oracle11.2.0.4搭建RAC(Udev)

[RAC] Oracle11.2.0.4搭建RAC(Udev)

原创 Oracle 作者:tolilong 时间:2016-09-11 08:29:55 0 删除 编辑

Oracle 11.2.0.4 RAC 安装

Linux系统安装之类,就不截图了.

 

1.在两个节点建立相同的group&user

[root@racdb1 ~]# groupadd -g 1000 oinstall

[root@racdb1 ~]# groupadd -g 1200 asmadmin

[root@racdb1 ~]# groupadd -g 1201 asmdba

[root@racdb1 ~]# groupadd -g 1202 asmoper

[root@racdb1 ~]# groupadd -g 1300 dba

[root@racdb1 ~]# groupadd -g 1301 oper

[root@racdb1 ~]# useradd -u 1100 -g oinstall -G asmadmin,asmdba,asmoper,dba oragrid

[root@racdb1 ~]# passwd oragrid

Changing password for user oragrid.

New password:

BAD PASSWORD: it is based on a dictionary word

Retype new password:

passwd: all authentication tokens updated successfully.

[root@racdb1 ~]# useradd -u 1101 -g oinstall -G dba,oper,asmdba oracle

[root@racdb1 ~]# passwd oracle

Changing password for user oracle.

New password:

BAD PASSWORD: it is based on a dictionary word

Retype new password:

passwd: all authentication tokens updated successfully.

 

 

[root@racdb2 ~]# groupadd -g 1000 oinstall

[root@racdb2 ~]# groupadd -g 1200 asmadmin

[root@racdb2 ~]# groupadd -g 1201 asmdba

[root@racdb2 ~]# groupadd -g 1202 asmoper

[root@racdb2 ~]# groupadd -g 1300 dba

[root@racdb2 ~]# groupadd -g 1301 oper

[root@racdb2 ~]# useradd -u 1100 -g oinstall -G asmadmin,asmdba,asmoper,dba oragrid

[root@racdb2 ~]# passwd oragrid

Changing password for user oragrid.

New password:

BAD PASSWORD: it is based on a dictionary word

Retype new password:

passwd: all authentication tokens updated successfully.

[root@racdb2 ~]# useradd -u 1101 -g oinstall -G dba,oper,asmdba oracle

[root@racdb2 ~]# passwd oracle

Changing password for user oracle.

New password:

BAD PASSWORD: it is based on a dictionary word

Retype new password:

passwd: all authentication tokens updated successfully.

 

 

2.建立相同的安装目录

[root@racdb1 ~]# cd /u01

[root@racdb1 u01]# ll

total 16

drwx------. 2 root root 16384 Jun 20 19:08 lost+found

[root@racdb1 u01]# mkdir -p app/oracle

[root@racdb1 u01]# mkdir -p app/11.2.0

[root@racdb1 u01]# mkdir -p app/grid

[root@racdb1 u01]# chmod -R 775 app/

[root@racdb1 u01]# cd app

[root@racdb1 app]# ll

total 12

drwxrwxr-x. 2 root root 4096 Jun 20 23:52 11.2.0

drwxrwxr-x. 2 root root 4096 Jun 20 23:53 grid

drwxrwxr-x. 2 root root 4096 Jun 20 23:52 oracle

[root@racdb1 app]# chown -R oracle:oinstall oracle/

[root@racdb1 app]# chown -R oragrid:oinstall 11.2.0/

[root@racdb1 app]# chown -R oragrid:oinstall grid/

 

[root@racdb2 ~]# cd /u01

[root@racdb2 u01]# mkdir -p app/oracle

[root@racdb2 u01]# mkdir -p app/11.2.0

[root@racdb2 u01]# mkdir -p app/grid

[root@racdb2 u01]# chmod -R 775 app/

[root@racdb2 u01]# cd app

[root@racdb2 app]# chown -R oracle:oinstall oracle/

[root@racdb2 app]# chown -R oragrid:oinstall 11.2.0/

[root@racdb2 app]# chown -R oragrid:oinstall grid/

 

 

 

3.安装必要的package.

Oracle11g安装的package如下.

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

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

make-3.81-19.el6

sysstat-9.0.4-11.el6 (x86_64)

 

配置yum

[root@racdb1 ~]# cat /etc/yum.repos.d/rhel-source.repo

[rhel-source]

name=Red Hat Enterprise Linux $releasever - $basearch - Source

#baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/SRPMS/

baseurl=file:///mnt/Server

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[root@racdb2 ~]# yum install gcc gcc-c glibc glibc-devel libstdc libstdc++-devel libaio libaio-devel make sysstat binutils compat-libcap1 compat-libstdc

 

4.修改系统参数(两个节点都需要操作,两个节点的操作相同)

[root@racdb2 ~]# vi /etc/security/limits.conf

加入

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

oragrid soft nproc 2047

oragrid hard nproc 16384

oragrid soft nofile 1024

oragrid hard nofile 65536

 

[root@racdb2 ~]# vi /etc/pam.d/login

加入

session required /lib/security/pam_limits.so

 

 

[root@racdb2 ~]# vi /etc/sysctl.conf

加入

kernel.shmall = 4294967296

kernel.shmall = 4294967296

fs.aio-max-nr= 1048576

fs.file-max =6815744

kernel.shmall= 8388608

kernel.shmmax= 34359738368

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

 

sysctl –p或者重启生效

 

 

 

 

5.修改用户的环境变量(两个节点都需要操作)

[root@racdb1 ~]# su - oracle

[oracle@racdb1 ~]$ vi .bash_profile

加入

export PATH

export TMP=/tmp

export TMPDIR=$TMP

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1

export ORACLE_SID=racdb1

export ORACLE_TERM=xterm

export PATH=/usr/sbin:$PATH

export PATH=$ORACLE_HOME/bin:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin/

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

ulimit -u 16384 -n 65536

umask 022

 

[root@racdb1 ~]# su – oragrid

加入

export ORACLE_SID=+ASM1

export ORACLE_BASE=/u01/app/grid

export ORACLE_HOME=/u01/app/11.2.0/grid

export PATH=$PATH:$ORACLE_HOME/bin

 

 

 

6.修改hosts文件(两个节点)

[root@racdb1 ~]# vi /etc/hosts

加入

172.16.99.116  racdb1

172.16.99.117  racdb2

172.16.99.118  racdb1-vip

172.16.99.119  racdb2-vip

100.100.100.116  racdb1-priv

100.100.100.117  racdb2-priv

172.16.99.120 racdb-scan

 

 

7.配置ASM

[root@racdb1 ~]# fdisk -l

 

Disk /dev/sda: 85.9 GB, 85899345920 bytes

255 heads, 63 sectors/track, 10443 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x000b2cb8

 

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1          26      204800   83  Linux

Partition 1 does not end on cylinder boundary.

/dev/sda2              26        3942    31457280   83  Linux

/dev/sda3            3942        4987     8388608   82  Linux swap / Solaris

/dev/sda4            4987       10444    43834368    5  Extended

/dev/sda5            4987       10444    43833344   83  Linux

 

Disk /dev/sdc: 10.7 GB, 10737418240 bytes

255 heads, 63 sectors/track, 1305 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

 

 

Disk /dev/sdd: 10.7 GB, 10737418240 bytes

255 heads, 63 sectors/track, 1305 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

 

 

Disk /dev/sde: 42.9 GB, 42949672960 bytes

255 heads, 63 sectors/track, 5221 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

 

 

Disk /dev/sdb: 10.7 GB, 10737418240 bytes

255 heads, 63 sectors/track, 1305 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

 

 

Disk /dev/sdf: 42.9 GB, 42949672960 bytes

255 heads, 63 sectors/track, 5221 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

 

 

Disk /dev/sdg: 42.9 GB, 42949672960 bytes

255 heads, 63 sectors/track, 5221 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

 

[root@racdb1 ~]# 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=\"oragrid\", GROUP=\"asmadmin\", MODE=\"0660\"" 

> done 

KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36000c29a75fdf60bbfdc06bd164b85f5", NAME="asm-diskb", OWNER="oragrid", GROUP="asmadmin", MODE="0660"

KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36000c295b02469326ca564dc37efdd43", NAME="asm-diskc", OWNER="oragrid", GROUP="asmadmin", MODE="0660"

KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36000c29c99a475d3388e8f35b5c14dbb", NAME="asm-diskd", OWNER="oragrid", GROUP="asmadmin", MODE="0660"

KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36000c292c839e27e651b67cafb5ab47b", NAME="asm-diske", OWNER="oragrid", GROUP="asmadmin", MODE="0660"

KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36000c2995587ba1bfe144e35112d84e8", NAME="asm-diskf", OWNER="oragrid", GROUP="asmadmin", MODE="0660"

KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36000c298f2e0767288c2dd09c9e819d7", NAME="asm-diskg", OWNER="oragrid", GROUP="asmadmin", MODE="0660"

 

将输出结果加入到/etc/udev/rules.d/99-oracle-asmdevices.rules文件中(这个文件需要新建)

[root@racdb1 ~]# cat /etc/udev/rules.d/99-oracle-asmdevices.rules

KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36000c29a75fdf60bbfdc06bd164b85f5", NAME="asm-diskb", OWNER="oragrid", GROUP="asmadmin", MODE="0660"

KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36000c295b02469326ca564dc37efdd43", NAME="asm-diskc", OWNER="oragrid", GROUP="asmadmin", MODE="0660"

KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36000c29c99a475d3388e8f35b5c14dbb", NAME="asm-diskd", OWNER="oragrid", GROUP="asmadmin", MODE="0660"

KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36000c292c839e27e651b67cafb5ab47b", NAME="asm-diske", OWNER="oragrid", GROUP="asmadmin", MODE="0660"

KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36000c2995587ba1bfe144e35112d84e8", NAME="asm-diskf", OWNER="oragrid", GROUP="asmadmin", MODE="0660"

KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36000c298f2e0767288c2dd09c9e819d7", NAME="asm-diskg", OWNER="oragrid", GROUP="asmadmin", MODE="0660"

 

[root@racdb1 ~]# scp /etc/udev/rules.d/99-oracle-asmdevices.rules root@172.16.99.117:/etc/udev/rules.d/99-oracle-asmdevices.rules

The authenticity of host '172.16.99.117 (172.16.99.117)' can't be established.

RSA key fingerprint is 37:fe:84:65:60:55:fc:c4:6b:07:4d:f0:51:b7:f7:c6.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added '172.16.99.117' (RSA) to the list of known hosts.

root@172.16.99.117's password:

99-oracle-asmdevices.rules                                                                                                                                   100% 1314     1.3KB/s   00:00 

 

[root@racdb1 u01]# start_udev

Starting udev: [  OK  ]

[root@racdb1 u01]#

[root@racdb1 u01]# ll /dev/asm-disk*

brw-rw----. 1 oragrid asmadmin 8, 16 Jun 21 22:23 /dev/asm-diskb

brw-rw----. 1 oragrid asmadmin 8, 32 Jun 21 22:23 /dev/asm-diskc

brw-rw----. 1 oragrid asmadmin 8, 48 Jun 21 22:23 /dev/asm-diskd

brw-rw----. 1 oragrid asmadmin 8, 64 Jun 21 22:23 /dev/asm-diske

brw-rw----. 1 oragrid asmadmin 8, 80 Jun 21 22:23 /dev/asm-diskf

brw-rw----. 1 oragrid asmadmin 8, 96 Jun 21 22:23 /dev/asm-diskg

 

[root@racdb2 ~]# start_udev

Starting udev: [  OK  ]

[root@racdb2 ~]# ll /dev/asm-disk*

brw-rw----. 1 oragrid asmadmin 8, 16 Jun 21 22:23 /dev/asm-diskb

brw-rw----. 1 oragrid asmadmin 8, 32 Jun 21 22:23 /dev/asm-diskc

brw-rw----. 1 oragrid asmadmin 8, 48 Jun 21 22:23 /dev/asm-diskd

brw-rw----. 1 oragrid asmadmin 8, 64 Jun 21 22:23 /dev/asm-diske

brw-rw----. 1 oragrid asmadmin 8, 80 Jun 21 22:23 /dev/asm-diskf

brw-rw----. 1 oragrid asmadmin 8, 96 Jun 21 22:23 /dev/asm-diskg

 

8.配置NTP

[root@racdb1 ~]# cat /etc/ntp.conf

加入如下

server 172.16.99.116

server 127.127.1.0 # local clock

fudge 127.127.1.0 stratum 11

driftfile /var/lib/ntp/drift

Broadcastdelay 0.008

 

[root@racdb1 ~]# service ntpd start

Starting ntpd: [  OK  ]

[root@racdb1 ~]# chkconfig ntpd on

[root@racdb1 ~]# chkconfig ntpd --list

ntpd            0:off   1:off   2:on    3:on    4:on    5:on    6:off

[root@racdb1 ~]# service ntpd status

ntpd (pid  2320) is running...

 

[root@racdb2 ~]# vi /etc/ntp.conf

server 172.16.20.116 prefer

driftfile /var/lib/ntp/drift

Broadcastdelay 0.008

[root@racdb2 ~]# chkconfig ntpd off

[root@racdb2 ~]# chkconfig ntpd --list

ntpd            0:off   1:off   2:off   3:off   4:off   5:off   6:off

 

[root@racdb2 ~]# crontab -l

* * * * *  /usr/sbin/ntpdate 172.16.99.116

 

 

9.Grid安装









这个错误是由于racdb1,racdb2的防火墙开启了,

Service iptables stop

Chkconfig iptables off 即可



Oracle Grid 11.2.0.4 安装是出现"INS-30510: Insufficient number of ASM disks selected."

错误的原因是由于磁盘数和冗余层级不匹配:

如果创建用来存放OCR和VOTEDISK的ASM磁盘组,那么External、Normal、High三种冗余级别对应的Failgroup个数是1、3、5。也就是说,创建这三种冗余级别的磁盘组至少分别需要1、3、5个ASM磁盘。

如果创建用于非OCR和VOTEDISK存储的ASM磁盘组,那么External、Normal、High三种冗余级别对应的Failgroup至少是1、2、3。也就是说,创建这三种冗余级别的磁盘组至少分别需要1、2、3个ASM磁盘。

如果没有遵循创建ASM磁盘组的规则,将收到以下报错信息:

INS-30510: Insufficient number of ASM disks selected.








[root@racdb1 database]# /u01/app/oraInventory/orainstRoot.sh

Changing permissions of /u01/app/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions for world.

 

Changing groupname of /u01/app/oraInventory to oinstall.

The execution of the script is complete.

 

[root@racdb2 Packages]# /u01/app/oraInventory/orainstRoot.sh

Changing permissions of /u01/app/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions for world.

 

Changing groupname of /u01/app/oraInventory to oinstall.

The execution of the script is complete.

 

 

[root@racdb1 database]# /u01/app/11.2.0/grid/root.sh

Performing root user operation for Oracle 11g

 

The following environment variables are set as:

    ORACLE_OWNER= oragrid

    ORACLE_HOME=  /u01/app/11.2.0/grid

 

Enter the full pathname of the local bin directory: [/usr/local/bin]:

   Copying dbhome to /usr/local/bin ...

   Copying oraenv to /usr/local/bin ...

   Copying coraenv to /usr/local/bin ...

 

 

Creating /etc/oratab file...

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root script.

Now product-specific root actions will be performed.

Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params

Creating trace directory

User ignored Prerequisites during installation

Installing Trace File Analyzer

OLR initialization - successful

  root wallet

  root wallet cert

  root cert export

  peer wallet

  profile reader wallet

  pa wallet

  peer wallet keys

  pa wallet keys

  peer cert request

  pa cert request

  peer cert

  pa cert

  peer root cert TP

  profile reader root cert TP

  pa root cert TP

  peer pa cert TP

  pa peer cert TP

  profile reader pa cert TP

  profile reader peer cert TP

  peer user cert

  pa user cert

Adding Clusterware entries to upstart

CRS-2672: Attempting to start 'ora.mdnsd' on 'racdb1'

CRS-2676: Start of 'ora.mdnsd' on 'racdb1' succeeded

CRS-2672: Attempting to start 'ora.gpnpd' on 'racdb1'

CRS-2676: Start of 'ora.gpnpd' on 'racdb1' succeeded

CRS-2672: Attempting to start 'ora.cssdmonitor' on 'racdb1'

CRS-2672: Attempting to start 'ora.gipcd' on 'racdb1'

CRS-2676: Start of 'ora.cssdmonitor' on 'racdb1' succeeded

CRS-2676: Start of 'ora.gipcd' on 'racdb1' succeeded

CRS-2672: Attempting to start 'ora.cssd' on 'racdb1'

CRS-2672: Attempting to start 'ora.diskmon' on 'racdb1'

CRS-2676: Start of 'ora.diskmon' on 'racdb1' succeeded

CRS-2676: Start of 'ora.cssd' on 'racdb1' succeeded

 

ASM created and started successfully.

 

Disk Group CRS created successfully.

 

clscfg: -install mode specified

Successfully accumulated necessary OCR keys.

Creating OCR keys for user 'root', privgrp 'root'..

Operation successful.

CRS-4256: Updating the profile

Successful addition of voting disk 72f5dca39c394fd0bfb955ea8ae183b6.

Successful addition of voting disk 299337ce3b834f1dbf9b5bd8c0ee4906.

Successful addition of voting disk 90989711f70c4f00bf07e11629a08e93.

Successfully replaced voting disk group with +CRS.

CRS-4256: Updating the profile

CRS-4266: Voting file(s) successfully replaced

##  STATE    File Universal Id                File Name Disk group

--  -----    -----------------                --------- ---------

 1. ONLINE   72f5dca39c394fd0bfb955ea8ae183b6 (/dev/asm-diskb) [CRS]

 2. ONLINE   299337ce3b834f1dbf9b5bd8c0ee4906 (/dev/asm-diskc) [CRS]

 3. ONLINE   90989711f70c4f00bf07e11629a08e93 (/dev/asm-diskd) [CRS]

Located 3 voting disk(s).

CRS-2672: Attempting to start 'ora.asm' on 'racdb1'

CRS-2676: Start of 'ora.asm' on 'racdb1' succeeded

CRS-2672: Attempting to start 'ora.CRS.dg' on 'racdb1'

CRS-2676: Start of 'ora.CRS.dg' on 'racdb1' succeeded

Configure Oracle Grid Infrastructure for a Cluster ... succeeded

 

 

[root@racdb2 Packages]# /u01/app/11.2.0/grid/root.sh

Performing root user operation for Oracle 11g

 

The following environment variables are set as:

    ORACLE_OWNER= oragrid

    ORACLE_HOME=  /u01/app/11.2.0/grid

 

Enter the full pathname of the local bin directory: [/usr/local/bin]:

   Copying dbhome to /usr/local/bin ...

   Copying oraenv to /usr/local/bin ...

   Copying coraenv to /usr/local/bin ...

 

 

Creating /etc/oratab file...

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root script.

Now product-specific root actions will be performed.

Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params

Creating trace directory

User ignored Prerequisites during installation

Installing Trace File Analyzer

OLR initialization - successful

Adding Clusterware entries to upstart

 

CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node racdb1, number 1, and is terminating

An active cluster was found during exclusive startup, restarting to join the cluster

Configure Oracle Grid Infrastructure for a Cluster ... succeeded



10.ASMCA 创建asm disk

[oragrid@racdb1 grid]$ asmca






11.Oracle software安装
















[root@racdb2 dbhome_1]# /u01/app/oraInventory/orainstRoot.sh

Changing permissions of /u01/app/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions for world.

 

Changing groupname of /u01/app/oraInventory to oinstall.

The execution of the script is complete.

 

[root@racdb1 database]# /u01/app/oracle/product/11.2.0/dbhome_1/root.sh

Performing root user operation for Oracle 11g

 

The following environment variables are set as:

    ORACLE_OWNER= oracle

    ORACLE_HOME=  /u01/app/oracle/product/11.2.0/dbhome_1

 

Enter the full pathname of the local bin directory: [/usr/local/bin]:

The contents of "dbhome" have not changed. No need to overwrite.

The contents of "oraenv" have not changed. No need to overwrite.

The contents of "coraenv" have not changed. No need to overwrite.

 

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root script.

Now product-specific root actions will be performed.

Finished product-specific root actions.

 

 

[root@racdb2 dbhome_1]# /u01/app/oracle/product/11.2.0/dbhome_1/root.sh

Performing root user operation for Oracle 11g

 

The following environment variables are set as:

    ORACLE_OWNER= oracle

    ORACLE_HOME=  /u01/app/oracle/product/11.2.0/dbhome_1

 

Enter the full pathname of the local bin directory: [/usr/local/bin]:

The contents of "dbhome" have not changed. No need to overwrite.

The contents of "oraenv" have not changed. No need to overwrite.

The contents of "coraenv" have not changed. No need to overwrite.

 

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root script.

Now product-specific root actions will be performed.

Finished product-specific root actions.

You have new mail in /var/spool/mail/root

 

12.DBCA

Create database

[oracle@racdb1 database]$ dbca














安装完成

 

 

[root@racdb1 ~]# crsctl stat res -t

--------------------------------------------------------------------------------

NAME           TARGET  STATE        SERVER                   STATE_DETAILS      

--------------------------------------------------------------------------------

Local Resources

--------------------------------------------------------------------------------

ora.CRS.dg

               ONLINE  ONLINE       racdb1                                      

               ONLINE  ONLINE       racdb2                                       

ora.DATA.dg

               ONLINE  ONLINE       racdb1                                      

               ONLINE  ONLINE       racdb2                                      

ora.FRA.dg

               ONLINE  ONLINE       racdb1                                       

               ONLINE  ONLINE       racdb2                                      

ora.LISTENER.lsnr

               ONLINE  ONLINE       racdb1                                      

               ONLINE  ONLINE       racdb2                                       

ora.asm

               ONLINE  ONLINE       racdb1                   Started            

               ONLINE  ONLINE       racdb2                   Started            

ora.gsd

               OFFLINE OFFLINE      racdb1                                      

               OFFLINE OFFLINE      racdb2                                      

ora.net1.network

               ONLINE  ONLINE       racdb1                                       

               ONLINE  ONLINE       racdb2                                      

ora.ons

               ONLINE  ONLINE       racdb1                                      

               ONLINE  ONLINE       racdb2                                       

ora.registry.acfs

               ONLINE  ONLINE       racdb1                                      

               ONLINE  ONLINE       racdb2                                      

--------------------------------------------------------------------------------

Cluster Resources

--------------------------------------------------------------------------------

ora.LISTENER_SCAN1.lsnr

      1        ONLINE  ONLINE       racdb2                                      

ora.cvu

      1        ONLINE  ONLINE       racdb2                                      

ora.oc4j

      1        ONLINE  ONLINE       racdb2                                      

ora.racdb.db

      1        ONLINE  ONLINE       racdb1                   Open               

      2        ONLINE  ONLINE       racdb2                   Open               

ora.racdb1.vip

      1        ONLINE  ONLINE       racdb1                                      

ora.racdb2.vip

      1        ONLINE  ONLINE       racdb2                                      

ora.scan1.vip

      1        ONLINE  ONLINE       racdb2              

 

 

13.tnsnames.ora配置

racdb =

  (DESCRIPTION =

    (ADDRESS_LIST =

      (FAILOVER = ON)

      (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.99.118)(PORT = 1521))

      (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.99.119)(PORT = 1521))

      (LOAD_BALANCE = yes)

    )

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = racdb)

      (FAILOVER_MODE =

        (TYPE = SESSION)

        (METHOD = BASIC)

        (RETRIES = 180)

        (DELAY = 5)

      )

    )

  )



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

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

注册时间:2010-07-13

  • 博文量
    406
  • 访问量
    1208670