Oracle 10G RAC+Linux+ASM Installation Guide
1. Software Preparation
- 10201_database_linux_x86_64.cpio - Oracle 10.2.0.1 database software
- 10201_clusterware_linux_x86_64.cpio.gz - Oracle 10.2.0.1 clusterware software
- p8202632_10205_Linux-x86-64.zip - Oracle 10.2.0.5 upgrade package
2. System Environment Setup
| Hostname | IP Addresses | Operating System |
|---|---|---|
| rac1 | eth0 public 172.44.2.18 eth1 private 172.44.4.18 vip 172.44.2.180 | CentOS 5.8 x86_64 |
| rac2 | eth0 public 172.44.2.22 eth1 private 172.44.4.22 vip 172.44.2.220 | CentOS 5.8 x86_64 |
3. Installation Process
3.1 Installation Prerequisites
This installation is performed on ESXi 5.5 with CentOS 5.8 for Oracle 10G RAC+ASM.
3.1.1 ESXi Shared Disk Configuration
- Add 5 disks to the virtual machine on ESXi: 1 for OCR, 1 for VOTE, and others for data storage
- Set SCSI bus sharing policy to "Virtual"
- Use thick provisioning for all disks
3.2 Install Database Dependencies
sudo yum -y install binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel elfutils-libelf-devel-static gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers kernel-headers ksh libaio libaio-devel libgcc libgomp libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel libXp
3.3 Configure Kernel Parameters
sudo vim /etc/sysctl.conf
kernel.shmall = 17179869184
kernel.shmmni = 4096
kernel.sem = 250 32000 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
sudo sysctl -p
3.4 Configure User Limits
sudo vim /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
3.5 Configure /etc/pam.d/login
sudo vim /etc/pam.d/login
session required pam_limits.so
3.6 Configure Time Synchronization
sudo /usr/sbin/ntpdate 172.44.3.101 && /sbin/hwclock –w
sudo crontab -e
* * * * * (/usr/sbin/ntpdate 172.44.3.101 && /sbin/hwclock -w) &> /dev/null
sudo vim /etc/modprobe.conf
options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180
sudo modprobe -v hangcheck-timer
3.7 Create User and Groups
sudo groupadd -g 1000 dbinstall
sudo groupadd -g 1001 dbadmin
sudo useradd -g dbinstall -G dbadmin oracle
3.8 Configure /etc/hosts
sudo vim /etc/hosts
# Add the following entries
172.44.2.18 rac1
172.44.2.22 rac2
172.44.4.18 rac1priv
172.44.4.22 rac2priv
172.44.2.180 rac1vip
172.44.2.220 rac2vip
3.9 Configure SSH Trust Between Nodes
On node 1:
sudo su - oracle
ssh-keygen -t rsa
On node 2:
sudo su - oracle
ssh-keygen -t rsa
On both nodes:
cd .ssh/
cat id_rsa.pub > authorized_keys
vim authorized_keys
Exchange authorized_keys content between nodes and verify:
ssh rac1
ssh rac2
ssh rac1priv
ssh rac2priv
3.10 Configure Oracle Environment Varialbes
On node 1:
vim .bash_profile
ORACLE_BASE=/u01/app/oracle
ORA_CRS_HOME=$ORACLE_BASE/product/10.2.0/crs
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
ORACLE_SID=test1
PATH=$PATH:$ORA_CRS_HOME/bin:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:.
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
stty erase ^h
export NLS_LANG=AMERICAN_AMERICA.UTF8
export NLS_DATE_FORMAT='yyyymmdd hh24:mi:ss'
On node 2:
vim .bash_profile
ORACLE_BASE=/u01/app/oracle
ORA_CRS_HOME=$ORACLE_BASE/product/10.2.0/crs
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
ORACLE_SID=test2
PATH=$PATH:$ORA_CRS_HOME/bin:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:.
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
stty erase ^h
export NLS_LANG=AMERICAN_AMERICA.UTF8
export NLS_DATE_FORMAT='yyyymmdd hh24:mi:ss'
3.11 Configure Shared Disks
On node 1:
fdisk /dev/sdb
fdisk /dev/sdc
fdisk /dev/sdd
fdisk /dev/sde
fdisk /dev/sdf
partprobe
On both nodes:
vim /etc/udev/rules.d/60-raw.rules
ACTION=="add", KERNEL=="sdb1",RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", KERNEL=="sdc1",RUN+="/bin/raw /dev/raw/raw2 %N"
ACTION=="add", KERNEL=="sdd1",RUN+="/bin/raw /dev/raw/raw3 %N"
ACTION=="add", KERNEL=="sde1",RUN+="/bin/raw /dev/raw/raw4 %N"
ACTION=="add", KERNEL=="sdf1",RUN+="/bin/raw /dev/raw/raw5 %N"
ACTION=="add",KERNEL=="raw[1-5]", OWNER="oracle", GROUP="dbinstall", MODE="660"
sudo start_udev
raw -qa
3.12 Create Installation Directories
sudo mkdir -p /u01/app/oracle/product/10.2.0/crs
sudo mkdir -p /u01/app/oracle/product/10.2.0/db_1
sudo mkdir -p /u01/oradata
sudo chown -R oracle.dbinstall /u01
3.13 Extract Oracle Clusterware Package
cpio -idcmv < 10201_clusterware_linux_x86_64.cpio
3.14 Install Clusterware
- Run rootpre.sh on both nodes
- Execute ./runInstaller –ignoreSysPrereqs
- Select CRS home directory
- Verify instalation requirements
- Enter information for the second node
- Confirm node information
- Modify network interface usage
- Select OCR path
- Select Voting Disk
- Begin installation
- Execute root scripts on both nodes
3.15 Install Database Software
- Run data base installer
- Select Enterprise Edition
- Select DB HOME
- Select both nodes
- Verify requirements
- Select software-only installation
- Begin installation
- Execute root scripts on both nodes
3.16 Install Listener
- Run netca
- Select cluster configuration
- Select both nodes
- Complete configuration
3.17 Create Database
- Run dbca
- Select create database
- Select both nodes
- Enter database name
- Configure passwords
- Use ASM
- Configure ASM parameters
- Configure ASM disks
- Select data file location
- Configure database character set
- Complete installation
3.18 Upgrade CRS
unzip p8202632_10205_Linux-x86-64.zip
cd Disk1/
# Follow installer steps
# Stop CRS and apply patch
sudo /u01/app/oracle/product/10.2.0/crs/bin/crsctl stop crs
sudo /u01/app/oracle/product/10.2.0/crs/install/root102.sh
3.19 Upgrade Database Software
- Stop CRS on both nodes
- Follow installer steps
- Execute root scripts on both nodes
- Start CRS
3.20 Upgrade Database
sqlplus "/as sysdba"
create pfile='/tmp/pfile.txt' from spfile='+DATADG/test/spfiletest.ora';
# Edit pfile to set *.cluster_database=false
startup upgrade pfile='/tmp/pfile.txt';
@?/rdbms/admin/catupgrd.sql
shutdown immediate;
startup;