第一步,把要安装的节点date时间调整为较早一分钟
# date
Tue Dec 23 16:52:39 CST 2014
第二步,检查主机名,在两个节点分别修改/etc/hosts文件
# hostname
aix211
# cat /etc/hosts
127.0.0.1 loopbacklocalhost # loopback (lo0) name/address
192.168.1.211 aix211
192.168.1.212 aix212
192.168.1.227 aix211vip
192.168.1.230 aix212vip
10.10.10.211 aix211priv
10.10.10.212 aix212priv
# hostname
aix212
# cat /etc/hosts
127.0.0.1 loopback localhost # loopback (lo0) name/address
192.168.1.211 aix211
192.168.1.212 aix212
192.168.1.227 aix211vip
192.168.1.230 aix212vip
10.10.10.211 aix211priv
10.10.10.212 aix212priv
第三步,建立组,用户
Aix211
# id oracle
uid=1002(oracle) gid=1001(dba) groups=1000(hagsuser)
aix212
# id oracle
uid=1002(oracle) gid=1001(dba)
groups=1000(hagsuser)
第四步,配置两节点rsh互信,验证
Aix211
$pwd
/home/oracle
$ vi .rhosts
$ cat .rhosts
+
$ rsh aix212 date
Tue Dec 23 18:13:28 CST 2014
$ rsh aix211 date
Tue Dec 23 18:11:58 CST 2014
$ rsh aix211priv date
Tue Dec 23 18:12:13 CST 2014
$ rsh aix212priv date
Tue Dec 23 18:14:12 CST 2014
Aix212
$pwd
/home/oracle
$ vi .rhosts
$ cat .rhosts
+
$ rsh aix211 date
Tue Dec 23 18:11:45 CST 2014
$ rsh aix212 date
Tue Dec 23 18:14:46 CST 2014
$ rsh aix211priv date
Tue Dec 23 18:13:05 CST 2014
$ rsh aix212priv date
Tue Dec 23 18:15:01 CST 2014
第五步,确认/var及/tmp空间,/tmp不少于2G可用空间
# df -g
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/hd9var 2.12 1.98
7% 3570 1% /var
/dev/hd3 3.12 3.05
3% 1567 1% /tmp
# chfs–a size=+2G /tmp
第六步,修改/etc/security/limits
Aix211
# vi /etc/security/limits
# cat /etc/security/limits
default:
fsize = -1
core = -1
cpu = -1
data = -1
rss = -1
stack = -1
nofiles = -1
Aix212
# vi /etc/security/limits
# cat /etc/security/limits
default:
fsize = -1
core = -1
cpu = -1
data = -1
rss = -1
stack = -1
nofiles = -1
第七步,调整网络参数,并重启系统生效
no -p -o udp_sendspace=65536
no -p -o udp_recvspace=655360
no -p -o tcp_sendspace=65536
no -p -o tcp_recvspace=65536
no -p -o rfc1323=1
no -p -o sb_max=1310720
第八步,建立oracle安装目录文件系统
# smittycrfs
Aix211
# chown -R oracle:dba /oracle
Aix212
# chown -R oracle:dba /oracle
第九步,安装HACMP软件,升级HACMP软件,重启操作系统
# smittyinstallp
# shutdown -Fr
第十步,新建并发VG
Aix211
#smittymkvg
→add a scalable volumn group
→vg name:oravg
→pp size :256M
→activateautomatic:no
→major number:100
→concurrent:enhanced concurrent
→MAX PP:2048
→MAX LV:4096
lspv
Aix212
#smittyimportvg
→VG name:oravg
→major number:100
lspv
第十一步,配置HA集群
添加集群
→Extended Topology Configuration→Configure an HACMP
Cluster→Add a cluster
添加节点
→Extended Topology
Configuration→Configure HACMP Nodes→Add a node
→Node name:aix211
→Communication Path to Node:aix211
→Add a node
→Node name:aix212
→Communication Path to Node:aix212
发现资源
→Extended Configuration→Discover HACMP-related Information from configured nodes
配置HACMP网络
→Extended Topology Configuration→Configure HACMP
Networks→Add a Network to the HACMP Cluster→ether
→Network name:net_ether_01
→Network type:ether
→Netmask:255.255.255.0
→Enable IP Address Takeover via IP aliases:yes
→Network Attribute:public
→Add a Network to the HACMP Cluster→ether
→Network name:net_ether_02
→Network type:ether
→Netmask:255.255.255.0
→Enable IP Address Takeover via IP aliases:yes
→Network Attribute:private
配置通信接口
→Extended Topology Configuration→Configure HACMP
Communication Interfaces→Add Communication Interfaces→Add Discovered
Communication Interface→Communication Interfaces→net_ether_01→>en0
aix211 >en0 aix212
→Add Communication Interfaces→Add Discovered
Communication Interface→Communication Interfaces→net_ether_02→>en1
aix211priv >en1 aix212priv
添加资源组
→Extended Configuration→Extended ResourceGroup Configuration→Add a Resource Group
→Resource Group
Name:rac
→Participating Nodes (Default Node Priority):aix211,aix212
→Startup Policy:Online On All Available Nodes
→FalloverPolicy:Bring Offline(On Error Node only)
→Fallback Policy:Never Fallback
配置资源组
→Extended Configuration→Extended ResourceGroup Configuration→Change/Show
Resources and Attributes for a Resource Group
→Concurrent VolumnGroups:oravg
资源校验同步
→Extended Configuration→Extended Verification and Synchronization
启动HACMP服务
System
Management→Manage HACMP Services→Start Cluster Services
→Start Cluster Services on these nodes:aix211 aix212
查看VG无误
第十二步,在VG上新建对应各LV
mklv -y rac_system -T O -w n -s n -r n
oravg 3
mklv -y rac_sysaux -T O -w n -s n -r n
oravg 3
mklv -y rac_undotbs1 -T O -w n -s n -r n
oravg 2
mklv -y rac_undotbs2 -T O -w n -s n -r n
oravg 2
mklv -y rac_temp -T O -w n -s n -r n oravg
2
mklv -y rac_example -T O -w n -s n -r n
oravg 2
mklv -y rac_users -T O -w n -s n -r n oravg
2
mklv -y rac_redo1_1 -T O -w n -s n -r n
oravg 1
mklv -y rac_redo2_1 -T O -w n -s n -r n
oravg 1
mklv -y rac_redo3_1 -T O -w n -s n -r n
oravg 1
mklv -y rac_redo1_2 -T O -w n -s n -r n
oravg 1
mklv -y rac_redo2_2 -T O -w n -s n -r n
oravg 1
mklv -y rac_redo3_2 -T O -w n -s n -r n
oravg 1
mklv -y rac_control1 -T O -w n -s n -r n oravg
1
mklv -y rac_control2 -T O -w n -s n -r n
oravg 1
mklv -y rac_control3 -T O -w n -s n -r n
oravg 1
mklv -y rac_spfile -T O -w n -s n -r n
oravg 1
mklv -y ora_ocr_100m -T O -w n -s n -r n
oravg 1
mklv -y ora_vote_20m -T O -w n -s n -r n
oravg 1
第十三步,添加环境变量
$ vi .profile
$ 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.
export
ORACLE_BASE=/oracle/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2/db
export ORA_CRS_HOME=$ORACLE_BASE/product/10.2/crs
export
PATH=$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:$PATH
$ . ./.profile
# chown oracle:dba /dev/rora*
# chown oracle:dba /dev/rrac*
# ls -l /dev/rora*
crw-rw—- 1 oracle
dba 100, 18 Dec 23 20:07
/dev/rora_ocr_100m
crw-rw—- 1 oracle
dba 100, 19 Dec 23 20:07
/dev/rora_vote_20m
crw-rw—- 1 oracle
dba 10, 13 Dec 11 13:22
/dev/roralv
# ls -l /dev/rrac*
crw-rw—- 1 oracle
dba 100, 14 Dec 23 20:06
/dev/rrac_control1
crw-rw—- 1 oracle
dba 100, 15 Dec 23 20:07
/dev/rrac_control2
crw-rw—- 1 oracle
dba 100, 16 Dec 23 20:07
/dev/rrac_control3
crw-rw—- 1 oracle
dba 100, 6 Dec 23 20:06 /dev/rrac_example
crw-rw—- 1 oracle
dba 100, 8 Dec 23 20:06 /dev/rrac_redo1_1
crw-rw—- 1 oracle
dba 100, 11 Dec 23 20:06
/dev/rrac_redo1_2
crw-rw—- 1 oracle
dba 100, 9 Dec 23 20:06 /dev/rrac_redo2_1
crw-rw—- 1 oracle
dba 100, 12 Dec 23 20:06
/dev/rrac_redo2_2
crw-rw—- 1 oracle
dba 100, 10 Dec 23 20:06
/dev/rrac_redo3_1
crw-rw—- 1 oracle
dba 100, 13 Dec 23 20:06
/dev/rrac_redo3_2
crw-rw—- 1 oracle
dba 100, 17 Dec 23 20:07
/dev/rrac_spfile
crw-rw—- 1 oracle
dba 100, 2 Dec 23 20:06 /dev/rrac_sysaux
crw-rw—- 1 oracle
dba 100, 1 Dec 23 20:05 /dev/rrac_system
crw-rw—- 1 oracle
dba 100, 5 Dec 23 20:06 /dev/rrac_temp
crw-rw—- 1 oracle
dba 100, 3 Dec 23 20:06 /dev/rrac_undotbs1
crw-rw—- 1 oracle
dba 100, 4 Dec 23 20:06 /dev/rrac_undotbs2
crw-rw—- 1 oracle
dba 100, 7 Dec 23 20:06 /dev/rrac_users
第十五步,解压CRS软件并开始安装
指定路径/crs
解决(必须在两节点均运行):
# pwd
/soft/fix
# ls
ORCLcluster pw-syscall
README.txt pw-syscall32
loadext pw-syscall64
p6718715_10203_AIX64-5L.zip rootpre.sh
# ./rootpre.sh
./rootpre.sh output will be logged in
/tmp/rootpre.out_14-12-24.09:53:48
Saving the original files in
/etc/ora_save_14-12-24.09:53:48….
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: 0x50add000
Successfully configured
/etc/pw-syscall.64bit_kernel with kmid: 0x50add000
The kernel extension was successfuly
loaded.
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.
去掉中划线与下划线:
更改对外IP的属性为Public
指定OCR
指定VDL
开始安装:
开始使用ROOT执行指定脚本
Aix211:
#
/oracle/app/oracle/oraInventory/orainstRoot.sh
Changing permissions of
/oracle/app/oracle/oraInventory to 775.
Changing groupname of /oracle/app/oracle/oraInventory
to dba.
The execution of the script is complete
Aix212:
#
/oracle/app/oracle/oraInventory/orainstRoot.sh
Changing permissions of
/oracle/app/oracle/oraInventory to 775.
Changing groupname of
/oracle/app/oracle/oraInventory to dba.
The execution of the script is complete
Aix211:
#
/oracle/app/oracle/product/10.2/crs/root.sh
WARNING: directory
‘/oracle/app/oracle/product/10.2’ is not owned by root
WARNING:
directory ‘/oracle/app/oracle/product’ is not owned by root
WARNING: directory ‘/oracle/app/oracle’ is
not owned by root
WARNING: directory ‘/oracle/app’ is not
owned by root
WARNING: directory ‘/oracle’ 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 ‘/oracle/app/oracle/product/10.2’ is not owned by root
WARNING: directory
‘/oracle/app/oracle/product’ is not owned by root
WARNING:
directory ‘/oracle/app/oracle’ is not owned by root
WARNING: directory ‘/oracle/app’ is not
owned by root
WARNING: directory ‘/oracle’ is not owned
by root
Successfully accumulated necessary OCR
keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898
and EVMR=49897.
node<nodenumber>:
<nodename><private interconnect name><hostname>
node 3: aix211 aix211priv aix211
node 4: aix212 aix212priv aix212
Creating OCR keys for user ‘root’, privgrp
‘system’..
Operation successful.
Now formatting voting device:
/dev/rora_vote_20m
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.
aix211
CSS is inactive on these nodes.
aix212
Local node checking complete.
Run root.sh on remaining nodes to start CRS
daemons.
Aix212:
#
/oracle/app/oracle/product/10.2/crs/root.sh
WARNING: directory
‘/oracle/app/oracle/product/10.2’ is not owned by root
WARNING:
directory ‘/oracle/app/oracle/product’ is not owned by root
WARNING: directory ‘/oracle/app/oracle’ is
not owned by root
WARNING: directory ‘/oracle/app’ is not
owned by root
WARNING: directory ‘/oracle’ 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 ‘/oracle/app/oracle/product/10.2’ is not owned by root
WARNING: directory
‘/oracle/app/oracle/product’ is not owned by root
WARNING:
directory ‘/oracle/app/oracle’ is not owned by root
WARNING: directory ‘/oracle/app’ is not
owned by root
WARNING: directory ‘/oracle’ 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<nodenumber>:
<nodename><private interconnect name><hostname>
node 3: aix211 aix211priv aix211
node 4: aix212 aix212priv aix212
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.
aix211
aix212
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), “en0” is
not public. Public interfaces should be used to configure virtual IPs.
手动执行VIPCA(root):
公共IP位于en0
将vip写入
# ./crs_stat -t
Name Type Target State
Host
————————————————————
ora.aix211.gsd application ONLINE
ONLINE aix211
ora.aix211.ons application ONLINE
ONLINE aix211
ora.aix211.vip application ONLINE
ONLINE aix211
ora.aix212.gsd application ONLINE
ONLINE aix212
ora.aix212.ons application ONLINE
ONLINE aix212
ora.aix212.vip application ONLINE
ONLINE aix212
第十六步,安装数据库软件
安装类型 custom:
安装位置选择两个节点:
不更改组件选择,继续
只安装数据库:
#
/oracle/app/oracle/product/10.2/db/root.sh
Running Oracle10 root.sh script…
The following environment variables are set
as:
ORACLE_OWNER= oracle
ORACLE_HOME=
/oracle/app/oracle/product/10.2/db
Enter the full pathname of the local bin
directory: [/usr/local/bin]:
The file “dbhome” already exists
in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file “oraenv” already exists
in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file “coraenv” already exists
in /usr/local/bin. Overwrite it? (y/n)
[n]:
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.
升级CRS:
选择HOME1
使用脚本完成升级:
Aix211:
#/oracle/app/oracle/product/10.2/crs/bin/crsctl
stop crs
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
Aix212:
#/oracle/app/oracle/product/10.2/crs/bin/crsctl
stop crs
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
Aix211:
#
/oracle/app/oracle/product/10.2/crs/install/root102.sh
Error : Please change the CRS_ORACLE_USER
id <oracle> to have the following OS capabilities :
<
CAP_PROPAGATE CAP_BYPASS_RAC_VMM CAP_NUMA_ATTACH >
by running </usr/bin/chuser> command
then ‘crsctl stop crs’ and ‘crsctl start crs’.
The CSS daemon,
ocssd.bin, will not run in realtimewithout
this change
Oracle strongly recommends that the CSS
daemon run realtime
Creating
pre-patch directory for saving pre-patch clusterware files
Completed patching clusterware files to
/oracle/app/oracle/product/10.2/crs
Relinking some shared libraries.
Relinking of patched files is complete.
WARNING:
directory ‘/oracle/app/oracle/product/10.2’ is not owned by root
WARNING: directory
‘/oracle/app/oracle/product’ is not owned by root
WARNING:
directory ‘/oracle/app/oracle’ is not owned by root
WARNING: directory ‘/oracle/app’ is not
owned by root
WARNING: directory ‘/oracle’ is not owned
by root
Preparing to recopy patched init and RC
scripts.
Recopying init and RC scripts.
Startup will be queued to init within 30
seconds.
Starting up the CRS daemons.
Adding daemons to inittab
Waiting for the patched CRS daemons to
start.
This may take a while on some systems.
.
10204 patch successfully applied.
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<nodenumber>: <nodename><private
interconnect name><hostname>
node 3: aix211 aix211priv aix211
Creating OCR keys for user ‘root’, privgrp
‘system’..
Operation successful.
clscfg -upgrade completed successfully
Aix212:
#
/oracle/app/oracle/product/10.2/crs/install/root102.sh
Error : Please change the CRS_ORACLE_USER
id <oracle> to have the following OS capabilities :
<
CAP_PROPAGATE CAP_BYPASS_RAC_VMM CAP_NUMA_ATTACH >
by running </usr/bin/chuser> command
then ‘crsctl stop crs’ and ‘crsctl start crs’.
The CSS daemon,
ocssd.bin, will not run in realtimewithout
this change
Oracle strongly recommends that the CSS
daemon run realtime
Creating
pre-patch directory for saving pre-patch clusterware files
Completed patching clusterware files to
/oracle/app/oracle/product/10.2/crs
Relinking some shared libraries.
Relinking of patched files is complete.
WARNING:
directory ‘/oracle/app/oracle/product/10.2’ is not owned by root
WARNING: directory
‘/oracle/app/oracle/product’ is not owned by root
WARNING:
directory ‘/oracle/app/oracle’ is not owned by root
WARNING: directory ‘/oracle/app’ is not
owned by root
WARNING: directory ‘/oracle’ is not owned
by root
Preparing to recopy patched init and RC
scripts.
Recopying init and RC scripts.
Startup will be queued to init within 30
seconds.
Starting up the CRS daemons.
Adding daemons to inittab
Waiting for the patched CRS daemons to
start.
This may take a while on some systems.
.
10204 patch successfully applied.
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<nodenumber>:
<nodename><private interconnect name><hostname>
node 4: aix212 aix212priv aix212
Creating OCR keys for user ‘root’, privgrp
‘system’..
Operation successful.
clscfg -upgrade completed successfully
# ./crs_stat -t
Name Type Target State
Host
————————————————————
ora.aix211.gsd application ONLINE
ONLINE aix211
ora.aix211.ons application ONLINE
ONLINE aix211
ora.aix211.vip application ONLINE
ONLINE aix212
ora.aix212.gsd application ONLINE
ONLINE aix212
ora.aix212.ons application ONLINE
ONLINE aix212
ora.aix212.vip application ONLINE
ONLINE aix212
升级数据库:
选择home2
Aix211:
#
/oracle/app/oracle/product/10.2/db/root.sh
Running Oracle10 root.sh script…
The following environment variables are set
as:
ORACLE_OWNER= oracle
ORACLE_HOME=
/oracle/app/oracle/product/10.2/db
Enter the full pathname of the local bin
directory: [/usr/local/bin]:
The file “dbhome” already exists
in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file “oraenv” already exists
in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file “coraenv” already exists
in /usr/local/bin. Overwrite it? (y/n)
[n]:
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.
Aix212:
#
/oracle/app/oracle/product/10.2/db/root.sh
Running Oracle10 root.sh script…
The following environment variables are set
as:
ORACLE_OWNER= oracle
ORACLE_HOME=
/oracle/app/oracle/product/10.2/db
Enter the full pathname of the local bin
directory: [/usr/local/bin]:
The file “dbhome” already exists
in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file “oraenv” already exists
in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file “coraenv” already exists
in /usr/local/bin. Overwrite it? (y/n)
[n]:
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.
建库
裸设备的映射文件:
system=/dev/rrac_system
sysaux=/dev/rrac_sysaux
undotbs1=/dev/rrac_undotbs1
undotbs2=/dev/rrac_undotbs2
temp=/dev/rrac_temp
users=/dev/rrac_users
example=/dev/rrac_example
redo1_1=/dev/rrac_redo1_1
redo1_2=/dev/rrac_redo2_1
redo1_3=/dev/rrac_redo3_1
redo2_1=/dev/rrac_redo1_2
redo2_2=/dev/rrac_redo2_2
redo2_3=/dev/rrac_redo3_2
control1=/dev/rrac_control1
control2=/dev/rrac_control2
spfile=/dev/rrac_spfile
pwdfile=/dev/rrac_pwdfile
指定映射文件:
SQL> conn
hr/hr
Connected.
SQL> select
count (*) from employees;
COUNT(*)
———-
107
未经允许不得转载:SRE空间 » Oracle 10g RAC for aix
评论前必须登录!
注册