oracle rac aix.docx
《oracle rac aix.docx》由会员分享,可在线阅读,更多相关《oracle rac aix.docx(22页珍藏版)》请在冰豆网上搜索。
![oracle rac aix.docx](https://file1.bdocx.com/fileroot1/2023-1/9/dda89ee4-b949-4155-b168-e874955fc07d/dda89ee4-b949-4155-b168-e874955fc07d1.gif)
oracleracaix
软件环境
AIX 5L 5.3 ML4
AIX补丁
HACMP 5.2
Oracle 10.2.0.1
Oracle补丁10.2.0.2
硬件环境
RS6000 2台
(每台主机有4个以太网网卡、2个光纤卡、一个串口)
光纤磁盘阵列DS4300 1台(默认的管理地址为192.168.128.101 192.168.128.102)
[ 本帖最后由 oldunix 于 2007-4-4 16:
41 编辑 ]
oldunix回复于:
2006-12-2315:
48:
12
1、安装aix系统
扩充 / 2gb
扩充 /home 4gb
扩充 /usr 4gb
扩充 /var 4gb
扩充 /tmp 2gb
扩充 /opt 20gb
扩充 /var/adm/ras/platform 1gb
/etc/hosts文件
192.168.0.101rac1
192.168.0.102rac2
192.168.0.103rac1vip
192.168.0.104rac2vip
10.10.10.101rac1priv
10.10.10.102rac2priv
2、在rac1和rac2上,创建oinstall、dba、hagsuser组
/bin/mkgroup oinstall
/bin/mkgroup dba
/bin/mkgroup hagsuser
3、在rac1和rac2上,创建oracle用户:
# smitty user
Add a User
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
* User NAME [oracle]
User ID [500]
Primary GROUP [oinstall]
Group SET [dba,hagsuser]
Soft FILE size [-1]
Soft CPU time [-1]
Soft DATA segment [-1]
Soft STACK size [-1]
保证两台主机的组号要一致!
/etc/group
oinstall:
!
:
203:
dba:
!
:
204:
hagsuser:
!
:
205:
# id oracle
uid=500(oracle) gid=203(oinstall) groups=204(dba),205(hagsuser)
4、配置系统配置参数
配置每用户的最大进程数、调整water mark
smitty chgsys
Maximum number of PROCESSES allowed per user [4096]
HIGH water mark for pending write I/Os per file [33]
LOW water mark for pending write I/Os per file [24]
Stack Execution Disable (SED) Mode off
配置网络可调参数
修改文件/etc/,将如下几行加到文件的尾部:
if [ -f /usr/sbin/no ] then
/usr/sbin/no -p -o udp_sendspace=65536
/usr/sbin/no -p -o udp_recvspace=655360
/usr/sbin/no -p -o tcp_sendspace=65536
/usr/sbin/no -p -o tcp_recvspace=65536
/usr/sbin/no -p -o rfc1323=1
/usr/sbin/no -p -o sb_max=1310720
/usr/sbin/no -r -o ipqmaxlen=512
fi
修改异步I/O(须重启)
smitty chgaio
[Entry Fields]
MINIMUM number of servers [30] #
MAXIMUM number of servers [60] #
maximum number of REQUESTS [4096] #
server PRIORITY [39] #
STATE to be configured at system restart available +
State of fast path enable +
# mkdev –l aio0 使异步I/O可用
调整syncd频率
修改文件/sbin/rc.boot
#nohup /usr/sbin/syncd 60 > /dev/null 2>&1 &
nohup /usr/sbin/syncd 10 > /dev/null 2>&1 &
5、创建串口设备
smitty mktty
测试串口设备
cat
cat /etc/hosts > /dev/tty0
6、安装oracle、hacmp支持包
smitty installp
需要安装以下操作系统包:
Bos.adt
bos.cifs_fs
Bos.clvm
pat
bos.data
Bos.perf
rsct.basic
pat.basic
pat.clients
rsct.core
(在扩展盘上HACMP 5.2不需要,5.3需要)
rsct.exp.cimrm 2.4.2.0
(以下包在AIX Toolbox for Linux Applications盘上,安装SSH的前提包)
openssl-0.9.7g
openssl-devel-0.9.7g
openssl-doc-0.9.7g
(以下包在扩展盘上)
openssh.base
openssh.license
openssh.man.en_US
要将license改为接受!
!
!
(在网上download)
xlC.aix50.rte:
7.0.0.4
xlC.rte:
7.0.0.1
7、安装hacmp软件
smitty installp
8、安装磁盘阵列,创建共享卷
准备磁盘阵列
# hostname
rac1
# lspv
hdisk0 0002e54aa58657e9 rootvg active
hdisk1 0002657c5acf302b None
hdisk2 0002657c4d26e7ba None
hdisk3 0002657c5acf4bc3 None
hdisk4 0002657c4cc04d52 None
hdisk5 0002ee503cc8dcaa None
#
# hostname
rac2
# lspv
hdisk0 0002e5baa58258aa rootvg active
hdisk1 0002657c5acf302b None
hdisk2 0002657c4d26e7ba None
hdisk3 0002657c5acf4bc3 None
hdisk4 0002657c4cc04d52 None
hdisk5 0002ee503cc8dcaa None
创建一个并行vg名字为oracle_vg
# hostname
rac1
#
# smitty mkvg
Add a Big Volume Group
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
VOLUME GROUP name [oracle_vg]
Physical partition SIZE in megabytes 128
* PHYSICAL VOLUME names [hdisk5]
Force the creation of a volume group?
yes
Activate volume group AUTOMATICALLY no
at system restart?
Volume Group MAJOR NUMBER [60]
Create VG Concurrent Capable?
enhanced concurrent
# varyonvg oracle_vg
创建oracle使用的并行卷
mklv -y'dy_crs1024m' -w'n' -s'n' -r'n' oracle_vg 8 hdisk5
mklv -y'dy_vote1024m' -w'n' -s'n' -r'n' oracle_vg 8 hdisk5
mklv -y'dy_system_1024m' -w'n' -s'n' -r'n' oracle_vg 10 hdisk5
mklv -y'dy_pwdfile_100m' -w'n' -s'n' -r'n' oracle_vg 1 hdisk5
mklv -y'dy_sysaux_800m' -w'n' -s'n' -r'n' oracle_vg 10 hdisk5
mklv -y'dy_undo1_4096m' -w'n' -s'n' -r'n' oracle_vg 40 hdisk5
mklv -y'dy_undo2_4096m' -w'n' -s'n' -r'n' oracle_vg 40 hdisk5
mklv -y'dy_temp_4096m' -w'n' -s'n' -r'n' oracle_vg 40 hdisk5
mklv -y'dy_example_800m' -w'n' -s'n' -r'n' oracle_vg 10 hdisk5
mklv -y'dy_users_800m' -w'n' -s'n' -r'n' oracle_vg 10 hdisk5
mklv -y'dy_redo1_1_500m' -w'n' -s'n' -r'n' oracle_vg 10 hdisk5
mklv -y'dy_redo1_2_500m' -w'n' -s'n' -r'n' oracle_vg 10 hdisk5
mklv -y'dy_redo1_3_500m' -w'n' -s'n' -r'n' oracle_vg 10 hdisk5
mklv -y'dy_redo1_4_500m' -w'n' -s'n' -r'n' oracle_vg 10 hdisk5
mklv -y'dy_redo1_5_500m' -w'n' -s'n' -r'n' oracle_vg 10 hdisk5
mklv -y'dy_redo1_6_500m' -w'n' -s'n' -r'n' oracle_vg 10 hdisk5
mklv -y'dy_redo2_1_500m' -w'n' -s'n' -r'n' oracle_vg 10 hdisk5
mklv -y'dy_redo2_2_500m' -w'n' -s'n' -r'n' oracle_vg 10 hdisk5
mklv -y'dy_redo2_3_500m' -w'n' -s'n' -r'n' oracle_vg 10 hdisk5
mklv -y'dy_redo2_4_500m' -w'n' -s'n' -r'n' oracle_vg 10 hdisk5
mklv -y'dy_redo2_5_500m' -w'n' -s'n' -r'n' oracle_vg 10 hdisk5
mklv -y'dy_redo2_6_500m' -w'n' -s'n' -r'n' oracle_vg 10 hdisk5
mklv -y'dy_ctl1_110m' -w'n' -s'n' -r'n' oracle_vg 1 hdisk5
mklv -y'dy_ctl2_110m' -w'n' -s'n' -r'n' oracle_vg 1 hdisk5
mklv -y'dy_ctl3_110m' -w'n' -s'n' -r'n' oracle_vg 1 hdisk5
mklv -y'dy_spfile_110m' -w'n' -s'n' -r'n' oracle_vg 1 hdisk5
mklv -y'dy_recover4096m' -w'n' -s'n' -r'n' oracle_vg 40 hdisk5
在另外一台主机上import共享卷
# hostname
rac2
# smitty vg
Volume Groups
Move cursor to desired item and press Enter.
Import a Volume Group
Import a Volume Group
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
VOLUME GROUP name [oracle_vg]
* PHYSICAL VOLUME name [hdisk5] +
Volume Group MAJOR NUMBER [60] +#
修改共享卷的属性(两台主机都要做)
varyonvg oracle_vg
chown oracle:
dba /dev/*dy_*
varyoffvg oracle_vg
9、配置SSH
Configuring SSH on All Cluster Nodes
Before you install and use Oracle Real Application clusters, you must configure secure
shell (SSH) for the oracle user on all cluster nodes. Oracle Universal Installer uses
the ssh and scp commands during installation to run remote commands on and copy
files to the other cluster nodes. You must configure SSH so that these commands do
not prompt for a password.
Configuring SSH on Cluster Member Nodes
To configure SSH, you must first create RSA and DSA keys on each cluster node, and
then copy the keys from all cluster node members into an authorized keys file on each
node. To do this task, complete the following steps:
Create RSA and DSA keys on each node:
Complete the following steps on each
node:
1. Log in as the oracle user.
2. If necessary, create the .ssh directory in the oracle user’s home directory and
set the correct permissions on it:
mkdir ~/.ssh
chmod 700 ~/.ssh
3. Enter the following commands to generate an RSA key for version 2 of the SSH
protocol:
/usr/bin/ssh-keygen -t rsa
At the prompts:
■ Accept the default location for the key file.
■ Enter and confirm a pass phrase that is different from the oracle user’s
password.
This command writes the public key to the ~/.ssh/id_rsa.pub file and the
private key to the ~/.ssh/id_rsa file. Never distribute the private key to anyone.
4. Enter the following commands to generate a DSA key for version 2 of the SSH
protocol:
/usr/bin/ssh-keygen -t dsa
At the prompts:
Accept the default location for the key file
■ Enter and confirm a pass phrase that is different from the oracle user’s
password
This command writes the public key to the ~/.ssh/id_dsa.pub file and the
private key to the ~/.ssh/id_dsa file. Never distribute the private key to
anyone.
Add keys to an authorized key file:
Complete the following steps:
1. On the local node, determine if you have an