Oracle Database 11g RAC On Oracle Linux 6 Update 3 Using VirtualBox.docx(2/3)

2..建立用户

/usr/sbin/groupadd -g 501 oinstall

/usr/sbin/groupadd -g 502 dba

/usr/sbin/groupadd -g 503 oper

/usr/sbin/groupadd -g 504 asmadmin

/usr/sbin/groupadd -g 505 asmoper

/usr/sbin/groupadd -g 506 asmdba

/usr/sbin/useradd -g oinstall -G dba,asmdba,oper oracle

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

 

[root@rac01 ~]# passwd oracle

Changing password for user oracle.

New password:

BAD PASSWORD: it is based on a dictionary word

BAD PASSWORD: is too simple

Retype new password:

passwd: all authentication tokens updated successfully.

 

[root@rac01 ~]# passwd grid

Changing password for user grid.

New password:

BAD PASSWORD: it is too short

BAD PASSWORD: is too simple

Retype new password:

passwd: all authentication tokens updated successfully.

 

 

2..建立目录

mkdir -p /u01/app/grid
mkdir -p /u01/app/11.2.0/grid
chown -R grid.oinstall /u01

mkdir -p /u01/app/oraInventory
chown -R grid:oinstall /u01/app/oraInventory

mkdir -p /u01/app/oracle
chown -R oracle.oinstall /u01/app/oracle
chmod -R 775 /u01/

2..编辑profile 文件


[root@rac01 Disk]# vi /home/grid/.bash_profile

 

export ORACLE_SID=+ASM1                      

# .bash_profile

 

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

        . ~/.bashrc

fi

 

# User specific environment and startup programs

 

export ORACLE_BASE=/u01/app/grid

export ORACLE_HOME=/u01/app/11.2.0/grid

export ORACLE_SID=+ASM1

export LANG=en

export LD_LIBRARY_PATH=$ORACLE_HOME/lib

export PATH=$ORACLE_HOME/bin:$PATH

alias sqlplus = ‘lwrap sqlplus’

alias rman = ‘lwrap rman’

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


2..下载安装软件

[root@rac01 Disk]# mkdir -m 777 /Disk

 

上传安装GRID,ORACLE的软件,rlwrap,asm的包至/Disk

37B15AADF12840049D77CE222E90E2FA

 

2.10.安装asmpackage

[root@rac01 Disk]# rpm -Uvh oracleasmlib-2.0.4-1.el6.x86_64.rpm

warning: oracleasmlib-2.0.4-1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY

Preparing...                ########################################### [100%]

   1:oracleasmlib          ########################################### [100%]

[root@rac01 Disk]# rpm -Uvh oracleasm-support-2.1.8-1.el5.x86_64.rpm

warning: oracleasm-support-2.1.8-1.el5.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 1e5e0159: NOKEY

Preparing...                ########################################### [100%]

   1:oracleasm-support      ########################################### [100%]

 

2.11.安装 rlwrap

[root@rac01 Disk]# rpm -Uvh rlwrap-0.37-1.el6.x86_64.rpm

warning: rlwrap-0.37-1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY

Preparing...                ########################################### [100%]

   1:rlwrap                 ########################################### [100%]

 

 

[root@rac01 Disk]# unzip p13390677_112040_Linux-x86-64_3of7.zip

 

安装ASMpackage

 

 

 

2.12. 關閉RAC1,克隆RAC2,并增加共享磁盘

 

0955D485D0CB4B25B8937CD57ED7AFA6

6489E855B64C48C7A86929611C1947E7

 

F1C247E60192442689888D9C1549B0B8

6FFD95FAA17D4E098DA7466461F59397

 

 

3B2654872AD442C38633714EAE549403

4B7A84D963DC474B91E6D7E550C5F4BB

 

BE6AB9C0431F44BA9557AAE761ADC56A

4AF70F9124614027862A545AE43C9D4A

 

 

2.13.修改rac02的相关文件。(/etc/sysconfig/network profile文件)

0DD0D97511CF4DDB9DAF991337AC6DC4

 

9245CB5389C84D15A811A0DC45874864

2.14.格式化磁盘

[root@rac01 u01]# fdisk -l

 

Disk /dev/sda: 32.2 GB, 32212254720 bytes

255 heads, 63 sectors/track, 3916 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: 0x00056ffa

 

   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         548     4194304   82  Linux swap / Solaris

Partition 2 does not end on cylinder boundary.

/dev/sda3             548        3917    27057152   8e  Linux LVM

 

Disk /dev/sdb: 32.2 GB, 32212254720 bytes

255 heads, 63 sectors/track, 3916 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/sdc: 32.2 GB, 32212254720 bytes

255 heads, 63 sectors/track, 3916 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/mapper/vg_rac01-LogVol00: 27.7 GB, 27703377920 bytes

255 heads, 63 sectors/track, 3368 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@rac01 u01]# fdisk /dev/sdb

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel with disk identifier 0x46ed339a.

Changes will remain in memory only, until you decide to write them.

After that, of course, the previous content won't be recoverable.

 

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

 

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to

         switch off the mode (command 'c') and change display units to

         sectors (command 'u').

 

Command (m for help): n

Command action

   e   extended

   p   primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-3916, default 1):

Using default value 1

Last cylinder, +cylinders or +size{K,M,G} (1-3916, default 3916):

Using default value 3916

 

Command (m for help): w

The partition table has been altered!

 

Calling ioctl() to re-read partition table.

Syncing disks.

 

 

2.15.增加ASM磁盘

[root@rac01 u01]# /etc/init.d/oracleasm createdisk DISK1  /dev/sdb1

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

Marking disk "DISK1" as an ASM disk: [  OK  ]

[root@rac01 u01]# /etc/init.d/oracleasm createdisk DISK2  /dev/sdc1

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

Marking disk "DISK2" as an ASM disk: [  OK  ]

 

[root@rac01 Disk]# /etc/init.d/oracleasm listdisks

DISK1

DISK2

2.16 安装GRID的包,在安装程式grid/rpm

[root@rac01 rpm]# rpm -Uvh cvuqdisk-1.0.9-1.rpm

Preparing...                ########################################### [100%]

Using default group oinstall to install package

   1:cvuqdisk               ########################################### [100%]

 

安装grid

称在root用户下xhost +

再切换到grid用户 ,安装

[root@rac01 grid]#xhost +

[root@rac01 grid]# su - grid

[grid@rac01 ~]$ cd /Disk/grid/

[grid@rac01 grid]$ ./runInstaller

 

8B7AD93FD2B749EAAC2024AD26106F2C28F21BE3AFCC4B2C9B4425BFBA06DE35

B738086C7E704675A9CC994D8532A91F

33414AF138DD4300BC27014EC96018E8

38087297D9894F418756AEEEF077D6DB

 

在这里,要点 SSHConnectivity ,输入 grid的密码,再setup.

4B384896759B4AC28FEE6CEA727BF2D6

 

AB63919402334B6AA5000A0BF0D72F80

B5743177596344C7831274AE0CBB4530

6D7FA498480F471892AAF52E85BFFCBD

77295DF105754598B2FBE6427583605C

 

1F642BA2042E47A5B09E1DED3950A685

 

0DDBD4B4F10347A6BE32918F8033944B

661C6C8DA8344E269584D0CE7B4A0E07

08218D9D3AA347F2A5C71F4EC46D0CBC

 

07EAC84B24674D68887E16F9B9D485D5

3180C73259504C75A3358C8EBF9C9978

 

选择Ignore all

 

 

832723E05385441F9356E6081AA936C2

 

在二个机器上分别执行,注意顺序。执行完成再点OK.

B49F2D44D37947EBBB9AF6DA39759A73

DEAC02D7A9D44DE3A742F8ADD68C6631

 

3.1 验证GRID

 

[grid@rac01 ~]$ srvctl status nodeapps

VIP rac01-vip is enabled

VIP rac01-vip is running on node: rac01

VIP rac02-vip is enabled

VIP rac02-vip is running on node: rac02

Network is enabled

Network is running on node: rac01

Network is running on node: rac02

GSD is disabled

GSD is not running on node: rac01

GSD is not running on node: rac02

ONS is enabled

ONS daemon is running on node: rac01

ONS daemon is running on node: rac02

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

转载于:http://blog.itpub.net/203348/viewspace-1253910/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值