Install oracle 10R2 rac with HACMP 5.2 on IBM aix 5.3

软件环境
AIX 5L 5.3 ML4
AIX补丁
HACMP 5.2
Oracle 10.2.0.1
Oracle补丁10.2.0.2

硬件环境

RS6000 2台
(每台主机有4个以太网网卡、2个光纤卡、一个串口)
光纤磁盘阵列DS4300 1台

1、 安装aix系统
扩充 / 2gb
扩充 /home 4gb
扩充 /usr 4gb
扩充 /var 4gb
扩充 /tmp 2gb
扩充 /opt 20gb
扩充 /var/adm/ras/platform 1gb


/etc/hosts文件
192.168.0.101 rac1
192.168.0.102 rac2
192.168.0.103 rac1vip
192.168.0.104 rac2vip
10.10.10.101 rac1priv
10.10.10.102 rac2priv






2、 在rac1和rac2上,创建oinstall、dba、hagsuser组


/bin/mkgroup oinstall
/bin/mkgroup dba
/bin/mkgroup hagsuser


3、 在rac1和rac2上,创建oracle用户:

# smitty user

Add a User

Type or select values in entry fields.
Press Enter AFTER making all desired changes.

* User NAME [oracle]
User ID [500]
Primary GROUP [oinstall]
Group SET [dba,hagsuser]
Soft FILE size [-1]
Soft CPU time [-1]
Soft DATA segment [-1]
Soft STACK size [-1]



保证两台主机的组号要一致!
/etc/group
oinstall:!:203:
dba:!:204:
hagsuser:!:205:
# id oracle
uid=500(oracle) gid=203(oinstall) groups=204(dba),205(hagsuser)




4、 配置系统配置参数

配置每用户的最大进程数、调整water mark

smitty chgsys
Maximum number of PROCESSES allowed per user [4096]
HIGH water mark for pending write I/Os per file [33]
LOW water mark for pending write I/Os per file [24]
Stack Execution Disable (SED) Mode off


配置网络可调参数

修改文件/etc/rc.net,将如下几行加到文件的尾部:
if [ -f /usr/sbin/no ] then
/usr/sbin/no -p -o udp_sendspace=65536
/usr/sbin/no -p -o udp_recvspace=655360
/usr/sbin/no -p -o tcp_sendspace=65536
/usr/sbin/no -p -o tcp_recvspace=65536
/usr/sbin/no -p -o rfc1323=1
/usr/sbin/no -p -o sb_max=1310720
/usr/sbin/no -r -o ipqmaxlen=512
fi


修改异步I/O(须重启)

smitty chgaio
[Entry Fields]
MINIMUM number of servers [30] #
MAXIMUM number of servers [60] #
maximum number of REQUESTS [4096] #
server PRIORITY [39] #
STATE to be configured at system restart available +
State of fast path enable +
# mkdev –l aio0 使异步I/O可用


调整syncd频率
修改文件/sbin/rc.boot
#nohup /usr/sbin/syncd 60 > /dev/null 2>&1 &
nohup /usr/sbin/syncd 10 > /dev/null 2>&1 &





5、 创建串口设备
smitty mktty
测试串口设备

cat
cat /etc/hosts > /dev/tty0

6、 安装oracle、hacmp支持包

smitty installp
需要安装以下操作系统包:
Bos.adt
bos.cifs_fs
Bos.clvm
bos.compat
bos.data
Bos.perf


rsct.basic
rsct.compat.basic
rsct.compat.clients
rsct.core

(在扩展盘上HACMP 5.2不需要,5.3需要)
rsct.exp.cimrm 2.4.2.0


(以下包在AIX Toolbox for Linux Applications盘上,安装SSH的前提包)
openssl-0.9.7g
openssl-devel-0.9.7g
openssl-doc-0.9.7g

(以下包在扩展盘上)
openssh.base
openssh.license
openssh.man.en_US
要将license改为接受!!!

(在网上download)
xlC.aix50.rte:7.0.0.4
xlC.rte:7.0.0.1


7、 安装hacmp软件
smitty installp


8、 安装磁盘阵列,创建共享卷

准备磁盘阵列
# hostname
rac1
# lspv
hdisk0 0002e54aa58657e9 rootvg active
hdisk1 0002657c5acf302b None
hdisk2 0002657c4d26e7ba None
hdisk3 0002657c5acf4bc3 None
hdisk4 0002657c4cc04d52 None
hdisk5 0002ee503cc8dcaa None
#
# hostname
rac2
# lspv
hdisk0 0002e5baa58258aa rootvg active
hdisk1 0002657c5acf302b None
hdisk2 0002657c4d26e7ba None
hdisk3 0002657c5acf4bc3 None
hdisk4 0002657c4cc04d52 None
hdisk5 0002ee503cc8dcaa None

创建一个并行vg名字为oracle_vg
# hostname
rac1
#
# smitty mkvg
Add a Big Volume Group

Type or select values in entry fields.
Press Enter AFTER making all desired changes.

[Entry Fields]
VOLUME GROUP name [oracle_vg]
Physical partition SIZE in megabytes 128
* PHYSICAL VOLUME names [hdisk5]
Force the creation of a volume group? yes
Activate volume group AUTOMATICALLY no
at system restart?
Volume Group MAJOR NUMBER [60]
Create VG Concurrent Capable? enhanced concurrent

# varyonvg oracle_vg

创建oracle使用的并行卷

mklv -y'dy_crs1024m' -w'n' -s'n' -r'n' oracle_vg 8 hdisk5
mklv -y'dy_vote1024m' -w'n' -s'n' -r'n' oracle_vg 8 hdisk5
mklv -y'dy_system_1024m' -w'n' -s'n' -r'n' oracle_vg 10 hdisk5
mklv -y'dy_pwdfile_100m' -w'n' -s'n' -r'n' oracle_vg 1 hdisk5
mklv -y'dy_sysaux_800m' -w'n' -s'n' -r'n' oracle_vg 10 hdisk5
mklv -y'dy_undo1_4096m' -w'n' -s'n' -r'n' oracle_vg 40 hdisk5
mklv -y'dy_undo2_4096m' -w'n' -s'n' -r'n' oracle_vg 40 hdisk5
mklv -y'dy_temp_4096m' -w'n' -s'n' -r'n' oracle_vg 40 hdisk5
mklv -y'dy_example_800m' -w'n' -s'n' -r'n' oracle_vg 10 hdisk5
mklv -y'dy_users_800m' -w'n' -s'n' -r'n' oracle_vg 10 hdisk5
mklv -y'dy_redo1_1_500m' -w'n' -s'n' -r'n' oracle_vg 10 hdisk5
mklv -y'dy_redo1_2_500m' -w'n' -s'n' -r'n' oracle_vg 10 hdisk5
mklv -y'dy_redo1_3_500m' -w'n' -s'n' -r'n' oracle_vg 10 hdisk5
mklv -y'dy_redo1_4_500m' -w'n' -s'n' -r'n' oracle_vg 10 hdisk5
mklv -y'dy_redo1_5_500m' -w'n' -s'n' -r'n' oracle_vg 10 hdisk5
mklv -y'dy_redo1_6_500m' -w'n' -s'n' -r'n' oracle_vg 10 hdisk5
mklv -y'dy_redo2_1_500m' -w'n' -s'n' -r'n' oracle_vg 10 hdisk5
mklv -y'dy_redo2_2_500m' -w'n' -s'n' -r'n' oracle_vg 10 hdisk5
mklv -y'dy_redo2_3_500m' -w'n' -s'n' -r'n' oracle_vg 10 hdisk5
mklv -y'dy_redo2_4_500m' -w'n' -s'n' -r'n' oracle_vg 10 hdisk5
mklv -y'dy_redo2_5_500m' -w'n' -s'n' -r'n' oracle_vg 10 hdisk5
mklv -y'dy_redo2_6_500m' -w'n' -s'n' -r'n' oracle_vg 10 hdisk5
mklv -y'dy_ctl1_110m' -w'n' -s'n' -r'n' oracle_vg 1 hdisk5
mklv -y'dy_ctl2_110m' -w'n' -s'n' -r'n' oracle_vg 1 hdisk5
mklv -y'dy_ctl3_110m' -w'n' -s'n' -r'n' oracle_vg 1 hdisk5
mklv -y'dy_spfile_110m' -w'n' -s'n' -r'n' oracle_vg 1 hdisk5
mklv -y'dy_recover4096m' -w'n' -s'n' -r'n' oracle_vg 40 hdisk5


在另外一台主机上import共享卷
# hostname
rac2
# 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 [oracle_vg]
* PHYSICAL VOLUME name [hdisk5] +
Volume Group MAJOR NUMBER [60] +#

修改共享卷的属性(两台主机都要做)
varyonvg oracle_vg
chown oracle:dba /dev/*dy_*
varyoffvg oracle_vg

9、 配置SSH

Configuring SSH on All Cluster Nodes
Before you install and use Oracle Real Application clusters, you must configure secure
shell (SSH) for the oracle user on all cluster nodes. Oracle Universal Installer uses
the ssh and scp commands during installation to run remote commands on and copy
files to the other cluster nodes. You must configure SSH so that these commands do
not prompt for a password.
Configuring SSH on Cluster Member Nodes
To configure SSH, you must first create RSA and DSA keys on each cluster node, and
then copy the keys from all cluster node members into an authorized keys file on each
node. To do this task, complete the following steps:
Create RSA and DSA keys on each node: Complete the following steps on each
node:
1. Log in as the oracle user.
2. If necessary, create the .ssh directory in the oracle user’s home directory and
set the correct permissions on it:
mkdir ~/.ssh
chmod 700 ~/.ssh
3. Enter the following commands to generate an RSA key for version 2 of the SSH
protocol:
/usr/bin/ssh-keygen -t rsa
At the prompts:
■ Accept the default location for the key file.
■ Enter and confirm a pass phrase that is different from the oracle user’s
password.
This command writes the public key to the ~/.ssh/id_rsa.pub file and the
private key to the ~/.ssh/id_rsa file. Never distribute the private key to anyone.
4. Enter the following commands to generate a DSA key for version 2 of the SSH
protocol:
/usr/bin/ssh-keygen -t dsa
At the prompts:
Accept the default location for the key file
■ Enter and confirm a pass phrase that is different from the oracle user’s
password
This command writes the public key to the ~/.ssh/id_dsa.pub file and the
private key to the ~/.ssh/id_dsa file. Never distribute the private key to
anyone.
Add keys to an authorized key file: Complete the following steps:
1. On the local node, determine if you have an authorized key file
(~/.ssh/authorized_keys). If the authorized key file already exists, then
proceed to step 2. Otherwise, enter the following commands:
touch ~/.ssh/authorized_keys
cd ~/.ssh
ls
You should see the id_dsa.pub and id_rsa.pub keys that you have created.
2. Using SSH, copy the contents of the ~/.ssh/id_rsa.pub and
~/.ssh/id_dsa.pub files to the file ~/.ssh/authorized_keys, and provide
the Oracle user password as prompted. This process is illustrated in the following
syntax example with a two-node cluster, with nodes node1 and node2, where the
Oracle user path is /home/oracle:
[oracle@rac1 .ssh]$ ssh rac1 cat /home/oracle/.ssh/id_rsa.pub >>authorized_keys
oracle@node1’s password:
[oracle@rac1 .ssh]$ ssh rac1 cat /home/oracle/.ssh/id_dsa.pub >>authorized_keys
[oracle@rac1 .ssh$ ssh rac2 cat /home/oracle/.ssh/id_rsa.pub >>authorized_keys
oracle@node2’s password:
[oracle@ rac1 .ssh$ ssh rac2 cat /home/oracle/.ssh/id_dsa.pub>>authorized_keys
oracle@node2’s password:
3. Use SCP (Secure Copy) or SFTP (Secure FTP) to copy the authorized_keys file
to the Oracle user .ssh directory on a remote node. The following example is with
SCP, on a node called node2, where the Oracle user path is /home/oracle:
[oracle@node1 .ssh]scp authorized_keys node2:/home/oracle/.ssh/
4. Repeat step 2 and 3 for each cluster node member. When you have added keys
from each cluster node member to the authorized_keys file on the last node you
want to have as a cluster node member, then use SCP to copy the complete
authorized_keys file back to each cluster node member
Note: Repeat this process for each node in the cluster
Note: The Oracle user’s /.ssh/authorized_keys file on every
node must contain the contents from all of the /.ssh/id_rsa.pub
and /.ssh/id_dsa.pub files that you generated on all cluster
nodes.
5. Change the permissions on the Oracle user’s /.ssh/authorized_keys file on
all cluster nodes:
chmod 600 ~/.ssh/authorized_keys
At this point, if you use ssh to log in to or run a command on another node, you
are prompted for the pass phrase that you specified when you created the DSA
key.
Enabling SSH User Equivalency on Cluster Member Nodes
To enable Oracle Universal Installer to use the ssh and scp commands without being
prompted for a pass phrase, follow these steps:
1. On the system where you want to run Oracle Universal Installer, log in as the
oracle user.
2. Enter the following commands:
exec /usr/bin/ssh-agent $SHELL
/usr/bin/ssh-add
3. At the prompts, enter the pass phrase for each key that you generated.
If you have configured SSH correctly, then you can now use the ssh or scp
commands without being prompted for a password or a pass phrase.
4. If you are on a remote terminal, and the local node has only one visual (which is
typical), then use the following syntax to set the DISPLAY environment variable:
Bourne, Korn, and Bash shells
$ export DISPLAY=hostname:0
C shell:
$ setenv DISPLAY 0
For example, if you are using the Bash shell, and if your hostname is node1, then
enter the following command:
$ export DISPLAY=node1:0
5. To test the SSH configuration, enter the following commands from the same
terminal session, testing the configuration of each cluster node, where
nodename1, nodename2, and so on, are the names of nodes in the cluster:
$ ssh nodename1 date
$ ssh nodename2 date
.
.
.
These commands should display the date set on each node.
If any node prompts for a password or pass phrase, then verify that the
~/.ssh/authorized_keys file on that node contains the correct public keys.
If you are using a remote client to connect to the local node, and you see a message
similar to "Warning: No xauth data; using fake authentication data for X11
forwarding," then this means that your authorized keys file is configured correctly,
but your ssh configuration has X11 forwarding enabled. To correct this, proceed to
step 6.
Note: The first time you use SSH to connect to a node from a
particular system, you may see a message similar to the following:
The authenticity of host 'node1 (140.87.152.153)' can't be
established.
RSA key fingerprint is
7z:ez:e7:f6:f4:f2:4f:8f:9z:79:85:62:20:90:92:z9.
Are you sure you want to continue connecting (yes/no)?
Enter yes at the prompt to continue. You should not see this
message again when you connect from this system to that node.
If you see any other messages or text, apart from the date, then the
installation can fail. Make any changes required to ensure that only
the date is displayed when you enter these commands.
You should ensure that any parts of login scripts that generate any
output, or ask any questions, are modified so that they act only
when the shell is an interactive shell
6. To ensure that X11 forwarding will not cause the installation to fail, create a
user-level SSH client configuration file for the Oracle software owner user, as
follows:
a. Using any text editor, edit or create the ~oracle/.ssh/config file.
b. Make sure that the ForwardX11 attribute is set to no. For example:
Host *
ForwardX11 no
7. You must run Oracle Universal Installer from this session or remember to repeat
steps 2 and 3 before you start Oracle Universal Installer from a different terminal
session.
Preventing Oracle Clusterware Installation Errors Caused by stty Commands
During an Oracle Clusterware installation, Oracle Universal Installer uses SSH (if
available) to run commands and copy files to the other nodes. During the installation,
hidden files on the system (for example, .bashrc or .cshrc) will cause installation errors
if they contain stty commands.
To avoid this problem, you must modify these files to suppress all output on STDERR,
as in the following examples:
■ Bourne, Bash, or Korn shell:
if [ -t 0 ]; then
stty intr ^C
fi
■ C shell:
test -t 0
if ($status == 0) then
stty intr ^C
endif
Note: The first time you use SSH to connect to a node from a
particular system, you may see a message similar to the following:
The authenticity of host 'node1 (140.87.152.153)' can't be
established.
RSA key fingerprint is
7z:ez:e7:f6:f4:f2:4f:8f:9z:79:85:62:20:90:92:z9.
Are you sure you want to continue connecting (yes/no)?
Enter yes at the prompt to continue. You should not see this
message again when you connect from this system to that node.
If you see any other messages or text, apart from the date, then the
installation can fail. Make any changes required to ensure that only
the date is displayed when you enter these commands.
You should ensure that any parts of login scripts that generate any
output, or ask any questions, are modified so that they act only
when the shell is an interactive shell
Note: When SSH is not available, the Installer uses the rsh and
rcp commands instead of ssh and scp.
If there are hidden files that contain stty commands that are loaded
by the remote shell, then OUI indicates an error and stops the
installation.

10、 安装fix包所需补丁
到IBM网站上下载补丁

11、 重启动主机

shutdown -Fr

12、 配置hacmp

创建集群
# smitty hacmp

Initialization and Standard Configuration
Add Nodes to an HACMP Cluster

Configure Nodes to an HACMP Cluster (standard)

Type or select values in entry fields.
Press Enter AFTER making all desired changes.

[Entry Fields]
* Cluster Name [test]
New Nodes (via selected communication paths) [rac1 rac2] +
Currently Configured Node(s)

创建资源组shared_disk_rg
# smitty hacmp
Initialization and Standard Configuration
Configure HACMP Resource Groups
Add a Resource Group

Add a Resource Group

Type or select values in entry fields.
Press Enter AFTER making all desired changes.

[Entry Fields]
* Resource Group Name [shared_disk_rg]
* Participating Nodes (Default Node Priority) [rac1 rac2] +
Startup Policy Online On All Available Nodes +
Fallover Policy Bring Offline (On Error Node Only) +
Fallback Policy Never Fallback +


为资源组shared_disk增加共享磁盘
# smitty hacmp
Initialization and Standard Configuration
Configure HACMP Resource Groups
Change/Show Resources for a Resource Group (standard)

Select a Resource Group
Move cursor to desired item and press Enter.

shared_disk_rg

Change/Show All Resources and Attributes for a Resource Group

Type or select values in entry fields.
Press Enter AFTER making all desired changes.

[Entry Fields]
Resource Group Name shared_disk
Participating Nodes (Default Node Priority) rac1 rac2

Startup Policy Online On All Available Nodes
Fallover Policy Bring Offline (On Error Node O>
Fallback Policy Never Fallback

Concurrent Volume Groups [oracle_vg] +
Use forced varyon of volume groups, if necessary false +
Application Servers [] +


配置串口网络作为HB
# smitty hacmp
Extended Configuration
Extended Topology Configuration
Configure HACMP Communication Interfaces/Devices
Add Communication Interfaces/Devices

Select a category
Move cursor to desired item and press Enter.
Add Discovered Communication Interface and Devices
Add Pre-defined Communication Interfaces and Devices

Select a category
Move cursor to desired item and press Enter.
Discovery last performed: (Dec 08 20:10)
Communication Interfaces
Communication Devices

Select Point-to-Point Pair of Discovered Communication Devices to Add

Move cursor to desired item and press F7. Use arrow keys to scroll.
ONE OR MORE items can be selected.
Press Enter AFTER making all selections.
Node Device Device Path Pvid
rac1 hdisk5 /dev/hdisk5 0002ee503cc
rac2 hdisk5 /dev/hdisk5 0002ee503cc
> rac1 tty0 /dev/tty0
> rac2 tty0 /dev/tty0



配置HB IP网络
# smitty hacmp
Extended Configuration
Extended Topology Configuration
Configure HACMP Networks
Change/Show a Network in the HACMP Cluster


Select a Network to Change/Show
Move cursor to desired item and press Enter.
net_ether_01 (192.168.0.0/24)
net_ether_02 (10.10.10.0/24)

Change/Show an IP-Based Network in the HACMP ClusterType or select values in entry fields.
Press Enter AFTER making all desired changes.

[Entry Fields]
* Network Name net_ether_02
New Network Name []
* Network Type [ether]
* Netmask [255.255.255.0]
* Enable IP Address Takeover via IP Aliases [Yes]
IP Address Offset for Heartbeating over IP Aliases []
* Network attribute private



同步集群配置文件
# smitty hacmp
Extended Configuration
Extended Verification and Synchronization

HACMP Verification and Synchronization

Type or select values in entry fields.
Press Enter AFTER making all desired changes.

[Entry Fields]
* Verify, Synchronize or Both [Both]
* Automatically correct errors found during [Yes]
verification?

* Force synchronization if verification fails? [No]
* Verify changes only? [No]
* Logging [Standard]

13、 测试HACMP集群

# hostname
rac1
# smitty clstart
# hostname
rac2
# smitty clstart

# lsvg -o
oracle_vg
rootvg

# lsvg -l oracle_vg
oracle_vg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT

# hostname
rac1
# smitty clstop
# hostname
rac2
# smitty clstop

# lsvg
rootvg
oracle_vg
# lsvg -o
rootvg

安装oracle RAC

14、 安装oracle RAC的准备工作

15、 安装Oracle ClusterWare


运行rootpre.sh
cd /cdrom/cd0/clusterware/rootpre
./rootpre.sh
./rootpre.sh output will be logged in /tmp/rootpre.out_06-12-13.11:30:24
Saving the original files in /etc/ora_save_06-12-13.11:30:24....
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: 0x4116700
Successfully configured /etc/pw-syscall.64bit_kernel with kmid: 0x4116700
The kernel extension was successfuly loaded.

Configuring Asynchronous I/O....

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.


确保HACMP集群已经在rac1和rac2上已经启动!
smitty clstart




创建目录:
mkdir -p /opt/app
chown oracle:oinstall /opt/app


设置环境变量

编辑文件~oracle/.profile
ORACLE_BASE=/opt/app
export ORACLE_BASE


/cdrom/cd0/clusterware/runInstaller

$ /cdrom/cd0/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' be
fore
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/OraInstall2006-12-21_04-21-44PM. Please wait ...
Oracle Universal Installer, Version 10.2.0.1.0 Production
Copyright (C) 1999, 2005, Oracle. All rights reserved.




# hostname
rac1
# /opt/app/oraInventory/orainstRoot.sh
Changing permissions of /opt/app/oraInventory to 775.
Changing groupname of /opt/app/oraInventory to oinstall.
The execution of the script is complete
#


# hostname
rac2
# /opt/app/oraInventory/orainstRoot.sh
Changing permissions of /opt/app/oraInventory to 775.
Changing groupname of /opt/app/oraInventory to oinstall.
The execution of the script is complete
#


# hostname
rac1
# /opt/app/crs/root.sh
WARNING: directory '/opt/app' is not owned by root
Checking to see if Oracle CRS stack is already configured
Checking to see if any 9i GSD is up
/etc/oracle does not exist. Creating it now.

Setting the permissions on OCR backup directory
Setting up NS directories
Oracle Cluster Registry configuration upgraded successfully
WARNING: directory '/opt/app' is not owned by root
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node :
node 1: rac1 rac1priv rac1
node 2: rac2 rac2priv rac2
Creating OCR keys for user 'root', privgrp 'system'..
Operation successful.
Now formatting voting device: /dev/rdy_vote1024m
Format of 1 voting devices complete.
Startup will be queued to init within 30 seconds.
Adding daemons to inittab
Adding daemons to inittab
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
rac1
CSS is inactive on these nodes.
rac2
Local node checking complete.
Run root.sh on remaining nodes to start CRS daemons.


#
# hostname
rac2
# /opt/app/crs/root.sh
WARNING: directory '/opt/app' is not owned by root
Checking to see if Oracle CRS stack is already configured
Checking to see if any 9i GSD is up
/etc/oracle does not exist. Creating it now.

Setting the permissions on OCR backup directory
Setting up NS directories
Oracle Cluster Registry configuration upgraded successfully
WARNING: directory '/opt/app' is not owned by root
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node :
node 1: rac1 rac1priv rac1
node 2: rac2 rac2priv rac2
clscfg: Arguments check out successfully.

NO KEYS WERE WRITTEN. Supply -force parameter to override.
-force is destructive and will destroy any previous cluster
configuration.
Oracle Cluster Registry for cluster has already been initialized
Startup will be queued to init within 30 seconds.
Adding daemons to inittab
Adding daemons to inittab
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
rac1
rac2
CSS is active on all nodes.
Waiting for the Oracle CRSD and EVMD to start
Oracle CRS stack installed and running under init(1M)
Running vipca(silent) for configuring nodeapps
The given interface(s), "en4" is not public. Public interfaces should be used to configure virtual IPs.
#


# hostname
rac1
#
# cd /opt/app/crs/bin
# ./vipca


# ./crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2
#





16、 安装Oracle RAC 数据库10.2.0.2

安装database

设置环境变量

编辑文件~oracle/.profile

ORACLE_BASE=/opt/app
export ORACLE_BASE

/cdrom/cd0/database/runInstaller
$
$ /cdrom/cd0/database/runInstaller
**************************************************************************
******

Your platform requires the root user to perform certain pre-installation
OS preparation. The root user should run the shell script 'rootpre.sh' be
fore
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/OraInstall2006-12-21_04-54-25PM. Please wait ...




$ hostname
rac1
$ su -
root's Password:
# /opt/app/oracle/root.sh
Running Oracle10 root.sh script...

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /opt/app/oracle

Enter the full pathname of the local bin directory: [/usr/local/bin]:
Creating /usr/local/bin directory...
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
#

$ hostname
rac2
$ su -
root's Password:
# /opt/app/oracle/root.sh
Running Oracle10 root.sh script...

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /opt/app/oracle

Enter the full pathname of the local bin directory: [/usr/local/bin]:
Creating /usr/local/bin directory...
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.

#



17、 创建数据库

cd /oradata
mkdir arch1
mkdir arch2
chown oracle:dba arch*

设置环境变量

编辑文件~oracle/.profile

$ hostname
rac1
$ cat .profile
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:.
export PATH

if [ -s "$MAIL" ] # This is at Shell startup. In normal
then echo "$MAILMSG" # operation, the Shell checks
fi # periodically.

ORACLE_BASE=/opt/app
export ORACLE_BASE

ORACLE_HOME=/opt/app/oracle
export ORACLE_HOME

ORACLE_SID=oradb1
export ORACLE_SID
$

$ hostname
rac2
$ cat .profile

PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:.
export PATH

if [ -s "$MAIL" ] # This is at Shell startup. In normal
then echo "$MAILMSG" # operation, the Shell checks
fi # periodically.

ORACLE_BASE=/opt/app
export ORACLE_BASE

ORACLE_HOME=/opt/app/oracle
export ORACLE_HOME

ORACLE_SID=oradb2
export ORACLE_SID
$


规划数据库建在raw卷上,

文件dbca_file

system=/dev/rdy_system_1024m
sysaux=/dev/rdy_sysaux_800m
example=/dev/rdy_example_800m
users=/dev/rdy_users_800m
temp=/dev/rdy_temp_4096m
undotbs1=/dev/rdy_undo1_4096m
undotbs2=/dev/rdy_undo2_4096m
redo1_1=/dev/rdy_redo1_1_500m
redo1_2=/dev/rdy_redo1_2_500m
redo2_1=/dev/rdy_redo2_1_500m
redo2_2=/dev/rdy_redo2_2_500m
control1=/dev/rdy_ctl1_110m
control2=/dev/rdy_ctl2_110m
spfile=/dev/rdy_spfile_110m
pwdfile=/dev/rdy_pwdfile_100m


export DBCA_RAW_CONFIG=dbca_file


18、 创建数据库

19、升级数据库到102020

$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.oradb.db application ONLINE ONLINE rac1
ora....radb.cs application ONLINE ONLINE rac1
ora....db1.srv application ONLINE ONLINE rac1
ora....db2.srv application ONLINE ONLINE rac2
ora....b1.inst application ONLINE ONLINE rac1
ora....b2.inst application ONLINE ONLINE rac2
ora....C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora....C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2


$ ps -ef|grep ora_
oracle 409634 1 0 14:09:57 - 0:00 ora_diag_oradb1
oracle 463034 1 0 14:10:04 - 0:00 ora_arc0_oradb1
oracle 508090 1 0 14:09:58 - 0:00 ora_reco_oradb1
oracle 598222 1 0 14:09:58 - 0:00 ora_smon_oradb1
oracle 606366 1 0 14:09:57 - 0:00 ora_psp0_oradb1
oracle 610330 1 0 14:09:58 - 0:00 ora_s000_oradb1
oracle 618498 1 0 14:09:58 - 0:00 ora_lgwr_oradb1
oracle 639126 1 0 14:09:58 - 0:01 ora_mman_oradb1
oracle 643198 1 1 14:09:57 - 0:00 ora_lmd0_oradb1
oracle 647174 1 0 14:10:06 - 0:00 ora_qmnc_oradb1
oracle 651460 1 0 14:09:58 - 0:01 ora_lms1_oradb1
oracle 655360 1 0 14:09:57 - 0:00 ora_lmon_oradb1
oracle 663590 1 0 14:09:58 - 0:01 ora_lms0_oradb1
oracle 692362 1 0 14:09:58 - 0:00 ora_dbw0_oradb1
oracle 696326 1 0 14:09:58 - 0:00 ora_ckpt_oradb1
oracle 737464 1 0 14:09:58 - 0:00 ora_mmnl_oradb1
oracle 745508 1 0 14:09:58 - 0:00 ora_d000_oradb1
oracle 753824 1 0 14:09:58 - 0:00 ora_cjq0_oradb1
oracle 757818 1 0 14:09:57 - 0:00 ora_pmon_oradb1
oracle 770098 1 0 14:10:04 - 0:00 ora_arc1_oradb1
oracle 774360 1 0 14:09:59 - 0:00 ora_lck0_oradb1
oracle 786544 1 0 14:20:01 - 0:00 ora_pz99_oradb1
oracle 790752 1 0 14:11:32 - 0:00 ora_q002_oradb1
oracle 798890 1 0 14:10:16 - 0:00 ora_q001_oradb1
oracle 802882 1 0 14:09:58 - 0:00 ora_mmon_oradb1
$


$ ps -ef|grep ora_
oracle 348392 1 0 14:10:03 - 0:00 ora_lgwr_oradb2
oracle 389130 1 0 14:10:03 - 0:00 ora_lmd0_oradb2
oracle 397496 1 0 14:18:51 - 0:00 ora_pz99_oradb2
oracle 454860 1 0 14:10:03 - 0:00 ora_cjq0_oradb2
oracle 475384 1 0 14:10:03 - 0:00 ora_dbw0_oradb2
oracle 483368 1 0 14:10:12 - 0:00 ora_qmnc_oradb2
oracle 491774 1 0 14:10:03 - 0:00 ora_pmon_oradb2
oracle 499878 1 0 14:10:04 - 0:00 ora_s000_oradb2
oracle 577544 1 0 14:10:22 - 0:00 ora_q001_oradb2
oracle 594036 1 1 14:10:03 - 0:01 ora_lms1_oradb2
oracle 610346 585978 0 14:21:07 pts/2 0:00 grep ora_
oracle 614638 1 0 14:10:10 - 0:00 ora_arc0_oradb2
oracle 618546 1 0 14:10:03 - 0:00 ora_d000_oradb2
oracle 622656 1 0 14:10:05 - 0:00 ora_lck0_oradb2
oracle 630964 1 0 14:10:03 - 0:00 ora_diag_oradb2
oracle 634910 1 0 14:10:03 - 0:00 ora_mmon_oradb2
oracle 647410 1 0 14:10:03 - 0:00 ora_ckpt_oradb2
oracle 671852 1 0 14:10:10 - 0:00 ora_arc1_oradb2
oracle 676036 1 0 14:10:03 - 0:00 ora_lmon_oradb2
oracle 684178 1 0 14:10:03 - 0:00 ora_reco_oradb2
oracle 688178 1 0 14:10:22 - 0:00 ora_q000_oradb2
oracle 708766 1 0 14:10:03 - 0:00 ora_psp0_oradb2
oracle 721110 1 0 14:10:03 - 0:00 ora_smon_oradb2
oracle 729196 1 0 14:10:03 - 0:01 ora_lms0_oradb2
oracle 745650 1 0 14:10:03 - 0:01 ora_mman_oradb2
oracle 758006 1 0 14:17:13 - 0:00 ora_j000_oradb2
oracle 774242 1 0 14:10:03 - 0:00 ora_mmnl_oradb2
$

[@more@]

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

转载于:http://blog.itpub.net/9650775/viewspace-919903/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值