在多數業務中
在Oracle RAC
在本文中
當前環境
出於演示目的
數據庫名
節點編號
數據庫版本
實例編號
操作系統內核版本
文件系統
集群管理器
SSKYDB
四個節點 — oradb
四個實例 — SSKY
Red Hat Enterprise Linux AS
Linux
OCFS
Oracle 集群件
該過程將通過以下
第
任何軟件安裝或升級的第一個主要步驟都是確保系統的完整備份可用
新節點應該具有與現有節點相同的操作系統版本
除了基本的操作系統外
[root@oradb
compat
compat
libgcc
gcc
[root@oradb
openmotif
openmotif
[root@oradb
glibc
glibc
glibc
glibc
glibc
glibc
[root@oradb
compat
compat
compat
compat
compat
[root@oradb
使用以下值更新內核參數
re_uses_pid =
kernel
kernel
kernel
#kernel
kernel
kernel
kernel
kernel
kernel
kernel
fs
net
re
re
re
re
將下列參數添加到 /etc/security/nf
oracle soft nproc
oracle hard nproc
oracle soft nofile
oracle hard nofile
將設備添加到 /etc/fstab — 將設備定義從現有節點之一復制到 oradb
[root@oradb
LABEL=/ / ext
none /dev/pts devpts gid=
none /proc proc defaults
none /dev/shm tmpfs defaults
/dev/sda
/dev/cdrom /mnt/cdrom udf
/dev/fd
/dev/sdb
/dev/sdb
/dev/sdb
/dev/sdb
/dev/sdb
/dev/sdb
/dev/sdb
接下來
[oracle@oradb
uid=
作為根連接到 oradb
groupadd
groupadd
groupadd
當創建這些組之後
useradd
passwd oracle
Changing password for user oracle
New password:
Retype new password:
passwd: all authentication tokens updated successfully
當創建組和用戶之後
[root@oradb
uid=
第
在節點 oradb
root@oradb
#Private Network/interconnect
# VIP
用 SSH 建立用戶等效項
當前
[oracle@oradb
Generating public/private dsa key pair
Enter file in which to save the key (/home/oracle/
Created directory
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/
Your public key has been saved in /home/oracle/
The key fingerprint is:
b
[oracle@oradb
[oracle@oradb
[oracle@oradb
當創建完密鑰並將其復制到所有節點之後
以下輸出是從節點 oradb
[oracle@oradb
[oracle@oradb
[oracle@oradb
[oracle@oradb
注意
第
Oracle 集群件已經安裝在集群上
集群驗證
cluvfy stage
Performing post
Checking node reachability
Node reachability check passed from node
Checking user equivalence
User equivalence check passed for user
Checking node connectivity
Node connectivity check passed for subnet
Node connectivity check passed for subnet
Suitable interfaces for the private interconnect on subnet
oradb
oradb
Suitable interfaces for the private interconnect on subnet
oradb
oradb
Checking shared storage accessibility
Shared storage check failed on nodes
Post
正如突出顯示的部分一樣
如果忽略該錯誤繼續安裝
Checking shared storage accessibility
Shared storage check passed on nodes
Post
[oracle@oradb
Performing pre
Checking node reachability
Node reachability check passed from node
Checking user equivalence
User equivalence check passed for user
Checking administrative privileges
User existence check passed for
Group existence check passed for
Membership check for user
Check failed on nodes:
oradb
Administrative privileges check passed
Checking node connectivity
Node connectivity check passed for subnet
Node connectivity check passed for subnet
Suitable interfaces for the private interconnect on subnet
oradb
oradb
Suitable interfaces for the private interconnect on subnet
oradb
oradb
Checking system requirements for
Total memory check passed
Check failed on nodes:
oradb
Free disk space check passed
Swap space check passed
System architecture check passed
Kernel version check passed
Package existence check passed for
Package existence check passed for
Package existence check passed for
Package existence check passed for
Package existence check passed for
Package existence check passed for
Package existence check passed for
Package existence check passed for
Package existence check passed for
Package existence check passed for
Package existence check passed for
Group existence check passed for
Group existence check passed for
User existence check passed for
System requirement failed for
Pre
第
運行 OUI 需要執行該安裝程序的終端與 X
export DISPLAY=<client IP address>
例如
[oracle@oradb
公共節點名稱
私有節點名稱
虛擬主機名稱
oradb
/usr/app/oracle/oraInventory/orainstRoot
[root@oradb
Changing permissions of /usr/app/oracle/oraInventory to
Changing groupname of /usr/app/oracle/oraInventory to dba
The execution of the script is complete
[root@oradb
/usr/app/oracle/product/
[root@oradb
clscfg: EXISTING configuration version
clscfg: version
Attempting to add
Using ports: CSS=
node <nodenumber>: <nodename> <private interconnect name> <hostname>
node
Creating OCR keys for user
Operation successful
/usr/app/oracle/product/
add nodeapps
[root@oradb
/usr/app/oracle/product/
[root@oradb node
WARNING: directory
WARNING: directory
WARNING: directory
Checking to see if Oracle CRS stack is already configured
/etc/oracle does not exist
OCR backup directory
does not exist
Setting the permissions on OCR backup directory
Setting up NS directories
Oracle Cluster Registry configuration upgraded successfully
WARNING: directory
WARNING: directory
WARNING: directory
clscfg: EXISTING configuration version
clscfg: version
assigning default hostname oradb
Successfully accumulated necessary OCR keys
Using ports: CSS=
node
node
node
node
clscfg: Arguments check out successfully
NO KEYS WERE WRITTEN
configuration
Oracle Cluster Registry for cluster has already been initialized
Startup will be queued to init within
Adding daemons to inittab
Expecting the CRS daemons to be up within
CSS is active on these nodes
oradb
oradb
oradb
oradb
oradb
CSS is active on all nodes
Waiting for the Oracle CRSD and EVMD to start
Oracle CRS stack installed and running under init(
Running vipca(silent) for configuring nodeapps
IP address
Enter an unused IP address
產生錯誤
使用 VIPCA 手動配置 VIP
export DISPLAY=<client IP address>
例如
[oracle@oradb
I
II
III
IV
V
VI
完成 Oracle 集群件安裝後
集群件文件
[root@oradb
[root@oradb
使用以下條目更新了操作系統提供的 inittab 文件
[root@oradb
# Run xdm in runlevel
x:
h
h
h
[oracle@oradb
oradb
oradb
oradb
oradb
oradb
[oracle@oradb
[oracle@oradb
Name Type Target State Host
ora
ora
ora
ora
ora
ora
ora
ora
ora
ora
ora
[oracle@oradb
eth
inet addr:
UP BROADCAST RUNNING MASTER MULTICAST MTU:
RX packets:
TX packets:
collisions:
RX bytes:
eth
inet addr:
UP BROADCAST RUNNING MASTER MULTICAST MTU:
RX packets:
TX packets:
collisions:
RX bytes:
Interrupt:
注意
第
下一步是在新節點上安裝 Oracle 軟件
[root@oradb
Running Oracle
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /usr/app/oracle/product/
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file
[n]: y
Copying dbhome to /usr/local/bin
The file
[n]: y
Copying oraenv to /usr/local/bin
The file
[n]: y
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
Now product
當安裝 RDBMS 軟件之後
第
DBCA 具有將附加實例添加到集群所需的所有選項
要求
Username
Password:< > 並單擊 Next
a
b
c
a
SQL> select * from v$active_instances;
INST_NUMBER INST_NAME
b
SQL> SELECT NAME
NAME STATE TYPE
ASMGRP
ASMGRP
SQL> SELECT NAME FROM V$DATAFILE;
NAME
+ASMGRP
+ASMGRP
+ASMGRP
+ASMGRP
+ASMGRP
+ASMGRP
c
集群中的新實例
[oracle@oradb
Instance SSKY
Instance SSKY
Instance SSKY
Instance SSKY
Instance SSKY
數據庫服務
[oracle@oradb
Service CRM is running on instance(s) SSKY
Service CRM is running on instance(s) SSKY
Service CRM is running on instance(s) SSKY
Service CRM is running on instance(s) SSKY
Service CRM is running on instance(s) SSKY
Service PAYROLL is running on instance(s) SSKY
Service PAYROLL is running on instance(s) SSKY
第
為便於管理和導航
[oracle@oradb
# Get the aliases and functions
if [
fi
# User specific environment and startup programs
export ORACLE_BASE=/usr/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/
export ORA_CRS_HOME=$ORACLE_BASE/product/
export PATH=
export PATH=${PATH}:$ORA_CRS_HOME/bin
export PATH=${PATH}:/usr/bin:/bin:/usr/bin/X
export ORACLE_ADMIN=$ORACLE_BASE/admin
export TNS_ADMIN=$ORACLE_HOME/network/admin
export LD_ASSUME_KERNEL=
export LD_LIBRARY=$ORACLE_HOME/lib
export LD_LIBRARY=${LD_LIBRARY}:/lib:/usr/lib:/usr/local/bin
export LD_LIBRARY=${LD_LIBRARY}:$ORA_CRS_HOME/lib
export CLASSPATH=$ORACLE_HOME/JRE
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export THREADS_FLAG=native
export ORACLE_SID=SSKY
將網絡地址添加到 DNS 以進行查看
還要將新網絡地址添加到 clinet tnsnames
CRAC =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oradb
(ADDRESS = (PROTOCOL = TCP)(HOST = oradb
(ADDRESS = (PROTOCOL = TCP)(HOST = oradb
(ADDRESS = (PROTOCOL = TCP)(HOST = oradb
(ADDRESS = (PROTOCOL = TCP)(HOST = oradb
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = CRM)
)
)
如果這些服務器配置為使用 FAN 功能
[oracle@oradb
localport=
remoteport=
loglevel=
useocr=on
nodes=:
:
o:
結論
恭喜
數據庫名 節點編號 數據庫版本 實例編號 操作系統內核版本 文件系統 集群管理器
SSKYDB
五個節點 — oradb
五個實例 — SSKY
Red Hat Advanced Server
Linux
OCFS
Oracle 集群件
From:http://tw.wingwit.com/Article/program/Oracle/201311/17082.html