mklv -y'rac_sysaux_800m' -w'n' -s'n' -r'n' datavg 4 hdisk2 mklv -y'rac_undo1_4096m' -w'n' -s'n' -r'n' datavg 16 hdisk2 mklv -y'rac_undo2_4096m' -w'n' -s'n' -r'n' datavg 16 hdisk2 mklv -y'rac_temp_4096m' -w'n' -s'n' -r'n' datavg 16 hdisk2 mklv -y'rac_users_800m' -w'n' -s'n' -r'n' datavg 4 hdisk2 mklv -y'rac_redo1_1_120m' -w'n' -s'n' -r'n' datavg 2 hdisk2 mklv -y'rac_redo1_2_120m' -w'n' -s'n' -r'n' datavg 2 hdisk2 mklv -y'rac_redo1_3_120m' -w'n' -s'n' -r'n' datavg 2 hdisk2 mklv -y'rac_redo2_1_120m' -w'n' -s'n' -r'n' datavg 2 hdisk2 mklv -y'rac_redo2_2_120m' -w'n' -s'n' -r'n' datavg 2 hdisk2 mklv -y'rac_redo2_3_120m' -w'n' -s'n' -r'n' datavg 2 hdisk2 mklv -y'rac_ctl1_100m' -w'n' -s'n' -r'n' datavg 1 hdisk2 mklv -y'rac_ctl2_100m' -w'n' -s'n' -r'n' datavg 1 hdisk2 mklv -y'rac_ctl3_100m' -w'n' -s'n' -r'n' datavg 1 hdisk2 mklv -y'rac_spfile_100m' -w'n' -s'n' -r'n' datavg 1 hdisk2 ORACLE 10G RAC 参考手册 11
通过 mklv 命令创建完lv 后,会在/dev/下生成两个文件,比如:
# mklv -y'rac_spfile_100m' -w'n' -s'n' -r'n' datavg 1 hdisk2
那么在/dev/下会生成两个文件
/dev/rac_spfile_100m /dev/rrac_spfile_100m
前面多了一个r 的文件就是我们要使用的character devices。 也就是我们通常所说的裸设备。 ", 在另外一个节点上 import 共享卷 # hostname db02 # smitty vg
Volume Groups
Move cursor to desired item and press Enter. ", Import a Volume Group Import a Volume Group
Type or select values in entry fields. Press Enter AFTER making all desired changes. [Entry Fields]
VOLUME GROUP name [datavg]
* PHYSICAL VOLUME name [hdisk2,hdisk3] + Volume Group MAJOR NUMBER [60] +#
修改共享卷的属性(建议两台主机都要做) # varyonvg datavg
# chown oracle:dba /dev/rrac_* # varyoffvg datavg
配置ssh
在所有节点配置SSH 的对等性
在安装 Oracle Real Application clusters 之前,必须先配置所有节点的SSH 对等性。因为在安装
过程种Oracle Universal Installer 使用ssh 和scp 命令执行远程命令执行及copy 的工作。 下面是具体的步骤:
以下步骤在所有节点上执行: 1.以oracle 用户登陆
# su – oracle
2.在两个节点的oracle 主目录分别创建.ssh 目录,并赋予权限。
# mkdir ~/.ssh
# chmod 755 ~/.ssh
3. 在两个节点分别生成RSA key # /usr/bin/ssh-keygen -t rsa 会出现如下提示:
■ Accept the default location for the key file.
■ Enter and confirm a pass phrase that is different from the oracle user’s password. phrase
密码处直接回车即可
4. 生成DSA key
# /usr/bin/ssh-keygen -t dsa 出现如下提示:
■ Accept the default location for the key file.
■ Enter and confirm a pass phrase that is different from the oracle user’s password. phrase
密码处直接回车即可
5. 以oracle 用户身份,在所有节点创建authorized_keys 文件,并赋予权限 # touch ~/.ssh/authorized_keys # cd ~/.ssh
# ls
你应该可以看到你所创建的id_dsa.pub 和id_rsa.pub 和authorized_keys 6.在两个节点分别将id_dsa.pub 和id_rsa.pub 加入到authorized_keys 节点 1:
$ ssh db01 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys $ ssh db01 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys $ ssh db02 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys $ ssh db02 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys 节点2:
$ ssh db02 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys $ ssh db02 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys $ ssh db01 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys $ ssh db01 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
PS:如果提示是否连接选择yes,密码输入oracle 用户的密码 7.在每个节点上分别设置authorized_keys 文件的权限
# chmod 644 ~/.ssh/authorized_keys
8.防止X11 转发造成的安装失败,创建~ /.ssh/config,并加入如下内容。 Host *
ForwardX11 no
9.以oracle 用户身份,运行Oracle Universal Installer 的节点上执行如下命令,然后测试ssh 的对等性。
# exec /usr/bin/ssh-agent $SHELL 节点1
# ssh db01 date # ssh db02 date 节点2
# ssh db02 date
# ssh db01 date
如果都不需要密码,得到时间后。就说明ssh 对等性配置成功。
安装oracle软件
安装crs
1.执行rootpre.sh
# cd clusterware/rootpre # ./rootpre.sh
./rootpre.sh output will be logged in /tmp/rootpre.out_07-03-15.11:01:09 Saving the original files in /etc/ora_save_07-03-15.11:01:09.... Copying new kernel extension to /etc.... Loading the kernel extension from /etc Oracle Kernel Extension Loader for AIX Copyright (c) 1998,1999 Oracle Corporation
Successfully loaded /etc/pw-syscall.64bit_kernel with kmid: 0x3f14e00 Successfully configured /etc/pw-syscall.64bit_kernel with kmid: 0x3f14e00 The kernel extension was successfuly loaded. Configuring Asynchronous I/O.... Asynchronous I/O is already defined Configuring POSIX Asynchronous I/O....
Checking if group services should be configured....
Please confirm your Oracle userid is a member of the group: hagsuser Configuring HACMP group services socket for possible use by Oracle.
PS:注意rootpre.sh 需要在两个节点都运行。
2.确保HACMP 集群已经在db01 和db02 上已经启动。 在两个节点执行 # smitty clstart # lssrc -g cluster 3.创建目录:
mkdir -p /opt/app/oracle
chown oracle:oinstall /opt/app/oracle
4.在两个节点分别设置oracle 用户的环境变量 # su - oracle $ vi ~oracle/.profile
ORACLE_BASE=/opt/app/oracle export ORACLE_BASE
5.执行ssh 对等命令
$ exec /usr/bin/ssh-agent $SHELL 6.设置display
$ export DISPLAY=10.201.2.110:0 7.运行runInstaller
$ /mnt/clusterware/runInstaller
**************************************************************************
Your platform requires the root user to perform certain pre-installation OS preparation. The root user should run the shell script 'rootpre.sh' before you proceed with Oracle installation. rootpre.sh can be found at the top level of the CD or the stage area. Answer 'y' if root has run 'rootpre.sh' so you can proceed with Oracle installation.
Answer 'n' to abort installation and then ask root to run 'rootpre.sh'.
************************************************************************** Has 'rootpre.sh' been run by root? [y/n] (n) y
Starting Oracle Universal Installer...
No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed. Preparing to launch Oracle Universal Installer from /tmp/OraInstall2007-03-15_03-21-44PM. Please wait ...
Oracle Universal Installer, Version 10.2.0.1.0 Production Copyright (C) 1999, 2005, Oracle. All rights reserved. 进入安装界面,点击下一步
设置 inventory 目录及信任组,点击下一步