1.Oracle 官方安装文档中(下文中的doc 2,doc 3),有多处错误。最新的 Release Notes (August 2006)
更正了一些,但还有不少未得到更正。
2.文中的三个脚本,在使用之前请仔阅读。如不当使用导致系统损坏与本文作者无关。
3.本文所用的安装步骤尽可能依照Oracle 的官方安装文档。但有一处“Configuring UDP parameters” 不得不改用其他
方法,因为 Oracle 官方安装文档中讲的方法不起作用。
Part1Do the Pre-installation Tasks
This is a guide for installing Oracle 10g RAC with Oracle clusterware on Solaris9SPARC 64-Bit
Enterprise Edition.
Followed intrusions in these doc:
1. Oracle Database Release Notes
10g Release 2 (10.2) for Solaris Operating System (SPARC 64-Bit)Part Number B15689-03
2. Oracle Clusterware and Oracle Real Application Clusters Installation Guide
10g Release 2 (10.2) for Solaris Operating SystemPart Number B14205-06
3. Oracle Database Installation Guide
10g Release 2 (10.2) for Solaris Operating System (SPARC 64-Bit)Part Number B15690-02
The Hardware:
Two Ultra-2 Enterprise servers. cpu:300MHz x 2, memory:1024mb. storage:Sun A1010 disk array
A Sun fiber channel host adapter(X1057A) is installed on each node to connect to the A1010
with a fiber cable. A Sun multi-pack is connected to one of the Ultra-2 servers.
A 10BT network card is installed on each node for the private network.
A crossover network cable connects the two 10BT network cards.
(Oracle10 does not support the crossover network cable, according to doc 2)
A SBUS Frame Buffer (X359A) is installed on both nodes.
Because the hardware is barely meet the requirement, it is only good for testing.
The OS:
Install Solaris9 4/04(64-Bit) on both nodes, and install the latest patch cluster.
Configure Tcpwrappers and NTP the two nodes. Solaris9 includes these two packages.
Install openssh-4.3p2-sol9-sparc-local on the two nodes.
Secure and harden the systems by following some procedures in the doc
SANS Solaris Security Step by Step Version 2.0:
http://www.depts.ttu.edu/tosm/se ... actices/solaris.pdf
The Media for Installation:
Oracle Database 10g Release2 10.2.0.1.0 for Solaris SPARC 64-bit Enterprise Edition
If possible, download 10.2.0.2 and up, so you will install less patches afterwards.
I have to copy the two DVDs to local hard disks, since the Ultra-2 does not have a DVD drive.
You might want to configure a NFS server on node1 and an auto client on node2,
so you can run the Cluster Verification Utility on node2 as well.
The steps of the installation/configuration:
1. Do the pre-installation tasks
2. Install Oracle clusterweare
3. Test/verify the clusterware
4. Install Oracle Database software only with RAC.
5. Configure ASM and make sure it is running on both nodes.
6. Create a RAC database with DBCA.
Disk & shared storage configuration:
----------------------------------------------------------------------------------------------------------
packages required real type mount point partition
----------------------------------------------------------------------------------------------------------
DB software 4GB 4GB UFS /u01/app/oracle c0t1d0s0 (not shared)
DB datafiles1.2GB 12GB ASM c3t0d2s7,c3t1d2s7,c3t3d2s7
OCR 100MB 128MBraw c3t0d4s6,c3t2d4s6,c3t4d4s6
Voting disk 20MB 32MB raw c3t0d4s7,c3t2d4s7,c3t4d4s7
swap 400MB 1GB c0t0d0s1
----------------------------------------------------------------------------------------------------------
The clusterware will be installed in it's own home directory on node1.
The redundancy level of OCR and voting disk will be "normal".
Because this is for testing only, no space allocated for flash recovery and log archiving.
Pre-Installation Tasks
A.
Network configuration
This part is done manually. Here is the files on node1 as an example:
/etc/hosts
127.0.0.1 localhost
# node1
192.168.1.64 rac1rac1.abc.com loghost
10.10.10.1 rac1-priv rac1-priv.abc.com
192.168.1.69 rac1-viprac1-vip.abc.com
# node2
192.168.1.77 rac2 rac2.abc.com
10.10.10.2 rac2-priv rac2-priv.abc.com
192.168.1.76 rac2-viprac2-vip.abc.com
/etc/inet/netmasks
192.168.0.0 255.255.255.0
10.10.10.0 255.255.255.0
/etc/hostname.hme0
rac1
/etc/hostname.le0
10.10.10.1
/etc/defaultrouter
192.168.1.1
/etc/hosts.allow
ALL: 192.168.1. 127.0.0.1 10.
Run these commands to bring up the network interface le0 and test it.
# chown root:root /etc/hostname.le0
# ifconfig le0 plumb
# ifconfig le0 10.10.10.1 netmask 255.255.255.0 up
# ifconfig -a
lo0: flags=1000849
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843
inet 192.168.1.64 netmask ffffff00 broadcast 192.168.1.255
ether 8:0:20:82:47:d4
le0: flags=1000843
inet 10.10.10.1 netmask ffffff00 broadcast 10.10.10.255
ether 8:0:20:82:47:d4
#
To check the network setup, run the CVU now or run it after all tasks is done.
The command is:
/ora10.dvd2/clusterware/cluvfy/runcluvfy.sh comp nodecon -n rac1,rac2 -verbose
B.
Other pre-installation tasks except Configuring SSH
A shell script is created for doing most of the tasks: pre.install.ora10.conf.sh
The script will do the pre-installation tasks of the clusterware and most of the
pre-installation tasks of the Oracle database. It is only to run on a new installation
of a Solaris 9 system. Run this script on both nodes as root.
pre.install.ora10.conf.sh
------------------------------------------------------------
#!/bin/sh
# Pre-installation conf. on Solaris9 for installing Oracle 10g R2 with RAC.
# Written by susbin@chinaunix.net072406
sc_name=pre.install.ora10.conf.sh
ORACLE_BASE=/u01/app/oracle;export ORACLE_BASE
CRS_BASE=/u01/crs/oracle/product/10;export CRS_BASE
ORACLE_HOME=${CRS_BASE}/app;export ORACLE_HOME
PATH=$PATH:/usr/ccs/bin:/usr/local/bin;export PATH
echo ===============================================================
echo $sc_name started at `date`.
echo " "
echo " "
echo "=============================================="
echo "Creating Required Operating System Groups and Users"
echo " "
echo "Creating groups: dba, osdba, and oinstall."
groupadd -g 201 dba
groupadd -g 202 oinstall
groupadd -g 203 osdba
echo "Check them with the command: grep 20 /etc/group"
grep 20 /etc/group
echo " "
echo "Check if "nobody" exists on the system with: id nobody"
echo ""
id -a nobody
echo " "
echo "Creating the directory "ORACLE_BASE", which is set to $ORACLE_BASE"
mkdir -p $ORACLE_BASE
echo "Check it with the command: ls -l /u01/app "
echo ""
ls -l /u01/app
echo " "
echo "Creating a user account "oracle" and set the password of it:"
useradd -u 1005 -g 202 -G 201,203 -d $ORACLE_BASE -m -s /bin/ksh oracle
echo "Check the line in /etc/passwd with: grep oracle /etc/passwd"
grep oracle /etc/passwd
echo "Set the password of account oracle:"
passwd -r files oracle
chown -R oracle