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

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章