虚拟化容器,大数据,DBA,中间件,监控。

RedHat5.5+IBM DS4800+Oracle10g RAC+LVM安装

28 10月
作者:admin|分类:DBA运维

RedHat5.5+IBM DS4800+Oracle10g RAC+LVM安装


作者 阿九【转载时请务必以超链接形式标明文章原始出处和作者信息】


目        录... 1

一、硬件环境... 3

二、软件环境... 3

三、IP地址及主机名规划... 3

四、RDAC安装... 3

4.1、解压RDAC安装包... 3

4.2、编译安装包... 3

4.3、安装RDAC.. 4

4.4、修改启动项并加载新安装内核... 4

五、为Oracle配置操作系统... 4

5.1、新建oinstall和 dba 组... 4

5.2、新建oracle用户... 5

5.3、配置host文件... 5

5.4、修改主机名... 5

5.5、提高oracle用户shell限制... 6

5.6、配置内核参数... 6

5.7、配置用户等效性... 7

5.8、配置oracle用户环境变量... 9

5.9、创建安装目录... 10

六、使用LVM配置存储... 11

6.1、查看存储... 11

6.2、对磁盘分区... 12

6.3、创建PV.. 15

6.4、创建VG.. 16

6.5、创建LV.. 17

6.6.、映射RAW... 19

6.7、更改RAW权限... 21

6.8、永久更改RAW权限... 22

6.9、编辑oracle安装时使用的RAW配置文件... 22

七、安装OracleClusterware. 23

7.1、解压文件... 23

7.2、启动安装界面... 23

7.3、执行root脚本... 33

7.4、调用vipca. 35

八、安装数据库软件... 37

8.1、启动安装界面... 37

8.2、执行root脚本... 45

九、配置监听... 48

十、升级数据库及Clusterware. 57

10.1、升级Clusterware. 58

10.2、升级Databse. 64

十一、安装数据库... 74

11.1、启动安装界面... 74

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RedHat5.5+IBMDS4800+Oracle 10g RAC+LVM

 

 

 

一、硬件环境

主机:IBM X365 M3   2台

存储:DS4800 (共分配6个LUN总计300G)

HBA卡:4块(一台2块)

 

二、软件环境

操作系统:RedHat5.5

数据库:Oracle 10g

集群件:OracleClusterware 10g

多路径软件:RDAC

 

三、IP地址及主机名规划

 

IP地址

主机名

156.16.34.24

mhdb01

10.0.0.24

mhdb01-priv

156.16.34.26

mhdb01-vip

156.16.34.25

mhdb02

10.0.0.25

mhdb02-priv

156.16.34.27

mhdb02-vip

 

注意:操作系统安装时选择全部全部软件包

 

四、RDAC安装

以root用户登录。在两节上执行

 

4.1、解压 RDAC安装包

 [root@localhostsoftware]# tar -zvxf rdac-LINUX-09.03.0C05.0233-source.tar.gz

 

4.2、编译安装包

[root@localhost software]# cd linuxrdac-09.03.0C05.0233/

[root@localhost linuxrdac-09.03.0C05.0233]#make

 

4.3、安装RDAC

 [root@localhost linuxrdac-09.03.0C05.0233]#make install

 

4.4、修改启动项并加载新安装内核

编辑/boot/grub/menu.lst文件,加入红字部分

# grub.conf generated by anaconda

#

# Note that you do not have to rerun grubafter making changes to this file

# NOTICE: You have a /boot partition.  Thismeans that

#         all kernel and initrd paths are relative to /boot/, eg.

#         root (hd0,0)

#         kernel /vmlinuz-version ro root=/dev/sda6

#         initrd /initrd-version.img

#boot=/dev/sda

default=0

timeout=5

splashimage=(hd0,0)/grub/splash.xpm.gz

hiddenmenu

title Red Hat Linux (2.6.18-194.el5)with MPP support

        root (hd0,0)

        kernel /vmlinuz-2.6.18-194.el5ro root=LABEL=/ rhgb quiet

        initrd /mpp-2.6.18-194.el5.img

title Red Hat Enterprise Linux Server (2.6.18-194.el5)

       root (hd0,0)

       kernel /vmlinuz-2.6.18-194.el5 roroot=LABEL=/ rhgb quiet

       initrd /initrd-2.6.18-194.el5.img

完成后,重启系统

 

五、为Oracle配置操作系统

 

5.1、新建oinstall 和 dba 组

以root用户登录,在两节点上执行

 

[root@localhost /]# groupadd -g 200oinstall

[root@localhost linuxrdac-09.03.0C05.0233]#groupadd -g 201 dba

 

5.2、新建oracle用户

以root用户登录,在两节点上执行

 

[root@localhost /# useradd -u 201 -g oinstall-G dba oracle

[root@localhost /]# passwd oracle

Changing password for user oracle.

New UNIX password:

BAD PASSWORD: it is based on a dictionaryword

Retype new UNIX password:

passwd: all authentication tokens updatedsuccessfully.

[root@localhost linuxrdac-09.03.0C05.0233]#

 

5.3、配置host文件

以root用户登录,在两节点上执行

 

编辑/etc/hosts文件,加入如下红字内容内容

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

 

# Do not remove the following line, orvarious programs

# that require network functionality willfail.

127.0.0.1               localhost.localdomain localhost

::1             localhost6.localdomain6 localhost6

#######public###########

156.16.34.24    mhdb01

156.16.34.25    mhdb02

 

#######vip###############

156.16.34.26    mhdb01-vip

156.16.34.27    mhdb02-vip

 

#######priv#############

10.0.0.24      mhdb01-priv

10.0.0.25      mhdb02-priv

 

5.4、修改主机名

以root用户登录,在两节点上执行

 

编辑/etc/sysconfig/network

[root@localhost /]# vi/etc/sysconfig/network

 

NETWORKING=yes

NETWORKING_IPV6=no

HOSTNAME=mhdb02

 

完成后,重启服务

[root@localhost /]# service network restart

Shutting down interface eth0:  [ OK  ]

Shutting down interface eth1:  [ OK  ]

Shutting down loopback interface:  [ OK  ]

Bringing up loopback interface:  [ OK  ]

Bringing up interface eth0:  [ OK  ]

Bringing up interface eth1:  [ OK  ]

 

检查主机名修改成功

[root@localhost /]# hostname

mhdb02

[root@localhost /]#

 

5.5、提高oracle用户shell限制

以root用户登录,在两节点上执行

 

编辑/etc/security/limits.conf、/etc/pam.d/login 和 /etc/profile添加如下内容:

/etc/security/limits.conf

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

 

/etc/pam.d/login

session required /lib/security/pam_limits.so

 

/etc/profile

if [ $USER = "oracle" ]; then

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

       ulimit -p 16384

       ulimit -n 65536

    else

       ulimit -u 16384 -n 65536

    fi

fi

 

5.6、配置内核参数

以root用户登录,在两节点上执行

 

编辑/etc/sysctl.conf文件,加入如下内容:

kernel.shmmni                = 4096

kernel.sem                   = 25032000 100 128

fs.file-max                  = 65536

net.ipv4.ip_local_port_range = 1024 65000

net.core.rmem_default        =1048576

net.core.rmem_max            =1048576

net.core.wmem_default        = 262144

net.core.wmem_max            = 262144

 

要使内核参数立即生效,执行:/sbin/sysctl -p

 

5.7、配置用户等效性

以oracle用户登录,在两节点上执行

 

mhdb02

 [oracle@mhdb02 ~]$ mkdir~/.ssh

[oracle@mhdb02 ~]$ chmod700 ~/.ssh

[oracle@mhdb02 ~]$ ssh-keygen-t rsa

Generating public/private rsa key pair.

Enter file in which to save the key (/home/oracle/.ssh/id_rsa):

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in/home/oracle/.ssh/id_rsa.

Your public key has been saved in/home/oracle/.ssh/id_rsa.pub.

The key fingerprint is:

33:84:08:14:e4:24:fb:38:77:6b:5c:65:8c:1d:df:e2 oracle@mhdb02

[oracle@mhdb02 ~]$ ssh-keygen-t dsa

Generating public/private dsa key pair.

Enter file in which to save the key(/home/oracle/.ssh/id_dsa):

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in/home/oracle/.ssh/id_dsa.

Your public key has been saved in/home/oracle/.ssh/id_dsa.pub.

The key fingerprint is:

bd:85:bd:1f:b4:bf:9c:01:7d:c9:bb:3e:8f:8d:6b:5e oracle@mhdb02

[oracle@mhdb02 ~]$

 

mhdb01

[oracle@mhdb01 ~]$ mkdir~/.ssh

[oracle@mhdb01 ~]$ chmod700 ~/.ssh

[oracle@mhdb01 ~]$ ssh-keygen-t rsa

Generating public/private rsa key pair.

Enter file in which to save the key(/home/oracle/.ssh/id_rsa):

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in/home/oracle/.ssh/id_rsa.

Your public key has been saved in/home/oracle/.ssh/id_rsa.pub.

The key fingerprint is:

fb:c0:3f:93:a7:39:0d:71:78:a3:d3:a3:d0:11:fa:ddoracle@mhdb01

[oracle@mhdb01 ~]$ ssh-keygen-t dsa

Generating public/private dsa key pair.

Enter file in which to save the key(/home/oracle/.ssh/id_dsa):

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in/home/oracle/.ssh/id_dsa.

Your public key has been saved in/home/oracle/.ssh/id_dsa.pub.

The key fingerprint is:

1f:f2:73:cf:3d:f3:dc:46:5d:d3:1d:ce:4f:a9:9f:83oracle@mhdb01

[oracle@mhdb01 ~]$

 

在mhdb01上执行如下命令

[oracle@mhdb01 ~]$ cat~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

[oracle@mhdb01 ~]$ cat~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

[oracle@mhdb01 ~]$ sshmhdb02 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

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

RSA key fingerprint is 97:26:cf:40:80:28:3b:54:1f:93:a2:ca:97:fa:0b:6f.

Are you sure you want to continueconnecting (yes/no)? yes

Warning: Permanently added'mhdb02,156.16.34.25' (RSA) to the list of known hosts.

oracle@mhdb02's password:

[oracle@mhdb01 ~]$ sshmhdb02 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

oracle@mhdb02's password:

[oracle@mhdb01 ~]$ scp~/.ssh/authorized_keys mhdb02:~/.ssh/authorized_keys

oracle@mhdb02's password:

authorized_keys                                                                                  100% 1996     2.0KB/s  00:00   

[oracle@mhdb01 ~]$

 

在mhdb02上执行如下命令

[oracle@mhdb02 ~]$ cat~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

[oracle@mhdb02 ~]$ cat~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

[oracle@mhdb02 ~]$ sshmhdb01 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

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

RSA key fingerprint is99:c1:06:9d:6b:6d:d4:4d:2f:13:da:da:a0:28:81:03.

Are you sure you want to continueconnecting (yes/no)? yes

Warning: Permanently added'mhdb01,156.16.34.24' (RSA) to the list of known hosts.

[oracle@mhdb02 ~]$ sshmhdb01 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

[oracle@mhdb02 ~]$

 

在两个节点上,以oracle用户分别执行如下命令,如不提示输入密码正配置正确

ssh rac1 date

ssh rac2 date

ssh rac1-priv date

ssh rac2-priv date

ssh rac1.localdomain.com date

ssh rac2.localdomain.com date

ssh rac1-priv.localdomain.com date

ssh rac2-priv.localdomain.com date

 

5.8、配置oracle用户环境变量

以oracle用户登录,在两节点上执行

 

mhdb01

 

编辑/home/oracle/.bash_profile

[oracle@mhdb01 ~]$ pwd

/home/oracle

[oracle@mhdb01 ~]$ vi .bash_profile

 

# .bash_profile

 

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

       . ~/.bashrc

fi

 

# User specific environment and startupprograms

 

export EDITOR=vi

export ORACLE_SID=mhdb1

export ORACLE_BASE=/oracle

export ORACLE_HOME=$ORACLE_BASE/db10g

export ORA_CRS_HOME=$ORACLE_BASE/crs

export LD_LIBRARY_PATH=$ORACLE_HOME/lib

exportPATH=$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin

export NLS_LANG='SimplifiedChinese_China'.ZHS16GBK

umask 022

 

#PATH=$PATH:$HOME/bin

 

#export PATH

 

mhdb02

 

[oracle@mhdb02 ~]$ pwd

/home/oracle

[oracle@mhdb02 ~]$ vi .bash_profile

 

# .bash_profile

 

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

       . ~/.bashrc

fi

 

# User specific environment and startupprograms

 

export EDITOR=vi

export ORACLE_SID=mhdb2

export ORACLE_BASE=/oracle

export ORACLE_HOME=$ORACLE_BASE/db10g

export ORA_CRS_HOME=$ORACLE_BASE/crs

export LD_LIBRARY_PATH=$ORACLE_HOME/lib

exportPATH=$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin

export NLS_LANG='SimplifiedChinese_China'.ZHS16GBK

umask 022

 

#PATH=$PATH:$HOME/bin

 

#export PATH

 

如果想环境变量立即生效,执行命令:. ~/.bash_profile

 

5.9、创建安装目录

以root用户执行

mhdb01

[root@localhost ~]# mkdir /oracle

[root@localhost ~]# chown oracle:oinstall/oracle

 

mhdb02

[root@localhost /]# mkdir /oracle

[root@localhost /]# chown oracle:oinstall/oracle

 

以oracle用户执行

 

mhdb01

[oracle@mhdb01 ~]$ mkdir -p $ORACLE_HOME

[oracle@mhdb01 ~]$ mkdir -p $ORA_CRS_HOME

 

mhdb02

[oracle@mhdb02 ~]$ mkdir -p $ORACLE_HOME

[oracle@mhdb02 ~]$ mkdir -p $ORA_CRS_HOME

 

 

六、使用LVM配置存储

以root用户在mhdb01上执行

 

6.1、查看存储

[root@localhost ~]# fdisk -l

 

Disk /dev/sda: 437.9 GB, 437998583808 bytes

255 heads, 63 sectors/track, 53250cylinders

Units = cylinders of 16065 * 512 = 8225280bytes

 

  Device Boot      Start         End      Blocks  Id  System

/dev/sda1  *           1         127    1020096   83  Linux

/dev/sda2             128        5226   40957717+  83  Linux

/dev/sda3            5227        7266   16386300   82  Linux swap / Solaris

/dev/sda4            7267       53250  369366480    5  Extended

/dev/sda5            7267        8541   10241406   83  Linux

/dev/sda6            8542       53250  359125011   83  Linux

 

Disk /dev/sdb: 53.6 GB, 53687091200 bytes

64 heads, 32 sectors/track, 51200 cylinders

Units = cylinders of 2048 * 512 = 1048576bytes

 

  Device Boot      Start         End      Blocks  Id  System

 

Disk /dev/sdc: 53.6 GB, 53687091200 bytes

64 heads, 32 sectors/track, 51200 cylinders

Units = cylinders of 2048 * 512 = 1048576bytes

 

Disk /dev/sdc doesn't contain a validpartition table

 

Disk /dev/sdd: 53.6 GB, 53687091200 bytes

64 heads, 32 sectors/track, 51200 cylinders

Units = cylinders of 2048 * 512 = 1048576bytes

 

Disk /dev/sdd doesn't contain a validpartition table

 

Disk /dev/sde: 53.6 GB, 53687091200 bytes

64 heads, 32 sectors/track, 51200 cylinders

Units = cylinders of 2048 * 512 = 1048576bytes

 

Disk /dev/sde doesn't contain a validpartition table

 

Disk /dev/sdf: 53.6 GB, 53687091200 bytes

64 heads, 32 sectors/track, 51200 cylinders

Units = cylinders of 2048 * 512 = 1048576bytes

 

Disk /dev/sdf doesn't contain a validpartition table

 

Disk /dev/sdg: 53.6 GB, 53687091200 bytes

64 heads, 32 sectors/track, 51200 cylinders

Units = cylinders of 2048 * 512 = 1048576bytes

 

Disk /dev/sdg doesn't contain a validpartition table

[root@localhost ~]#

 

 

6.2、对磁盘分区

 

以root用户执行

先对/dev/sdb进行分区

[root@localhost ~]# fdisk /dev/sdb

 

The number of cylinders for this disk isset to 51200.

There is nothing wrong with that, but thisis larger than 1024,

and could in certain setups cause problemswith:

1) software that runs at boot time (e.g.,old versions of LILO)

2) booting and partitioning software fromother OSs

  (e.g., DOS FDISK, OS/2 FDISK)

 

Command (m for help): n

Command action

  e   extended

  p   primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-51200, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK(1-51200, default 51200):

Using default value 51200

 

Command (m for help): t

Selected partition 1

Hex code (type L to list codes): 8e

Changed system type of partition 1 to 8e(Linux LVM)

 

Command (m for help): w

The partition table has been altered!

 

Calling ioctl() to re-read partition table.

Syncing disks.

[root@localhost ~]#

 

依次对剩余磁盘分区,最后结果为

 

[root@localhost ~]# fdisk -l

 

Disk /dev/sda: 437.9 GB, 437998583808 bytes

255 heads, 63 sectors/track, 53250cylinders

Units = cylinders of 16065 * 512 = 8225280bytes

 

  Device Boot      Start         End      Blocks  Id  System

/dev/sda1  *           1         127    1020096   83  Linux

/dev/sda2             128        5226   40957717+  83  Linux

/dev/sda3            5227        7266   16386300   82  Linux swap / Solaris

/dev/sda4            7267       53250  369366480    5  Extended

/dev/sda5            7267        8541   10241406   83  Linux

/dev/sda6            8542       53250  359125011   83  Linux

 

Disk /dev/sdb: 53.6 GB, 53687091200 bytes

64 heads, 32 sectors/track, 51200 cylinders

Units = cylinders of 2048 * 512 = 1048576bytes

 

  Device Boot      Start         End      Blocks  Id  System

/dev/sdb1               1       51200   52428784   8e  Linux LVM

 

Disk /dev/sdc: 53.6 GB, 53687091200 bytes

64 heads, 32 sectors/track, 51200 cylinders

Units = cylinders of 2048 * 512 = 1048576bytes

 

  Device Boot      Start         End      Blocks  Id  System

/dev/sdc1               1       51200   52428784   8e Linux LVM

 

Disk /dev/sdd: 53.6 GB, 53687091200 bytes

64 heads, 32 sectors/track, 51200 cylinders

Units = cylinders of 2048 * 512 = 1048576bytes

 

  Device Boot      Start         End      Blocks  Id  System

/dev/sdd1               1       51200   52428784   8e  Linux LVM

 

Disk /dev/sde: 53.6 GB, 53687091200 bytes

64 heads, 32 sectors/track, 51200 cylinders

Units = cylinders of 2048 * 512 = 1048576bytes

 

  Device Boot      Start         End      Blocks  Id  System

/dev/sde1               1      51200    52428784   8e Linux LVM

 

Disk /dev/sdf: 53.6 GB, 53687091200 bytes

64 heads, 32 sectors/track, 51200 cylinders

Units = cylinders of 2048 * 512 = 1048576bytes

 

  Device Boot      Start         End      Blocks  Id  System

/dev/sdf1              1       51200   52428784   8e  Linux LVM

 

Disk /dev/sdg: 53.6 GB, 53687091200 bytes

64 heads, 32 sectors/track, 51200 cylinders

Units = cylinders of 2048 * 512 = 1048576bytes

 

  Device Boot      Start         End      Blocks  Id  System

/dev/sdg1               1       51200   52428784   8e  Linux LVM

 

 

在mhdb02上查看是否正确识别存储

[root@localhost /]# fdisk -l

 

Disk /dev/sda: 437.9 GB, 437998583808 bytes

255 heads, 63 sectors/track, 53250cylinders

Units = cylinders of 16065 * 512 = 8225280bytes

 

   DeviceBoot      Start         End      Blocks  Id  System

/dev/sda1  *           1         127    1020096   83  Linux

/dev/sda2             128        5226   40957717+  83  Linux

/dev/sda3            5227        7266   16386300   82  Linux swap / Solaris

/dev/sda4            7267       53250  369366480    5  Extended

/dev/sda5            7267        8541   10241406   83  Linux

/dev/sda6            8542       53250  359125011   83  Linux

 

Disk /dev/sdb: 53.6 GB, 53687091200 bytes

64 heads, 32 sectors/track, 51200 cylinders

Units = cylinders of 2048 * 512 = 1048576bytes

 

  Device Boot      Start         End      Blocks  Id  System

/dev/sdb1               1       51200   52428784   8e  Linux LVM

 

Disk /dev/sdc: 53.6 GB, 53687091200 bytes

64 heads, 32 sectors/track, 51200 cylinders

Units = cylinders of 2048 * 512 = 1048576bytes

 

  Device Boot      Start         End      Blocks  Id  System

/dev/sdc1               1       51200   52428784   8e  Linux LVM

 

Disk /dev/sdd: 53.6 GB, 53687091200 bytes

64 heads, 32 sectors/track, 51200 cylinders

Units = cylinders of 2048 * 512 = 1048576bytes

 

  Device Boot      Start         End      Blocks  Id  System

/dev/sdd1               1       51200   52428784   8e  Linux LVM

 

Disk /dev/sde: 53.6 GB, 53687091200 bytes

64 heads, 32 sectors/track, 51200 cylinders

Units = cylinders of 2048 * 512 = 1048576bytes

 

  Device Boot      Start         End      Blocks  Id  System

/dev/sde1               1       51200   52428784   8e  Linux LVM

 

Disk /dev/sdf: 53.6 GB, 53687091200 bytes

64 heads, 32 sectors/track, 51200 cylinders

Units = cylinders of 2048 * 512 = 1048576bytes

 

  Device Boot      Start         End      Blocks  Id  System

/dev/sdf1               1       51200   52428784   8e  Linux LVM

 

Disk /dev/sdg: 53.6 GB, 53687091200 bytes

64 heads, 32 sectors/track, 51200 cylinders

Units = cylinders of 2048 * 512 = 1048576bytes

 

  Device Boot      Start         End      Blocks  Id  System

/dev/sdg1               1       51200   52428784   8e  Linux LVM

 

 

6.3、创建PV

以root用户在mhdb01上执行

[root@localhost ~]# pvcreate /dev/sdb1/dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1 /dev/sdg1

 Physical volume "/dev/sdb1" successfully created

 Physical volume "/dev/sdc1" successfully created

 Physical volume "/dev/sdd1" successfully created

 Physical volume "/dev/sde1" successfully created

 Physical volume "/dev/sdf1" successfully created

 Physical volume "/dev/sdg1" successfully created

[root@localhost ~]# pvs

 PV         VG   Fmt Attr PSize  PFree

 /dev/sdb1       lvm2 --   50.00G50.00G

 /dev/sdc1       lvm2 --   50.00G50.00G

 /dev/sdd1       lvm2 --   50.00G50.00G

 /dev/sde1       lvm2 --   50.00G50.00G

 /dev/sdf1       lvm2 --   50.00G50.00G

 /dev/sdg1       lvm2 --   50.00G50.00G

[root@localhost ~]#

 

6.4、创建VG

以root用户在mhdb01上执行

[root@localhost ~]# vgcreate -s 4m datavg /dev/sdb1 /dev/sdc1 /dev/sdd1/dev/sde1 /dev/sdf1 /dev/sdg1

 Volume group "datavg" successfully created

[root@localhost ~]# vgs

 VG     #PV #LV #SN Attr   VSize  VFree 

 datavg   6   0   0 wz--n- 299.98G 299.98G

[root@localhost ~]#

 

 

在mhdb02上查看存储是否正确识别

以root用户在mhdb02上执行

如果不能识别,则在mhdb02上重建pv

[root@mhdb02 ~]# pvcreate /dev/sdb1/dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1 /dev/sdg1

 Can't initialize physical volume "/dev/sdb1" of volume group"datavg" without -ff

 Can't initialize physical volume "/dev/sdc1" of volume group"datavg" without -ff

 Can't initialize physical volume "/dev/sdd1" of volume group"datavg" without -ff

 Can't initialize physical volume "/dev/sde1" of volume group"datavg" without -ff

 Physical volume "/dev/sdf1" successfully created

 Physical volume "/dev/sdg1" successfully created

[root@mhdb02 ~]# pvs

 PV         VG     Fmt Attr PSize  PFree

 /dev/sdb1  datavg lvm2 a-  50.00G 50.00G

 /dev/sdc1  datavg lvm2 a-  50.00G 50.00G

 /dev/sdd1  datavg lvm2 a-  50.00G 50.00G

 /dev/sde1  datavg lvm2 a-  50.00G 50.00G

 /dev/sdf1         lvm2 --   50.00G50.00G

 /dev/sdg1         lvm2 --   50.00G50.00G

[root@mhdb02 ~]# vgs

 VG     #PV #LV #SN Attr   VSize  VFree 

 datavg   4   0   0wz--n- 199.98G 199.98G

[root@localhost ~]# vgextend datavg/dev/sdf1 /dev/sdg1

[root@mhdb02 ~]# vgs

 VG     #PV #LV #SN Attr   VSize  VFree 

 datavg   6   0   0wz--n- 299.98G 299.98G

[root@mhdb02 ~]# pvs

 PV         VG     Fmt Attr PSize  PFree

 /dev/sdb1  datavg lvm2 a-  50.00G 50.00G

 /dev/sdc1  datavg lvm2 a-  50.00G 50.00G

 /dev/sdd1  datavg lvm2 a-  50.00G 50.00G

 /dev/sde1  datavg lvm2 a-  50.00G 50.00G

 /dev/sdf1  datavg lvm2 a-  50.00G 50.00G

 /dev/sdg1  datavg lvm2 a-  50.00G 50.00G

 

 

6.5、创建LV

以root用户在mhdb01上执行

 

[root@localhost ~]# lvcreate -L 1028m -n ocr datavg

 Logical volume "ocr" created

[root@localhost ~]# lvcreate -L 1028m -n voting datavg

 Logical volume "voting" created

[root@localhost ~]# lvcreate -L 5128m -n system datavg

  Logicalvolume "system" created

[root@localhost ~]# lvcreate -L 5128m -n sysaux datavg

 Logical volume "sysaux" created

[root@localhost ~]# lvcreate -L 5128m -n undotbs1 datavg

 Logical volume "undotbs1" created

[root@localhost ~]# lvcreate -L 5128m -n undotbs2 datavg

 Logical volume "undotbs2" created

[root@localhost ~]# lvcreate -L 10248m -n users datavg

 Logical volume "users" created

[root@localhost ~]# lvcreate -L 2050m -n temp datavg

 Rounding up size to full physical extent 2.00 GB

 Logical volume "temp" created

[root@localhost ~]# lvcreate -L 2060m -n control1 datavg

 Logical volume "control1" created

[root@localhost ~]# lvcreate -L 2060m -n control2 datavg

 Logical volume "control2" created

[root@localhost ~]# lvcreate -L 2060m -n control3 datavg

 Logical volume "control3" created

[root@localhost ~]# lvcreate -L 100m -n spfile datavg

 Logical volume "spfile" created

[root@localhost ~]# lvcreate -L 200m -n redo1_1 datavg

 Logical volume "redo1_1" created

[root@localhost ~]# lvcreate -L 200m -n redo1_2 datavg

 Logical volume "redo1_2" created

[root@localhost ~]# lvcreate -L 200m -n redo1_3 datavg

 Logical volume "redo1_3" created

[root@localhost ~]# lvcreate -L 200m -n redo1_4 datavg

 Logical volume "redo1_4" created

[root@localhost ~]# lvcreate -L 200m -n redo2_1 datavg

 Logical volume "redo2_1" created

[root@localhost ~]# lvcreate -L 200m -n redo2_2 datavg

 Logical volume "redo2_2" created

[root@localhost ~]# lvcreate -L 200m -n redo2_3 datavg

 Logical volume "redo2_3" created

[root@localhost ~]# lvcreate -L 200m -n redo2_4 datavg

 Logical volume "redo2_4" created

[root@localhost ~]# lvcreate -L 100m -n pwdfile datavg

 Logical volume "pwdfile" created

[root@localhost ~]# lvcreate -L 10260m -n menhu01 datavg

 Logical volume "menhu01" created

[root@localhost ~]# lvcreate -L 20460m -n menhu01 datavg

 Logical volume "menhu01" created

[root@localhost ~]# lvcreate -L 10260m -n menhu_idx01 datavg

 Logical volume "menhu_idx01" created

[root@localhost ~]# lvcreate -L 10260m -n menhu_tmp01 datavg

 Logical volume "menhu_tmp01" created

[root@localhost ~]# lvscan

 ACTIVE           '/dev/datavg/ocr' [1.00 GB] inherit

 ACTIVE           '/dev/datavg/voting' [1.00 GB] inherit

 ACTIVE           '/dev/datavg/system' [5.01 GB] inherit

 ACTIVE            '/dev/datavg/sysaux' [5.01 GB] inherit

 ACTIVE           '/dev/datavg/undotbs1' [5.01 GB] inherit

 ACTIVE           '/dev/datavg/undotbs2' [5.01 GB] inherit

 ACTIVE           '/dev/datavg/users' [10.01 GB] inherit

 ACTIVE            '/dev/datavg/temp'[2.00 GB] inherit

 ACTIVE           '/dev/datavg/control1' [2.01 GB] inherit

 ACTIVE           '/dev/datavg/control2' [2.01 GB] inherit

 ACTIVE           '/dev/datavg/control3' [2.01 GB] inherit

 ACTIVE           '/dev/datavg/spfile' [100.00 MB] inherit

 ACTIVE           '/dev/datavg/redo1_1' [200.00 MB] inherit

 ACTIVE           '/dev/datavg/redo1_2' [200.00 MB] inherit

 ACTIVE           '/dev/datavg/redo1_3' [200.00 MB] inherit

 ACTIVE           '/dev/datavg/redo1_4' [200.00 MB] inherit

 ACTIVE           '/dev/datavg/redo2_1' [200.00 MB] inherit

 ACTIVE           '/dev/datavg/redo2_2' [200.00 MB] inherit

 ACTIVE           '/dev/datavg/redo2_3' [200.00 MB] inherit

 ACTIVE           '/dev/datavg/redo2_4' [200.00 MB] inherit

 ACTIVE           '/dev/datavg/pwdfile' [100.00 MB] inherit

 ACTIVE           '/dev/datavg/menhu01' [19.98 GB] inherit

 ACTIVE           '/dev/datavg/menhu_idx01' [10.02 GB] inherit

 ACTIVE           '/dev/datavg/menhu_tmp01' [10.02 GB] inherit

[root@localhost ~]#

 

 

查看mhdb02上LV情况

[root@mhdb02 ~]# lvscan

 inactive         '/dev/datavg/ocr' [1.00 GB] inherit

 inactive         '/dev/datavg/voting' [1.00 GB] inherit

 inactive         '/dev/datavg/system' [5.01 GB] inherit

 inactive          '/dev/datavg/sysaux'[5.01 GB] inherit

 inactive         '/dev/datavg/undotbs1' [5.01 GB] inherit

 inactive         '/dev/datavg/undotbs2' [5.01 GB] inherit

 inactive         '/dev/datavg/users' [10.01 GB] inherit

 inactive         '/dev/datavg/temp' [2.00 GB] inherit

 inactive         '/dev/datavg/control1' [2.01 GB] inherit

 inactive         '/dev/datavg/control2' [2.01 GB] inherit

 inactive         '/dev/datavg/control3' [2.01 GB] inherit

 inactive         '/dev/datavg/spfile' [100.00 MB] inherit

 inactive         '/dev/datavg/redo1_1' [200.00 MB] inherit

 inactive         '/dev/datavg/redo1_2' [200.00 MB] inherit

 inactive         '/dev/datavg/redo1_3' [200.00 MB] inherit

 inactive         '/dev/datavg/redo1_4' [200.00 MB] inherit

  inactive          '/dev/datavg/redo2_1' [200.00 MB]inherit

 inactive         '/dev/datavg/redo2_2' [200.00 MB] inherit

 inactive         '/dev/datavg/redo2_3' [200.00 MB] inherit

 inactive         '/dev/datavg/redo2_4' [200.00 MB] inherit

 inactive          '/dev/datavg/pwdfile' [100.00 MB]inherit

 inactive         '/dev/datavg/menhu01' [19.98 GB] inherit

 inactive         '/dev/datavg/menhu_idx01' [10.02 GB] inherit

 inactive         '/dev/datavg/menhu_tmp01' [10.02 GB] inherit

[root@mhdb02 ~]#

 

激活LV,使用vgchange –a –n /dev/datavg/ocr 命令

 

6.6.、映射RAW

以root用户在两个节点上执行

 

编辑/etc/sysconfig/rawdevices,加入如下内容

[root@mhdb02 rootpre]# vi/etc/sysconfig/rawdevices

 

# raw device bindings

# format: <rawdev> <major> <minor>

#         <rawdev> <blockdev>

# example: /dev/raw/raw1 /dev/sda1

#         /dev/raw/raw2 8 5

/dev/raw/raw1 /dev/datavg/ocr

/dev/raw/raw2 /dev/datavg/voting

/dev/raw/raw3 /dev/datavg/system

/dev/raw/raw4 /dev/datavg/sysaux

/dev/raw/raw5 /dev/datavg/undotbs1

/dev/raw/raw6 /dev/datavg/undotbs2

/dev/raw/raw7 /dev/datavg/users

/dev/raw/raw8 /dev/datavg/temp

/dev/raw/raw9 /dev/datavg/control1

/dev/raw/raw10 /dev/datavg/control2

/dev/raw/raw11 /dev/datavg/control3

/dev/raw/raw12 /dev/datavg/spfile

/dev/raw/raw13 /dev/datavg/redo1_1

/dev/raw/raw14 /dev/datavg/redo1_2

/dev/raw/raw15 /dev/datavg/redo1_3

/dev/raw/raw16 /dev/datavg/redo1_4

/dev/raw/raw17 /dev/datavg/redo2_1

/dev/raw/raw18 /dev/datavg/redo2_2

/dev/raw/raw19 /dev/datavg/redo2_3

/dev/raw/raw20 /dev/datavg/redo2_4

/dev/raw/raw21 /dev/datavg/pwdfile

/dev/raw/raw22 /dev/datavg/menhu01

/dev/raw/raw23 /dev/datavg/menhu_idx01

/dev/raw/raw24 /dev/datavg/menhu_tmp01

 

 

重启服务使映射生效

 [root@mhdb02 rootpre]# service rawdevicesrestart

Assigning devices:

          /dev/raw/raw1  -->   /dev/datavg/ocr

/dev/raw/raw1:  bound to major 253, minor 0

          /dev/raw/raw2  -->   /dev/datavg/voting

/dev/raw/raw2:  bound to major 253, minor 1

          /dev/raw/raw3  -->   /dev/datavg/system

/dev/raw/raw3:  bound to major 253, minor 2

          /dev/raw/raw4  -->   /dev/datavg/sysaux

/dev/raw/raw4:  bound to major 253, minor 3

          /dev/raw/raw5  -->   /dev/datavg/undotbs1

/dev/raw/raw5:  bound to major 253, minor 4

          /dev/raw/raw6  -->   /dev/datavg/undotbs2

/dev/raw/raw6:  bound to major 253, minor 5

          /dev/raw/raw7  -->   /dev/datavg/users

/dev/raw/raw7:  bound to major 253, minor 6

          /dev/raw/raw8  -->   /dev/datavg/temp

/dev/raw/raw8:  bound to major 253, minor 7

          /dev/raw/raw9  -->   /dev/datavg/control1

/dev/raw/raw9:  bound to major 253, minor 8

          /dev/raw/raw10  -->   /dev/datavg/control2

/dev/raw/raw10: bound to major 253, minor 9

          /dev/raw/raw11  -->   /dev/datavg/control3

/dev/raw/raw11: bound to major 253, minor10

          /dev/raw/raw12  -->   /dev/datavg/spfile

/dev/raw/raw12: bound to major 253, minor11

          /dev/raw/raw13  -->   /dev/datavg/redo1_1

/dev/raw/raw13: bound to major 253, minor12

          /dev/raw/raw14  -->   /dev/datavg/redo1_2

/dev/raw/raw14: bound to major 253, minor13

          /dev/raw/raw15  -->   /dev/datavg/redo1_3

/dev/raw/raw15: bound to major 253, minor14

          /dev/raw/raw16  -->   /dev/datavg/redo1_4

/dev/raw/raw16: bound to major 253, minor15

          /dev/raw/raw17  -->   /dev/datavg/redo2_1

/dev/raw/raw17: bound to major 253, minor16

          /dev/raw/raw18  -->   /dev/datavg/redo2_2

/dev/raw/raw18: bound to major 253, minor17

          /dev/raw/raw19  -->   /dev/datavg/redo2_3

/dev/raw/raw19: bound to major 253, minor18

          /dev/raw/raw20  -->   /dev/datavg/redo2_4

/dev/raw/raw20: bound to major 253, minor19

          /dev/raw/raw21  -->   /dev/datavg/pwdfile

/dev/raw/raw21: bound to major 253, minor20

          /dev/raw/raw22  -->   /dev/datavg/menhu01

/dev/raw/raw22: bound to major 253, minor23

          /dev/raw/raw23  -->   /dev/datavg/menhu_idx01

/dev/raw/raw23: bound to major 253, minor21

          /dev/raw/raw24  -->   /dev/datavg/menhu_tmp01

/dev/raw/raw24: bound to major 253, minor22

done

[root@mhdb02 rootpre]#

 

6.7、更改RAW权限

[root@mhdb02 raw]# chown oracle:dba *

[root@mhdb02 raw]# chmod 660 *

[root@mhdb02 raw]# ls -l

total 0

crw-rw---- 1 oracle dba 162,  1 Oct 29 21:42 raw1

crw-rw---- 1 oracle dba 162, 10 Oct 2921:42 raw10

crw-rw---- 1 oracle dba 162, 11 Oct 2921:42 raw11

crw-rw---- 1 oracle dba 162, 12 Oct 2921:42 raw12

crw-rw---- 1 oracle dba 162, 13 Oct 2921:42 raw13

crw-rw---- 1 oracle dba 162, 14 Oct 2921:42 raw14

crw-rw---- 1 oracle dba 162, 15 Oct 2921:42 raw15

crw-rw---- 1 oracle dba 162, 16 Oct 2921:42 raw16

crw-rw---- 1 oracle dba 162, 17 Oct 2921:42 raw17

crw-rw---- 1 oracle dba 162, 18 Oct 2921:42 raw18

crw-rw---- 1 oracle dba 162, 19 Oct 2921:42 raw19

crw-rw---- 1 oracle dba 162,  2 Oct 29 21:42 raw2

crw-rw---- 1 oracle dba 162, 20 Oct 2921:42 raw20

crw-rw---- 1 oracle dba 162, 21 Oct 2921:42 raw21

crw-rw---- 1 oracle dba 162, 22 Oct 2921:42 raw22

crw-rw---- 1 oracle dba 162, 23 Oct 2921:42 raw23

crw-rw---- 1 oracle dba 162, 24 Oct 2921:42 raw24

crw-rw---- 1 oracle dba 162,  3 Oct 29 21:42 raw3

crw-rw---- 1 oracle dba 162,  4 Oct 29 21:42 raw4

crw-rw---- 1 oracle dba 162,  5 Oct 29 21:42 raw5

crw-rw---- 1 oracle dba 162,  6 Oct 29 21:42 raw6

crw-rw---- 1 oracle dba 162,  7 Oct 29 21:42 raw7

crw-rw---- 1 oracle dba 162,  8 Oct 29 21:42 raw8

crw-rw---- 1 oracle dba 162,  9 Oct 29 21:42 raw9

[root@mhdb02 raw]#

 

6.8、永久更改RAW权限

以root用户执行

 

编辑/etc/rc.local文件,加入如下内容

 

chown oracle:dba /dev/raw/*

chmod 660 /dev/raw/*

 

6.9、编辑oracle安装时使用的RAW配置文件

以oracle用户执行

在/home/oracle/目录下新建名为:raw_config的文件,添加如下内容

system=/dev/raw/raw3

sysaux=/dev/raw/raw4

undotbs1=/dev/raw/raw5

undotbs2=/dev/raw/raw6

users=/dev/raw/raw7

temp=/dev/raw/raw8

control1=/dev/raw/raw9

control2=/dev/raw/raw10

control3=/dev/raw/raw11

spfile =/dev/raw/raw12

redo1_1=/dev/raw/raw13

redo1_2=/dev/raw/raw14

redo1_3=/dev/raw/raw15

redo1_4=/dev/raw/raw16

redo2_1=/dev/raw/raw17

redo2_2=/dev/raw/raw18

redo2_3=/dev/raw/raw19

redo2_4=/dev/raw/raw20

pwdfile=/dev/raw/raw21

 

七、安装Oracle Clusterware

 

7.1、解压文件

[oracle@mhdb02 cluvfy]$ gunzip  10201_clusterware_linux_x86_64.cpio.gz

[oracle@mhdb02 cluvfy]$ cpio –idmv < clusterware_linux_x86_64.cpio

 

 

7.2、启动安装界面

以oracle用户执行(RH5是不受oracle10g支持的,所以需要在执行命令后加一个参数)

 

[oracle@mhdb02 /]$ /software/clusterware/runInstaller–ignoreSysPreReqs

********************************************************************************

 

Please run the script rootpre.sh as root onall machines/nodes. The script can be found at the toplevel of the CD orstage-area. Once you have run the script, please type Y to proceed

 

Answer 'y' if root has run 'rootpre.sh' soyou can proceed with Oracle Clusterware installation.

Answer 'n' to abort installation and thenask root to run 'rootpre.sh'.

 

********************************************************************************

 

Has 'rootpre.sh' been run by root? [y/n](n)

y

 

Starting Oracle Universal Installer...

 

Checking installer requirements...

 

Checking operating system version: must beredhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2

                                      Failed<<<<

 

Exiting Oracle Universal Installer, log forthis session can be found at /tmp/OraInstall2011-10-29_09-48-02PM/installActions2011-10-29_09-48-02PM.log

[oracle@mhdb02 ~]$

 

 

 

 

 

 

 

 

 

 

 

7.3、执行root脚本

 

以root用户先在两个节点执行脚本:

/oracle/oraInventory/orainstRoot.sh

再执行

/oracle/crs/root.sh

 

mhdb02

[root@mhdb02 raw]#/oracle/oraInventory/orainstRoot.sh

Changing permissions of/oracle/oraInventory to 770.

Changing groupname of /oracle/oraInventoryto oinstall.

The execution of the script is complete

[root@mhdb02 raw]#

 

mhdb01

[root@mhdb01 raw]#/oracle/oraInventory/orainstRoot.sh

Changing permissions of/oracle/oraInventory to 770.

Changing groupname of /oracle/oraInventoryto oinstall.

The execution of the script is complete

[root@mhdb01 raw]#

 

 

mhdb02

[root@mhdb02 raw]#/oracle/crs/root.sh

WARNING: directory'/oracle' is not owned by root

Checking to see if OracleCRS stack is already configured

/etc/oracle does notexist. Creating it now.

 

Setting the permissionson OCR backup directory

Setting up NS directories

Failed to upgrade OracleCluster Registry configuration

[root@mhdb02 raw]#

 

注意,这里执行失败是因为oracle BUG: 4679769

解决办法:

解压补丁:p4679769_10201_LINUX32.zip

将解压出的 clsfmt.bin拷贝到$ORA_CRS_HOME/bin下替换原来的文件即可,注意先备份原来文件,两个节点都要替换

重新执行之前先用dd命令清除raw上信息

dd if=/dev/zeroof=/dev/raw/raw1 bs=1Mcount=200

 

[root@mhdb02 client]# /oracle/crs/root.sh

WARNING: directory '/oracle' is not ownedby root

Checking to see if Oracle CRS stack isalready configured

 

Setting the permissions on OCR backupdirectory

Setting up NS directories

Oracle Cluster Registry configurationupgraded successfully

WARNING: directory '/oracle' is not ownedby root

Successfully accumulated necessary OCRkeys.

Using ports: CSS=49895 CRS=49896 EVMC=49898and EVMR=49897.

node <nodenumber>: <nodename><private interconnect name> <hostname>

node 1: mhdb02 mhdb02-priv mhdb02

node 2: mhdb01 mhdb01-priv mhdb01

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

Operation successful.

Now formatting voting device: /dev/raw/raw2

Format of 1 voting devices complete.

Startup will be queued to init within 90seconds.

Adding daemons to inittab

Expecting the CRS daemons to be up within600 seconds.

CSS is active on these nodes.

       mhdb02

CSS is inactive on these nodes.

       mhdb01

Local node checking complete.

Run root.sh on remaining nodes to start CRSdaemons.

[root@mhdb02 client]#

 

mhdb01

 

 

 

 

7.4、调用vipca

以root用户执行

 

mhdb01

 

[root@mhdb01 raw]#/oracle/crs/bin/vipca

/oracle/crs/jdk/jre//bin/java:error while loading shared libraries: libpthread.so.0: cannot open sharedobject file: No such file or directory

[root@mhdb01 raw]#

 

解决办法:

在两节点上,

1、分别修改 $CRS_HOME/bin目录下的srvctlvipca文件,在vipca文件ARGUMENTS=""行之前和srvctl文件的exportLD_ASSUME_KERNEL行之后增加 unset LD_ASSUME_KERNEL 语句

 

2、在任意一个节点上使用oifcfg配置publicvip网络

 

[root@rac1 bin]# ./oifcfgsetif -global eth0/192.168.2.0:public

[root@rac1 bin]# ./oifcfgsetif -global eth1/192.168.0.0:cluster_interconnect

[root@rac1 bin]# ./oifcfggetif

eth0 192.168.2.0 globalpublic

eth1 192.168.0.0 globalcluster_interconnect

 

./oifcfg iflist

 

 

 

查看集群件状态

 

[root@mhdb02 software]#/oracle/crs/bin/crs_stat -t

Name           Type           Target    State    Host       

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

ora.mhdb01.gsd application    ONLINE   ONLINE    mhdb01     

ora.mhdb01.ons application    ONLINE   ONLINE    mhdb01     

ora.mhdb01.vip application    ONLINE   ONLINE    mhdb01     

ora.mhdb02.gsd application    ONLINE   ONLINE    mhdb02     

ora.mhdb02.ons application    ONLINE   ONLINE    mhdb02     

ora.mhdb02.vip application    ONLINE   ONLINE    mhdb02

 

八、安装数据库软件

 

以oracle用户在任一节点执行

 

 

8.1、启动安装界面

[oracle@mhdb02 ~]$/software/database/runInstaller -ignoreSysPreReqs

Starting Oracle Universal Installer...

 

Checking installer requirements...

 

Checking operating system version: must beredhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2

                                      Failed<<<<

 

 

>>> Ignoring requiredpre-requisite failures. Continuing...

 

Preparing to launch Oracle UniversalInstaller from /tmp/OraInstall2011-10-30_01-32-34AM.Please wait ...[oracle@mhdb02 ~]$ Oracle Universal Installer, Version 10.2.0.1.0Production

Copyright (C) 1999, 2005, Oracle. Allrights reserved.

 

 

 

 

 

 

 

 

 

8.2、执行root脚本

 

 

mhdb01

 

[root@mhdb01 oraInventory]# /oracle/db10g/root.sh

Running Oracle10 root.sh script...

 

The following environment variables are setas:

   ORACLE_OWNER= oracle

   ORACLE_HOME=  /oracle/db10g

 

Enter the full pathname of the local bindirectory: [/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/oratabfile as needed by

Database Configuration Assistant when adatabase is created

Finished running generic part of root.shscript.

Now product-specific root actions will beperformed.

 

[root@mhdb01 oraInventory]#

 

mhdb02

[root@mhdb02 software]# /oracle/db10g/root.sh

Running Oracle10 root.sh script...

 

The following environment variables are setas:

   ORACLE_OWNER= oracle

   ORACLE_HOME=  /oracle/db10g

 

Enter the full pathname of the local bindirectory: [/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/oratabfile as needed by

Database Configuration Assistant when adatabase is created

Finished running generic part of root.shscript.

Now product-specific root actions will beperformed.

 

[root@mhdb02 software]#

 

九、配置监听

 

 

[oracle@mhdb02 ~]$ netca

 

 

 

 

 

 

 

 

 

 

 

 

 

查看集群状态

 

[oracle@mhdb02 ~]$ crs_stat -t

名称           类型           目标      状态      主机       

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

ora....01.lsnr application    ONLINE   ONLINE    mhdb01     

ora.mhdb01.gsd application    ONLINE   ONLINE    mhdb01     

ora.mhdb01.ons application    ONLINE   ONLINE    mhdb01     

ora.mhdb01.vip application    ONLINE   ONLINE    mhdb01     

ora....02.lsnr application    ONLINE   ONLINE    mhdb02     

ora.mhdb02.gsd application    ONLINE   ONLINE    mhdb02     

ora.mhdb02.ons application    ONLINE   ONLINE    mhdb02     

ora.mhdb02.vip application    ONLINE   ONLINE    mhdb02     

[oracle@mhdb02 ~]$

 

十、升级数据库及Clusterware

 

补丁文件 p6810189_10204_Linux-x86-64.zip,解压后生产Disk1文件夹

先升级集群件,再升级数据库

 

10.1、升级Clusterware

[oracle@mhdb02 ~]$/software/Disk1/runInstaller

Starting Oracle Universal Installer...

 

Checking installer requirements...

 

Checking operating system version: must beredhat-3, SuSE-9, SuSE-10, redhat-4, redhat-5, UnitedLinux-1.0, asianux-1,asianux-2 or asianux-3

                                      Passed

 

 

All installer requirements met.

 

Preparing to launch Oracle UniversalInstaller from /tmp/OraInstall2011-10-30_03-29-38AM.Please wait ...[oracle@mhdb02 ~]$ Oracle Universal Installer, Version 10.2.0.4.0Production

Copyright (C) 1999, 2008, Oracle. Allrights reserved.

 

 

 

 

 

 

 

先在所有节点上执行脚本

/oracle/crs/bin/crsctl stop crs

所有节点执行完后。再依次执行脚本

/oracle/crs/install/root102.sh

 

 

10.2、升级Databse

 

[oracle@mhdb02 ~]$/software/Disk1/runInstaller

Starting Oracle Universal Installer...

 

Checking installer requirements...

 

Checking operating system version: must beredhat-3, SuSE-9, SuSE-10, redhat-4, redhat-5, UnitedLinux-1.0, asianux-1,asianux-2 or asianux-3

                                      Passed

 

 

All installer requirements met.

 

Preparing to launch Oracle UniversalInstaller from /tmp/OraInstall2011-10-30_04-09-07AM.Please wait ...[oracle@mhdb02 ~]$ Oracle Universal Installer, Version 10.2.0.4.0Production

Copyright (C) 1999, 2008, Oracle. Allrights reserved.

 

 

 

 

 

 

 

 

 

 

 

执行脚本

在两节上上顺序执行

 

 

 

十一、安装数据库

 

 

11.1、启动安装界面

 

[oracle@mhdb02 ~]$ dbca



本文有很多的截图,但在这里不方便显示,需要的朋友可以下载本文:


 

http://download.csdn.net/detail/snowfox326043/4228016

浏览2266 评论0
返回
目录
返回
首页
Oracle10gR2 RAC实时应用集群(三)在Redhat Enterprise Linux5 x86_64下的集群(RAW+ASM篇) RedHat5.5+Openfiler2.9+Oracle11gR2 RAC+ASM