Dsvolk > > Oracle > > Linux > > InstallRHAS My Blog | Search | About
(Not Logged In)
[ welcome! ] [ news ] [ install ] [ jump-jet ] [ app ] [ rac ] [ papers ] [ dba ] [ dvp ] [ racdd4d ] [ oem ] [ statspack ] [ education ] [ tuning ] [ ias ] [ backup ] [ dataprotection ] [ security ] [ oid ] [ options ] [ integration ] [ sales ] [ sun ] [ linux ] [ consulting ] [ faq ]

RHAS and Oracle

Соглашение о материалах на этом сайте

Мой oracle blog
true dsvolk!
oracle and opensource  

Установка Oracle 9.2.0.4 RAC на Red Hat Advanced Server (RHAS) 3

(несколько сумбурно написано и я действительно рекомендую более строгую инструкцию Werner )

Моя презентация Oracle 9i RAC, включая видео-ролики (avi, 27mb) с описываемого ниже работающего стенда. 

Для интересующихся будущим - Oracle 10g RAC by Gordon Smith, Director, RAC Product Management.

Before install:

Metalink: Certify - Product Selection: Real Application Clusters 

Before  install  Oracle DB on Linux your must read first  Werner's Linux Page. This story based on Werner's site.

Others usefull source may be oracle-base

Может быть также полезны следующие статьи и документы:

Oracle9i Real Application Clusters Quick Installation Guide for Linux x86

Tips and Techniques: Install and Configure Oracle9i on Red Hat Linux Advanced Server

Metalink notes:

Step-By-Step Installation of 9.2.0.4 RAC on Linux

RAC on Linux Best Practices

Requirements for Installing Oracle 9iR2 on RHEL3

Configuring RHAS 30 for Usage with Oracle

 

Надеюсь что Вам будут полезны собранные скрипты (создание БД, запуск БД )

 

Аппаратная платформа

Серверы:
  - 3 Sun V60, 2 Xeon 2.8Ghz, 2 Gb Memory, Dual Gb adapters, SAN адаптер QLA2200
Дисковый массив:
  - Sun StorEdge 3510
SAN:
 - "фабрика" на основе FC-коммутаторов Brocade
Ethertnet:
- 1 Gbit Ethernet коммутатор Nortel 5510
ПО:
Oracle Cluster Filesystem.

Полная спецификация на V60 можно найти на sunsolve.sun.com.

Схема стенда приведена на рисунке ниже:

 

 

Устанавливаем  RHAS

Сама установка достаточно подробно описана в документе Sun Fire V60x and Sun Fire V65x Linux Operating System Installation Guide или в документе Tips and Techniques: Install and Configure Oracle9i on Red Hat Linux Advanced Server. Wizard достаточно дружелюбен. Рекомендую также среди предлагаемых к установке пакетов установить поддержку telnet (относиться к Legacy Network). Есть еще замечание к установке - разметка внутреннего диска. Я использовал следующую:

/ 2 GB

/boot 100 Mb

/tmp 1 Gb

/usr 12 Gb 

/var 1Gb 

swap  2Gb 

/home 13 Gb    where $ORACLE_HOME

В результате установки мы получаем ядро версии 2.4.21-4.ELsmp:

[root@rac1pub root]# uname -a
Linux rac1pub 2.4.21-4.ELsmp #1 SMP Fri Oct 3 17:52:56 EDT 2003 i686 i686 i386 GNU/Linux

Настраиваем сетевые интерфейсы

Проблем с определением двух сетевых плат у меня не возникло. Все определилось успешно.  

Каждый сервер должен быть сконфигурирован с двумя статическими интерфейсами из разных подсетей. Один из интерфейсов используется как interconnect, другой как public сетью. Строго говоря, двух интерфейсов не требуется, но крайне рекомендуется. 11 подсеть настраивалась у меня на интерфейсы eth0, 1 подсеть на eth1. Для конфигурации сетевых интерфейсов я пользовался утилитами neat (redhat-config-network). В результате получаем следующий результат:

[root@rac1pub root]# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:07:E9:07:07:79 
inet addr:192.168.11.15 Bcast:192.168.11.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:329995 errors:0 dropped:0 overruns:0 frame:0
TX packets:26758 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000 
RX bytes:24154627 (23.0 Mb) TX bytes:21997934 (20.9 Mb)
Interrupt:31 Base address:0x2400 Memory:fe6a0000-fe6c0000 

eth1 Link encap:Ethernet HWaddr 00:07:E9:07:07:78 
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000 
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:30 Base address:0x2440 Memory:fe680000-fe6a0000  
 
 
[root@rac1pub root]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost

# Public hostnames - public network

192.168.11.15 rac1pub rac1pub.service.jet.msk.su # RAC node 1, Ether0
192.168.11.16 rac2pub rac2pub.service.jet.msk.su # RAC node 2
192.168.11.17 rac3pub rac3pub.service.jet.msk.su # RAC node 3

# Private hostnames, private network - interconnect

192.168.1.1 rac1prv rac1prv.service.jet.msk.su # RAC node 1 Ether1
192.168.1.2 rac2prv rac2prv.service.jet.msk.su # RAC node 2
192.168.1.3 rac3prv rac3prv.service.jet.msk.su # RAC node 3

Будьте внимательны, обязательно сначала имя хоста, потом полное доменное имя. Так нужно для OEM. Другие полезные настройки, которые я выполнил (привожу для сервера rac1pub). 

more /etc/sysconfig/networking/profiles/default/network
HOSTNAME=rac1pub
more /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=rac1pub
more /etc/resolv.conf
search service.jet.msk.su jet.msk.su
nameserver 192.168.11.2

После конфигурации сетевых интерфейсов стоит доустановить  службу  ftp сервер (wu-ftpd). 

rpm -ivh wu-ftpd-2.6.1-20.i386.rpm

Разрешим службы telnet и ftp:

/sbin/chkсonfig telnet on
/sbin/chkсonfig wu-ftpd on

Разрешим доступ root пользователя через telnet и ftp.

Разрешим службу RSH. Для этого надо доустановить 2 rpm пакета:

su - root
rpm -ivh rsh-0.17-5.i386.rpm rsh-server-0.17-5.i386.rpm
Для того чтобы разрешить "rsh" service, необходимо установить атрибут  "disable" в файле  /etc/xinetd.d/rsh в "no" и перестартовать сервис 

xinetd must be refreshed. This can be done by running the following commands:

su - root
chkconfig rsh on
chkconfig rlogin on
service xinetd reload
Для того, чтобы пользователь oracle мог входить без пароля на другие сервера кластера необходимо создать /etc/hosts.equiv
su - root
touch /etc/hosts.equiv
chmod 600 /etc/hosts.equiv
chown root.root /etc/hosts.equiv
$ cat /etc/hosts.equiv
+rac1prv oracle
+rac2prv oracle
+rac3prv oracle
+rac1pub oracle
+rac2pub oracle
+rac3pub oracle

Доустанавливаем необходимые пакеты

# С диска 2 дистрибутива edHat AS3 
cd /mnt/cdrom/RedHat/RPMS
rpm -Uvh setarch-1.3-1.i386.rpm
rpm -Uvh tcl-8.3.5-92.i386.rpm

# С диска 3 дистрибутива RedHat AS3
cd /mnt/cdrom/RedHat/RPMS
rpm -Uvh openmotif21-2.1.30-8.i386.rpm
rpm -Uvh compat-db-4.0.14-5.i386.rpm \
         compat-gcc-7.3-2.96.122.i386.rpm \
         compat-gcc-c++-7.3-2.96.122.i386.rpm \
         compat-libstdc++-7.3-2.96.122.i386.rpm \
         compat-libstdc++-devel-7.3-2.96.122.i386.rpm

Помещаем  gcc296 and g++296 первыми в переменной  $PATH создавая следующие символические линкиs:

mv /usr/bin/gcc /usr/bin/gcc323
mv /usr/bin/g++ /usr/bin/g++323
ln -s /usr/bin/gcc296 /usr/bin/gcc
ln -s /usr/bin/g++296 /usr/bin/g++
Устанавливаем Java development kit:
# Make the bin file executable
chmod u+x j2sdk-1_3_1_10-linux-i586.rpm.bin
# Run the bin file. Agree to the terms and conditions.
./j2sdk-1_3_1_10-linux-i586.rpm.bin
# Install the RPM file.
rpm -ivh jdk-1.3.1_10.i586.rpm
 

Необходимо скачать и установить патч  p3006854_9204_LINUX.zip из http://metalink.oracle.com. См.  bug 3006854.

su - root
#unzip p3006854_9204_LINUX.zip
Archive:  p3006854_9204_LINUX.zip
   creating: 3006854/
  inflating: 3006854/rhel3_pre_install.sh
  inflating: 3006854/README.txt

# cd 3006854
# sh rhel3_pre_install.sh
Applying patch...
Patch successfully applied

Системные переменные 

cat /etc/sysctl.conf

kernel.shmmax = 2147483648
kernel.shmmni = 128
kernel.shmall = 2097152
kernel.sem = 250 32000 100 128
fs.file-max = 65536 
net.ipv4.ip_local_port_range = 1024 65000

net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.rmem_max=262144
net.core.wmem_max=262144

Выполните также изменения в файле /etc/security/limits.conf

cat /etc/security/limits.conf


oracle soft nofile 65536
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384

Все вышеперечисленные изменения нужно выполнить на всех серверах кластера. 

Hangcheck-timer

Модуль Hangcheck-timer устанавливать не надо. Он уже есть. Проверьте это и проставьте ему рекомендуемые параметры:

find /lib/modules -name "hangcheck-timer.o"
/lib/modules/2.4.21-4.EL/kernel/drivers/char/hangcheck-timer.o
/lib/modules/2.4.21-4.ELsmp/kernel/drivers/char/hangcheck-timer.o
[root@linux-b hangcheck-0.8.0]# /sbin/insmod hangcheck-timer hangcheck_tick=30 hangcheck_margin=180
Using /lib/modules/2.4.21-4.ELsmp/kernel/drivers/char/hangcheck-timer.o
[root@linux-b hangcheck-0.8.0]# grep Hangcheck /var/log/messages |tail -1
Jan 30 20:47:01 linux-b kernel: Hangcheck: Using TSC.
[root@linux-b hangcheck-0.8.0]# echo "options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180" >> /etc/modules.conf
[root@linux-b hangcheck-0.8.0]# modprobe hangcheck-timer
[root@linux-b hangcheck-0.8.0]# grep Hangcheck /var/log/messages |tail -1
Jan 30 20:47:01 linux-b kernel: Hangcheck: Using TSC.

Создаем пользователя oracle

Creating Oracle User Accounts

su - root
groupadd dba          # group of users to be granted with SYSDBA system privilege
groupadd oinstall     # group owner of Oracle files
useradd -c "Oracle software owner" -g oinstall -G dba oracle
passwd oracle
For more information on the "oinstall" group account, see
When to use "OINSTALL" group during install of oracle.

Creating Oracle Directories

In this example, make sure that the /home filesystem is large enough, see
Oracle Disk Space for more information. 

If /opt is not on a separate filesystem, then make sure the root filesystem "/" has enough space.

 

su - root
mkdir /home/oracle
mkdir /home/oracle/product
mkdir /home/oracle/product/9.2.0
chown -R oracle.oinstall /home/oracle
                                           
mkdir /var/opt/oracle
chown oracle.dba /var/opt/oracle
chmod 755 /var/opt/oracle

Setting Oracle Environments

 

Set the following Oracle environment variables before you start runInstaller.

As the oracle user execute the following commands:
# Set the LD_ASSUME_KERNEL environment variable only for Red Hat 9 and
# for Red Hat Enterprise Linux Advanced Server 3 (RHEL AS 3) !!
# Use the "Linuxthreads with floating stacks" implementation instead of NPTL:
export LD_ASSUME_KERNEL=2.4.1

# Oracle Environment
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=/opt/oracle/product/9.2.0
export ORACLE_SID=test
export ORACLE_TERM=xterm
# export TNS_ADMIN= Set if sqlnet.ora, tnsnames.ora, etc. are not in $ORACLE_HOME/network/admin
export NLS_LANG=AMERICAN;
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH

# Set shell search paths
export PATH=$PATH:$ORACLE_HOME/bin

 

 

 

Размещаем файлы данных

Варианта у нас есть два - использовать для файлов БД OCFS или сырые устройства. 

Я предпочел в целом разместить БД на сырых устройствах, позже подключив и OCFS для не важных файлов данных. Предполагаю позже провести и сравнение производительности. 

Размечаем сырые устройства

После подключения сервера в SAN и перезагрузки сервера в выводе команды dmesg удалось увидеть следующие строчки:

SCSI device sdb: 41943040 512-byte hdwr sectors (21475 MB)
sdb: sdb1
SCSI device sdc: 204800 512-byte hdwr sectors (105 MB)
sdc: sdc1
SCSI device sdd: 10240 512-byte hdwr sectors (5 MB)
sdd: sdd1
SCSI device sde: 20971520 512-byte hdwr sectors (10737 MB)
sde: sde1
SCSI device sdf: 4194304 512-byte hdwr sectors (2147 MB)
sdf: sdf1
SCSI device sdg: 4194304 512-byte hdwr sectors (2147 MB)
sdg: sdg1
SCSI device sdh: 204800 512-byte hdwr sectors (105 MB)
sdh: sdh1
SCSI device sdi: 204800 512-byte hdwr sectors (105 MB)
sdi: sdi1
SCSI device sdj: 204800 512-byte hdwr sectors (105 MB)
sdj: sdj1
SCSI device sdk: 4194304 512-byte hdwr sectors (2147 MB)
sdk: sdk1
SCSI device sdl: 204800 512-byte hdwr sectors (105 MB)
sdl: sdl1
SCSI device sdm: 20480 512-byte hdwr sectors (10 MB)
sdm: sdm1
SCSI device sdn: 2048 512-byte hdwr sectors (1 MB)
sdn: sdn1
SCSI device sdo: 10240 512-byte hdwr sectors (5 MB)
sdo: sdo1
SCSI device sdp: 2097152 512-byte hdwr sectors (1074 MB)
sdp: sdp1
SCSI device sdq: 1024000 512-byte hdwr sectors (524 MB)
 sdq: sdq1
SCSI device sdr: 41943040 512-byte hdwr sectors (21475 MB)
 sdr: sdr1
SCSI device sds: 204800 512-byte hdwr sectors (105 MB)
 sds: sds1
SCSI device sdt: 204800 512-byte hdwr sectors (105 MB)
 sdt: sdt1
SCSI device sdu: 204800 512-byte hdwr sectors (105 MB)
 sdu: sdu1
SCSI device sdv: 4194304 512-byte hdwr sectors (2147 MB)
 sdv: sdv1
SCSI device sdw: 204800 512-byte hdwr sectors (105 MB)
 sdw: sdw1

Удивительным образом размеры устройств совпадали с теми, которые я просил сделать на массиве. Возможно, если раньше на массиве была какая-то FS потребуется ее удалить и переразметить каждое из устройств (привожу для sdb): 

dd if=/dev/zero of=/dev/sdb bs=512 count=16
fdisk /dev/sdb 
N, p, 1, <enter> <enter> w

Чтобы в Linux появились raw устройства нам необходимо  воспользоваться командочкой raw. Man raw сообщает нам что "raw is used to bind a Linux raw character device to a block device". И при каждом запуске сервера это нужно повторять (см. файл raw.sh)

raw /dev/raw/raw1 /dev/sdm1 # 10Mb Used for the Cluster Manager Quorum File

raw /dev/raw/raw2 /dev/sdc1 # 100Mb Used for the Shared Configuration file for srvctl

raw /dev/raw/raw3 /dev/sdn1 # 1Mb spfileorcl.ora

raw /dev/raw/raw4 /dev/sdw1 # 50 Mb control01.ctl
raw /dev/raw/raw5 /dev/sdu1 # 50 Mb control02.ctl

raw /dev/raw/raw6 /dev/sde1 # 10Gb indx01.dbf
raw /dev/raw/raw7 /dev/sdp1 # 1Gb system01.dbf
raw /dev/raw/raw8 /dev/sdk1 # 2Gb temp01.dbf

raw /dev/raw/raw9 /dev/sdf1 # 2Gb undotbs01.dbf
raw /dev/raw/raw10 /dev/sdg1 # 2Gb undotbs02.dbf
raw /dev/raw/raw11 /dev/sdv1 # 2Gb undotbs03.dbf

raw /dev/raw/raw12 /dev/sdr1 # 20Gb users01.dbf
raw /dev/raw/raw14 /dev/sdq1 # 512m tools01.dbf

raw /dev/raw/raw21 /dev/sdl1 # 104 MB redo1.log
raw /dev/raw/raw22 /dev/sds1 # 104 MB redo2.log
raw /dev/raw/raw23 /dev/sdt1 # 104 MB, redo3.log
raw /dev/raw/raw24 /dev/sdh1 # 104 MB, redo4.log
raw /dev/raw/raw25 /dev/sdi1 # 104 MB, redo5.log
raw /dev/raw/raw26 /dev/sdj1 # 104 MB, redo6.log
# /dev/sdb: Left it untouched since I want to keep it for my OCFS filesystem - 20Gb

Естественно что я сделал символические линки на мои сырые устройства (см. файл raw.sh)

Установка OCFS

Необходимо скачать пакеты с сервера oss.oracle.com и выполнить их установку и настройку в соответствии с OCFS Userguide. В принципе, там все не сложно. Скачать можно здесь:

http://oss.oracle.com/projects/ocfs/files/RedHat/RHEL3/i386/

su - root
mkdir /oradata
[root@rac3pub tmp]# chown oracle:dba /oradata

Запускаем ocfstool, делаем generate config, создаем и форматируем новую файловую систему, монтируем ее. 

Не забудьте поправить fstab 

cat /etc/fstab
/dev/sdb1 /oradata ocfs _netdev 0 0

Перегружаемся, проверяем все ли работает. Я рекомендую, если Вы вообще решите использовать OCFS, перед установкой БД добиться того, чтобы как минимум с двух уззлов OCFS заработала. Так выглядит работающий вариант:

OCFS

rpm -ivh ocfs-support-1.0.9-12.i686.rpm ocfs-2.4.21-EL-smp-1.0.9-12.i686.rpm ocfs-tools-1.0.9-12.i686.rpm

mkdir /oradata
[root@rac3pub tmp]# cho
chooser chown 
[root@rac3pub tmp]# chown oracle:dba /oradata

mount ocfstool

 

]# load_ocfs 

/etc/init.d/ocfs start

 

/etc/fstab

/dev/sdb1 /oradata ocfs _netdev 0 0

 

 

 

Разворачиваем патч к нему

 Next unpack the contents of the files:

cpio -idmv < lnx_920_disk1.cpio
cpio -idmv < lnx_920_disk2.cpio
cpio -idmv < lnx_920_disk3.cpio
 
PATH 9.2.0.4
mkdir 92040
unzip -d 92040 p3095277_9204_LINUX.zip
cd 92040
cpio -idmv < 9204_lnx32_release.cpio

 

 

Ставим Cluster Manager 

Может оказаться полезным отказаться от всех переменных окружения ORA*

su - oracle
$ /mnt/cdrom/runInstaller

 - Welcome Screen:          Click Next
 - Inventory Location:      Click OK
 - Unix Group Name:         Use "oinstall".
 - Root Script Window:      Open another window, login as root, and run /tmp/orainstRoot.sh
                             on the node where you are running this installation (runInstaller). 
                             After you run the script, click Continue.
 - File Locations:          Check the defaults. I used the default values and clicked Next.
 - Available Products:      Select "Oracle Cluster Manager 9.2.0.1.0"
 - Public Node Information:
     Public Node 1:         rac1pub
     Public Node 2:         rac2pub
     Public Node 3:         rac3pub
                            Click Next.
 - Private Node Information:
     Private Node 1:        rac1prv
     Private Node 2:        rac2prv
     Private Node 3:        rac3prv
                            Click Next.
 - WatchDog Parameter:      Accept the default value and click Next. We won't use the Watchdog.
 - Quorum Disk Information: /var/opt/oracle/oradata/orcl/CMQuorumFile
                            Click Next.
 - Summary:                 Click Install
 - When installation has completed, click Exit.
Applying Oracle9i Cluster Manager 9.2.0.4.0 Patch Set

To patch the Oracle Cluster Manager, launch the installer either from /mnt/cdrom/runInstaller or from $ORACLE_HOME/bin/runInstaller
su - oracle
$ $ORACLE_HOME/bin/runInstaller
 - Welcome Screen:         Click Next
 - Inventory Location:     Click Next
 - File Locations:         - Click "Browse for the Source"
                            - Navigate to the stage directory where the patch set is located.
                              On my system it is: "/tmp/Disk1/stage"
                            - Select the "products.jar" file.
                            - Click OK
                            - Click Next on the File Location screen
 - Available Products:     Select "Oracle9iR2 Cluster Manager 9.2.0.4.0
 - Public Node Information:
     Public Node 1:        rac1pub
     Public Node 2:        rac2pub
     Public Node 3:        rac3pub
 - Private Node Information:
     Private Node 1:       rac1prv
     Private Node 2:       rac2prv
     Private Node 3:       rac3prv
 - Summary:                Click Install
 - When installation has completed, click Exit.

 

 

Configuring Oracle 9i Cluster Manager

The following changes have to be done on ALL RAC nodes.

It is not necessary to run the watchdogd daemon with the Oracle Cluster Manager 9.2.0.2 or with any newer version. Since watchdogd has been replaced with the
hangcheck-timer kernel module, some files need to be updated.

The following changes need to be done if the Oracle9i Cluster Manager 9.2.0.1.0 has been patched to e.g. version 9.2.0.4.0 as described under Applying Oracle9i Cluster Manager 9.2.0.4.0 Patch Set.


REMOVE or comment out the following line(s) from the $ORACLE_HOME/oracm/admin/ocmargs.ora file:
watchdogd
REMOVE the following line(s) from the $ORACLE_HOME/oracm/admin/cmcfg.ora file:
WatchdogSafetyMargin=5000
WatchdogTimerMargin=60000
ADD the following line to the $ORACLE_HOME/oracm/admin/cmcfg.ora file:
KernelModuleName=hangcheck-timer
ADJUST the value of the MissCount parameter in the $ORACLE_HOME/oracm/admin/cmcfg.ora file based on the sum of the hangcheck_tick and hangcheck_margin values. The MissCount parameter must be set to at least 60 and it must be greater than the sum of hangcheck_tick + hangcheck_margin. In my example, hangcheck_tick + hangcheck_margin is 210. Therefore I set MissCount in $ORACLE_HOME/oracm/admin/cmcfg.ora to 215.
MissCount=215
My $ORACLE_HOME/oracm/admin/cmcfg.ora file looks as follows:
HeartBeat=15000
ClusterName=Oracle Cluster Manager, version 9i
PollInterval=1000
MissCount=215
PrivateNodeNames=rac1prv rac2prv rac3prv
PublicNodeNames=rac1pub rac2pub rac3pub
ServicePort=9998
CmDiskFile=/var/opt/oracle/oradata/orcl/CMQuorumFile
HostName=rac1prv
KernelModuleName=hangcheck-timer

MODIFY the $ORACLE_HOME/oracm/bin/ocmstart.sh file and comment out the following lines:
# watchdogd's default log file
#WATCHDOGD_LOG_FILE=$ORACLE_HOME/oracm/log/wdd.log

# watchdogd's default backup file
#WATCHDOGD_BAK_FILE=$ORACLE_HOME/oracm/log/wdd.log.bak

# Get arguments
#watchdogd_args=`grep '^watchdogd' $OCMARGS_FILE |\
#  sed -e 's+^watchdogd *++'`

# Check watchdogd's existance
#if watchdogd status | grep 'Watchdog daemon active' >/dev/null
#then
#  echo 'ocmstart.sh: Error: watchdogd is already running'
#  exit 1
#fi

# Backup the old watchdogd log
#if test -r $WATCHDOGD_LOG_FILE
#then
#  mv $WATCHDOGD_LOG_FILE $WATCHDOGD_BAK_FILE
#fi

# Startup watchdogd
#echo watchdogd $watchdogd_args
#watchdogd $watchdogd_args

Starting and Stopping Oracle 9i Cluster Manager

To start the Cluster Manager (CM) and Node Monitor oracm, run the following commands on all RAC nodes:
su - root
# . ~oracle/.bash_profile      # Set Oracle environment
# $ORACLE_HOME/oracm/bin/ocmstart.sh
oracm </dev/null 2>&1 >/opt/oracle/product/9.2.0/oracm/log/cm.out &
#
# ps -ef |grep oracm
root     15249     1  0 Nov08 pts/2    00:00:00 oracm
root     15251 15249  0 Nov08 pts/2    00:00:00 oracm
root     15252 15251  0 Nov08 pts/2    00:00:00 oracm
root     15253 15251  0 Nov08 pts/2    00:00:00 oracm
root     15254 15251  0 Nov08 pts/2    00:00:04 oracm
root     15255 15251  0 Nov08 pts/2    00:00:00 oracm
root     15256 15251  0 Nov08 pts/2    00:00:00 oracm
root     15257 15251  0 Nov08 pts/2    00:00:00 oracm
root     15258 15251  0 Nov08 pts/2    00:00:00 oracm
root     15298 15251  0 Nov08 pts/2    00:00:00 oracm
root     15322 15251  0 Nov08 pts/2    00:00:00 oracm
root     15540 15251  0 Nov08 pts/2    00:00:00 oracm
#
NOTE:

Once the Cluster Manager is upgraded, oracm won't come up any more if you use OCFS. It will always die after a few seconds. To fix this run the following command on only one RAC node:
su - oracle
dd if=/dev/zero of=/var/opt/oracle/oradata/orcl/CMQuorumFile bs=4096 count=96
After that restart CM.

To stop oracm, you have to kill it:
su - root
pkill oracm
For more information on Oracle cluster administration, see
Oracle9i Real Application Clusters Administration.

 

For Raw Devices:
In Creating Partitions for Raw Devices I created a 20 MB partitions (raw device) for the shared configuration file. The device name of the shared configuration file is /dev/sda1 which is bound to /dev/raw/raw2.
Optionally, you can create a soft link to this raw device. If you haven't done it yet as show under Creating Partitions for Raw Devices, do it now by running the following command on all RAC nodes:
su - oracle
ln -s /dev/raw/raw2 /var/opt/oracle/oradata/orcl/SharedSrvctlConfigFile

 

Installing Oracle9i 9.2.0.1.0 Database Software with Oracle9i Real Application Cluster

Теперь переменные окружения нужны !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

 

 

su - root
mount /mnt/cdrom
And in another terminal, run the following commands. Do not change directory to /mnt/cdrom before running the runInstaller script, or you will be unable to unmount Disk1 and mount Disk2 and Disk3.
su - oracle
$ /mnt/cdrom/runInstaller
 - Welcome Screen:         Click Next
 - Cluster Node Selection: Select/Highlight all RAC nodes using the shift key and the left mouse button.
                           Click Next
                           Note: If not all RAC nodes are showing up, or if the Node Selection Screen
                           does not appear, then the Oracle Cluster Manager (Node Monitor) oracm is probably not
                           running on all RAC nodes. See Starting and Stopping Oracle 9i Cluster Manager for more information.
 - File Locations:         Click Next
 - Available Products:     Select "Oracle9i Database 9.2.0.1.0" and click Next
 - Installation Types:     Select "Enterprise Edition" and click Next
 - Database Configuration: Select "Software Only" and click Next
 - Shared Configuration File Name:
                           Enter the name of an OCFS shared configuration file or the name of
                           the raw device name.
                           Select "/var/opt/oracle/oradata/orcl/SharedSrvctlConfigFile" and click Next
 - Summary:                Click Install.
                           When the window for running "root.sh" comes up, run it on ALL RAC servers before 
			clicking "OK". See below.
 - When installation has completed, click Exit.

   When the Oracle Enterprise Manager Console comes up, don't install a database yet.

ins_oemagent ERROR

5) Apply patch 2617419 to install opatch 2.2, needed to apply next patch
6) Apply patch 3119415 using opatch - make sure "fuser" utility is in path of account doing the install

su - root
unzip p3119415_9203_LINUX.zip
cd 3119415
soure ~oracle/.bash_profile
sh patch.sh
Once this is complete click the retry button. Ignore the ins_ctx.mk error as this is fixed in the 9.2.0.4.0 patch.

Perfoming Remote operations:

[root@rac1pub 3119415]# ps -ef | grep idmuc
oracle 16543 6571 0 18:51 pts/1 00:00:00 /bin/sh -c cpio -oac < /tmp/OraInstall2004-02-04_06-15-10PM/xx01 | /usr/bin/rsh rac2pub /bin/sh -c "cd /; cpio -idmuc "
oracle 16547 16543 1 18:51 pts/1 00:00:00 /usr/bin/rsh rac2pub /bin/sh -c cd /; cpio -idmuc 
oracle 16548 16547 12 18:51 pts/1 00:00:01 /usr/bin/rsh rac2pub /bin/sh -c cd /; cpio -idmuc 
root 16552 6329 0 18:51 pts/1 00:00:00 grep idmuc

 

root.sh on all nodes !-----------------------------------------------------

non ssl 7777--------------------

ssl 7778

ssl 4443

 

With the installation complete start the 9.2.0.4.0 patchset installation by issuing the following command in the 92040/Disk1 directory:

./runInstaller
First complete the "Oracle Universal Installer 2.2.0.18.0" installation option, 
su - oracle
cd $ORACLE_BASE/oui/bin/linux
ln -s libclntsh.so.9.0 libclntsh.so
If you don't create the link, runInstaller will crash with an error messages similar to this one:
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x40008e4a
Function name=_dl_lookup_symbol
Library=/lib/ld-linux.so.2

 Затем запускаем runinstaller из $ORACLE_HOME/bin !!!!!!!!!!!!!!!!!!!!!!

 

then complete the "Oracle9iR2 Patch Set 3 9.2.0.4.0" installation.

The installation is now complete.

 

Запускаем gds. Если не работает то читаем:

Note:212631.1
Subject: Resolving PRKR-1064 in a RAC Environment
Type: PROBLEM
Status: PUBLISHED
Doc ID: Note:178683.1
Subject: Tracing GSD, SRVCTL, GSDCTL, and SRVCONFIG
Type: BULLETIN
Status: PUBLISHED

 

Может помочь также нижеописанная процедура:

mkdir /var/opt/oracle

chown -R oracle:dba /var/opt/oracle

chown -R oracle:dba /var/opt/oracle
[root@rac2pub root]# echo "srvconfig_loc=/home/oracle/product/9.2/oradata/SharedSrvctlConfigFile">>/var/opt/oracle/srvConfig.loc

Только на одной ноде !!!

srvconfig -init -f

Потом 

$ srvctl add database -d <db_name> -o $ORACLE_HOME

$ srvctl add instance -d <db_name> -i <instance_name> -n <node1>

$ srvctl add instance -d <db_name> -i <instance_name> -n <node2>

$ srvctl config database -d <db_name>

$srvctl status database -d ORCL

[oracle@rac1pub oracle]$ $ gsdctl start

$ gsdctl start Successfully started GSD on local node

Разное 

Если Вы хотите сконфигурировать БД с помощью  ODCA то необходимо знать что он потребует:

Running Oracle Database Configuration Assistant

  • Seven raw devices for seven tablespace datafiles
  • At least two raw devices for control files
  • One raw device for each instance for its own tablespace for automatic undo management, or one rollback segment tablespace to use manual undo management
  • At least two raw devices for redo log files for each instance
  • One raw device for the server parameter file and five additional raw devices, one for each of the following features: Context, Oracle9i interMedia, OLAP (Online Analytical Processing), XML DB (Extensible Markup Language), and ODM (Oracle Data Mining)

 Запускать его так:

dbca -datafileDestination $ORACLE_HOME/oradata

 

Изменяем параметры на всех экземплярах сразу:

ALTER SYSTEM SET OPEN_CURSORS=2000 sid='*' SCOPE=MEMORY;

 

TAF

http://otn.oracle.com/deploy/availability/htdocs/taf.html

ndd' /dev/tcp parameter tcp_ip_abort_cinterval

TAF различные сценарии и настройки

http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_id=97926.1&p_database_id=NOT

http://metalink.oracle.com/metalink/plsql/ml2_documents.showNOT?p_id=97926.1&p_showHeader=1&p_showHelp=1#513

А также  

Doc ID: Note:226880.1
Subject: Configuration of Load Balancing and Transparent Application Failover
Type: BULLETIN
Status: PUBLISHED

 

Если Вам захочется поставить OEM Agent'a - ничего сразу не вйдет

OEM Agent и все такое

http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=158295.1

Fix for bug 2013059 (Linux platform only)

 

If the intelligent agent is running on the linux platform then the agent will not discover the database as a RAC database due to bug 2013059. The underlying problem is that when the agent is started it does not pick up the value of the environment variable LD_LIBRARY_PATH and therefore the execution of the $ORACLE_HOME/bin/lsnodes fails to find the necessary shared libraries. Once lsnodes fails the agent assumes that this is NOT a RAC installation and therefore skips the remainder of the RAC tests.

 

There is no patch for the bug at this time. However, the problem can be resolved by copying (or soft-linking) the shared libraries needed by lsnodes to the /usr/lib directory. It is recommended that the files be linked using a soft link, however, a copy of the files will work as well. The following commands set up the proper soft links that will allow the agent to execute the lsnodes command properly:

 

$ ln –s $ORACLE_HOME/lib/libcmdll.so /usr/lib/libcmdll.so

$ ln –s $ORACLE_HOME/lib/libcxa.so.3 /usr/lib/libcxa.so.3

# For Oracle Intelligent Agent 

mkdir -p $ORACLE_HOME/network/agent/log 

mkdir -p $ORACLE_HOME/network/agent/reco 

Start Intelligent Agent on all nodes

To start the Intelligent Agent (and the Data Gatherer in a 9.x installation) use the agentctl utility as shown below. Refer to note <Note:152586.1> and the Oracle Enterprise Manager 9i configuration Guide for more information on the agentctl utility:

 

            agentctl start

Очень важно - убедитесь что  в /etc/hosts правальный порядок сначала имя потом с именем домена а в /etc/oratab ORCL:N !!!!!

Before Start applay Patch 3238244

Also make sure the opatch script appears in your $PATH. See "Patching Oracle9iR2 on Red Hat AS 3" for information on getting and installing opatch. To verify if opatch is in your $PATH, run the which command:
$ su - oracle
$ which opatch
/tmp/OPatch/opatch
$

To apply now the patch, run:
$ su - oracle
$ unzip p3238244_9204_LINUX.zip
$ cd 3238244
$ export PATH=$PATH:/sbin        # the patch needs "fuser" which is located in /sbin
$ opatch apply

cd $ORACLE_HOME/network/lib $ make -f ins_oemagent.mk install

 

srvctl stop instance -d ORCL -i orcl1 -o abort

srvctl status database -d ORCL

 

 

Другие полезные ссылки:

Oracle® Real Application Clusters Installation and Configuration Guide
10g Release

http://download-uk.oracle.com/docs/html/B10766_01/prelinux.htm#CEGBCGBJ

Raw Devices on RedHat Advanced Server 
http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=224302.1

Техническое описание Red Hat 3

http://otn.oracle.com/tech/linux/pdf/RHEL3technicalPDF.pdf

Dsvolk > > Oracle > > Linux > > InstallRHAS Last Modified: 11-05-2004 10:44