AIX系统静默安装Oracle 11gR2 RAC

0    384    2

Tags:

👉 本文共约63613个字,系统预计阅读时间或需240分钟。

安装准备

安装信息收集

软件环境

数据库:

p10404530_112030_AIX64-5L_1of7.zip、

p10404530_112030_AIX64-5L_2of7.zip

集群软件(11G 中的 clusterware):

p10404530_112030_AIX64-5L_3of7.zip

操作系统:

7100-03-03-1415

注意: 解压时 p10404530_112030_AIX64-5L_1of7.zip、p10404530_112030_AIX64-5L_2of7.zip

这两个包要解到同一个目录下,p10404530_112030_AIX64-5L_3of7.zip 包解到另一个不同的目录下。

网络规划及/etc/hosts

vi /etc/hosts

20.188.187.148 LHRTEST1101

220.188.187.148 LHRTEST1101-priv

20.188.187.149 LHRTEST1101-vip

20.188.187.158 LHRTEST2101

220.188.187.158 LHRTEST2101-priv

20.188.187.150 LHRTEST2101-vip

20.188.187.160 LHRTEST2101-scan

配置私网,这里的ip为220.188.187.148

chdev -l 'en1' -a netaddr=220.188.187.148 -a netmask='255.255.255.0' -a state='up'

[ZFPRMDB2:root]:/>smitty tcpip

Minimum Configuration & Startup

* HOSTNAME [LHRTEST1101]

* Internet ADDRESS (dotted decimal) [220.188.187.148]

Network MASK (dotted decimal) [255.255.255.0]

节点一:

[LHRTEST1101:root]/]> smitty tcpip

Minimum Configuration & Startup

To Delete existing configuration data, please use Further Configuration menus

Type or select values in entry fields.

Press Enter AFTER making all desired changes.

[Entry Fields]

* HOSTNAME [LHRTEST1101]

* Internet ADDRESS (dotted decimal) [220.188.187.148]

Network MASK (dotted decimal) [255.255.255.0]

* Network INTERFACE en1

NAMESERVER

Internet ADDRESS (dotted decimal) []

DOMAIN Name []

Default Gateway

Address (dotted decimal or symbolic name) []

Cost [] #

Do Active Dead Gateway Detection? no +

Your CABLE Type N/A +

START Now no +

[LHRTEST1101:root]/]> ifconfig -a

en0: flags=1e084863,480\<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN>

inet 20.188.187.148 netmask 0xffffff00 broadcast 20.188.187.255

tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1

en1: flags=1e084863,480\<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN>

inet 220.188.187.148 netmask 0xffffff00 broadcast 220.188.187.255

tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1

lo0: flags=e08084b,c0\<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,LARGESEND,CHAIN>

inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255

inet6 ::1%1/0

tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1

[LHRTEST1101:root]/]>

[LHRTEST1101:root]/]>

节点二:

[LHRTEST2101:root]/]> ifconfig -a

en0: flags=1e084863,480\<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN>

inet 20.188.187.158 netmask 0xffffff00 broadcast 20.188.187.255

tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1

en1: flags=1e084863,480\<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN>

inet 220.188.187.158 netmask 0xffffff00 broadcast 220.188.187.255

tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1

lo0: flags=e08084b,c0\<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,LARGESEND,CHAIN>

inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255

inet6 ::1%1/0

tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1

[LHRTEST2101:root]/]>

[LHRTEST2101:root]/]>

说明:11g共7个IP地址,2块网卡,其中public、vip和scan 都在同一个网段,private在另一个网段,主机名不要包含下横线,如:RAC_01;通过执行ifconfig -a 检查2个节点的网络设备名字是否一致,另外公网、私网共4个IP可以ping通,其它3个不能ping通才是正常的。

硬件、软件环境检查

硬件环境和os参数修改详细内容参考:

以LHRTEST2101为例:

[LHRTEST2101:root]/]> getconf REAL_MEMORY

4194304

[LHRTEST2101:root]/]> /usr/sbin/lsattr -E -l sys0 -a realmem

realmem 4194304 Amount of usable physical memory in Kbytes False

[LHRTEST2101:root]/]> lsps -a

Page Space Physical Volume Volume Group Size %Used Active Auto Type Chksum

hd6 hdisk0 rootvg 8192MB 0 yes yes lv 0

[LHRTEST2101:root]/]> getconf HARDWARE_BITMODE

64

[LHRTEST2101:root]/]> bootinfo -K

64

[LHRTEST2101:root]/]>

[LHRTEST2101:root]/]> df -g

Filesystem GB blocks Free %Used Iused %Iused Mounted on

/dev/hd4 4.25 4.00 6% 12709 2% /

/dev/hd2 10.00 4.57 55% 118820 11% /usr

/dev/hd9var 4.50 4.24 6% 1178 1% /var

/dev/hd3 4.25 4.23 1% 172 1% /tmp

/dev/hd1 1.00 1.00 1% 77 1% /home

/dev/hd11admin 0.25 0.25 1% 7 1% /admin

/proc - - - - - /proc

/dev/hd10opt 4.50 4.37 3% 2567 1% /opt

/dev/livedump 1.00 1.00 1% 6 1% /var/adm/ras/livedump

/dev/Plv_install 1.00 1.00 1% 4 1% /install

/dev/Plv_mtool 1.00 1.00 1% 4 1% /mtool

/dev/Plv_audit 2.00 1.99 1% 5 1% /audit

/dev/Plv_ftplog 1.00 1.00 1% 5 1% /ftplog

/dev/Tlv_bocnet 50.00 49.99 1% 4 1% /bocnet

/dev/Tlv_WebSphere 10.00 5.71 43% 45590 4% /WebSphere

/dev/TLV_TEST_DATA 100.00 99.98 1% 7 1% /lhr

/dev/tlv_softtmp 30.00 20.30 33% 5639 1% /softtmp

ZTDNETAP3:/nfs 1240.00 14.39 99% 513017 14% /nfs

/dev/tlv_u01 50.00 32.90 35% 51714 1% /u01

[LHRTEST2101:root]/]> cat /etc/.init.state

2

[LHRTEST2101:root]/]> oslevel -s

7100-03-03-1415

[LHRTEST1101:root]/]> lslpp -l bos.adt.base bos.adt.lib bos.adt.libm bos.perf.libperfstat bos.perf.perfstat bos.perf.proctools rsct.basic.rte rsct.compat.clients.rte xlC.aix61.rte

Fileset Level State Description

----------------------------------------------------------------------------

Path: /usr/lib/objrepos

bos.adt.base 7.1.3.15 COMMITTED Base Application Development

Toolkit

bos.adt.lib 7.1.2.15 COMMITTED Base Application Development

Libraries

bos.adt.libm 7.1.3.0 COMMITTED Base Application Development

Math Library

bos.perf.libperfstat 7.1.3.15 COMMITTED Performance Statistics Library

Interface

bos.perf.perfstat 7.1.3.15 COMMITTED Performance Statistics

Interface

bos.perf.proctools 7.1.3.15 COMMITTED Proc Filesystem Tools

rsct.basic.rte 3.1.5.3 COMMITTED RSCT Basic Function

rsct.compat.clients.rte 3.1.5.0 COMMITTED RSCT Event Management Client

Function

xlC.aix61.rte 12.1.0.1 COMMITTED IBM XL C++ Runtime for AIX 6.1

and 7.1

Path: /etc/objrepos

bos.adt.base 7.1.3.15 COMMITTED Base Application Development

Toolkit

bos.perf.libperfstat 7.1.3.15 COMMITTED Performance Statistics Library

Interface

bos.perf.perfstat 7.1.3.15 COMMITTED Performance Statistics

Interface

rsct.basic.rte 3.1.5.3 COMMITTED RSCT Basic Function

[LHRTEST1101:root]/]>

交换分区至少4G,若小于3G,可以执行 chps -s 20 hd6 来增加分区大小,增加20个PP,如下例:

[LHRTEST1101:root]/]> lsps -a

Page Space Physical Volume Volume Group Size %Used Active Auto Type Chksum

hd6 hdisk0 rootvg 8192MB 0 yes yes lv 0

[LHRTEST1101:root]/]> vmstat

System configuration: lcpu=128 mem=49152MB ent=9.00

kthr memory page faults cpu

----- ----------- ------------------------ ------------ -----------------------

r b avm fre re pi po fr sr cy in sy cs us sy id wa pc ec

1 1 2678713 4864613 0 0 0 0 0 0 39 23328 9527 0 0 99 0 0.05 0.6

[LHRTEST1101:root]/]> chps -s 20 hd6

[LHRTEST1101:root]/]> lsps -a

Page Space Physical Volume Volume Group Size %Used Active Auto Type Chksum

hd6 hdisk0 rootvg 13312MB 0 yes yes lv 0

===》》8192+20*256=13312

[LHRTEST1101:root]/]> lsvg rootvg

VOLUME GROUP: rootvg VG IDENTIFIER: 00c49fb400004c000000015234fcc9de

VG STATE: active PP SIZE: 256 megabyte(s)

VG PERMISSION: read/write TOTAL PPs: 512 (131072 megabytes)

MAX LVs: 256 FREE PPs: 222 (56832 megabytes)

LVs: 17 USED PPs: 290 (74240 megabytes)

OPEN LVs: 16 QUORUM: 2 (Enabled)

TOTAL PVs: 1 VG DESCRIPTORS: 2

STALE PVs: 0 STALE PPs: 0

ACTIVE PVs: 1 AUTO ON: yes

MAX PPs per VG: 32512

MAX PPs per PV: 1016 MAX PVs: 32

LTG size (Dynamic): 256 kilobyte(s) AUTO SYNC: no

HOT SPARE: no BB POLICY: relocatable

PV RESTRICTION: none INFINITE RETRY: no

DISK BLOCK SIZE: 512 CRITICAL VG: no

[LHRTEST1101:root]/]>

操作系统参数调整

shell脚本:

vi os_pre_lhr.sh

_chlimit(){

[ -f /etc/security/limits.org ] || { cp -p /etc/security/limits /etc/security/limits.org; }

cat /etc/security/limits.org |egrep -vp "root|oracle|grid" > /etc/security/limits

echo "root:

core = -1

cpu = -1

data = -1

fsize = -1

nofiles = -1

rss = -1

stack = -1

core_hard = -1

cpu_hard = -1

data_hard = -1

fsize_hard = -1

nofiles_hard = -1

rss_hard = -1

stack_hard = -1

oracle:

core = -1

cpu = -1

data = -1

fsize = -1

nofiles = -1

rss = -1

stack = -1

cpu_hard = -1

core_hard = -1

data_hard = -1

fsize_hard = -1

nofiles_hard = -1

rss_hard = -1

stack_hard = -1

grid:

core = -1

cpu = -1

data = -1

fsize = -1

nofiles = -1

rss = -1

stack = -1

core_hard = -1

cpu_hard = -1

data_hard = -1

fsize_hard = -1

nofiles_hard = -1

rss_hard = -1

stack_hard = -1" >> /etc/security/limits

}

_chospara(){

vmo -p -o minperm%=3

echo "yes"|vmo -p -o maxperm%=90

echo "yes" |vmo -p -o maxclient%=90

echo "yes"|vmo -p -o lru_file_repage=0

echo "yes"|vmo -p -o strict_maxclient=1

echo "yes" |vmo -p -o strict_maxperm=0

echo "yes\nno" |vmo -r -o page_steal_method=1;

ioo -a|egrep -w "aio_maxreqs|aio_maxservers|aio_minservers"

/usr/sbin/chdev -l sys0 -a maxuproc=16384 -a ncargs=256 -a minpout=4096 -a maxpout=8193 -a fullcore=true

echo "check sys0 16384 256"

lsattr -El sys0 |egrep "maxuproc|ncargs|pout|fullcore" |awk '{print $1,$2}'

/usr/sbin/no -p -o sb_max=41943040

/usr/sbin/no -p -o udp_sendspace=2097152

/usr/sbin/no -p -o udp_recvspace=20971520

/usr/sbin/no -p -o tcp_sendspace=1048576

/usr/sbin/no -p -o tcp_recvspace=1048576

/usr/sbin/no -p -o rfc1323=1

/usr/sbin/no -r -o ipqmaxlen=512

/usr/sbin/no -p -o clean_partial_conns=1

cp -p /etc/environment /etc/environment.\date '+%Y%m%d'\

cat /etc/environment.\date '+%Y%m%d'\ |awk '/\^TZ=/{print "TZ=BEIST-8"} !/\^TZ=/{print}' >/etc/environment

_chlimit

}

_chlimit

_chospara

stopsrc -s xntpd

#startsrc -s xntpd -a "-x"

mv /etc/ntp.conf /etc/ntp.conf.org

sh os_pre_lhr.sh

注意:所有参数的修改均以官方文档为准,具体文档为:Oracle® Grid Infrastructure Installation Guide 11g Release 2 (11.2) for IBM AIX on POWER Systems (64-Bit) e48294.pdf 或网页版也可以,可以参考最后的附录部分。

创建文件系统

/usr/lpp/EMC/Symmetrix/bin/inq.aix64_51 -showvol -sid

for diskname in \lspv\|cut -f "1" -d ' '\;do

echo "/dev/r$diskname" \getconf DISK_SIZE /dev/r$diskname\

done

lspv

mkvg -S -y t_u01_vg -s 128 hdisk22

mklv -t jfs2 -y tlv_u01 -x 1024 t_u01_vg 400

crfs -v jfs2 -d tlv_u01 -m /u01 -A yes

mount /u01

mklv -t jfs2 -y tlv_softtmp -x 1024 t_u01_vg 240

crfs -v jfs2 -d tlv_softtmp -m /softtmp -A yes

mount /softtmp

以LHRTEST2101为例:

[LHRTEST2101:root]/]> /usr/lpp/EMC/Symmetrix/bin/inq.aix64_51 -showvol -sid

Inquiry utility, Version V7.3-1214 (Rev 0.1) (SIL Version V7.3.0.1 (Edit Level 1214)

Copyright (C) by EMC Corporation, all rights reserved.

For help type inq -h.

.........................

------------------------------------------------------------------------------------------------

DEVICE :VEND :PROD :REV :SER NUM :Volume :CAP(kb) :SYMM ID

------------------------------------------------------------------------------------------------

/dev/rhdisk0 :AIX :VDASD :0001 :hdisk5 : 00000: 134246400 :N/A

/dev/rhdisk1 :EMC :SYMMETRIX :5876 :640250a000 : 0250A: 2880 :000492600664

/dev/rhdisk2 :EMC :SYMMETRIX :5876 :640250b000 : 0250B: 2880 :000492600664

/dev/rhdisk3 :EMC :SYMMETRIX :5876 :640250c000 : 0250C: 2880 :000492600664

/dev/rhdisk4 :EMC :SYMMETRIX :5876 :640250d000 : 0250D: 2880 :000492600664

/dev/rhdisk5 :EMC :SYMMETRIX :5876 :64026f6000 : 026F6: 134246400 :000492600664

/dev/rhdisk6 :EMC :SYMMETRIX :5876 :64026fe000 : 026FE: 134246400 :000492600664

/dev/rhdisk7 :EMC :SYMMETRIX :5876 :6402706000 : 02706: 134246400 :000492600664

/dev/rhdisk8 :EMC :SYMMETRIX :5876 :640270e000 : 0270E: 134246400 :000492600664

/dev/rhdisk9 :EMC :SYMMETRIX :5876 :6402716000 : 02716: 134246400 :000492600664

/dev/rhdisk10 :EMC :SYMMETRIX :5876 :640271e000 : 0271E: 134246400 :000492600664

/dev/rhdisk11 :EMC :SYMMETRIX :5876 :6402726000 : 02726: 134246400 :000492600664

/dev/rhdisk12 :EMC :SYMMETRIX :5876 :640272e000 : 0272E: 134246400 :000492600664

/dev/rhdisk13 :EMC :SYMMETRIX :5876 :6402736000 : 02736: 134246400 :000492600664

/dev/rhdisk14 :EMC :SYMMETRIX :5876 :640273e000 : 0273E: 134246400 :000492600664

/dev/rhdisk15 :EMC :SYMMETRIX :5876 :6402746000 : 02746: 134246400 :000492600664

/dev/rhdisk16 :EMC :SYMMETRIX :5876 :640274e000 : 0274E: 134246400 :000492600664

/dev/rhdisk17 :EMC :SYMMETRIX :5876 :6402756000 : 02756: 134246400 :000492600664

/dev/rhdisk18 :EMC :SYMMETRIX :5876 :640275e000 : 0275E: 134246400 :000492600664

/dev/rhdisk19 :EMC :SYMMETRIX :5876 :6402766000 : 02766: 134246400 :000492600664

/dev/rhdisk20 :EMC :SYMMETRIX :5876 :640276e000 : 0276E: 134246400 :000492600664

/dev/rhdisk21 :EMC :SYMMETRIX :5876 :6402776000 : 02776: 134246400 :000492600664

/dev/rhdisk22 :EMC :SYMMETRIX :5876 :640277e000 : 0277E: 134246400 :000492600664

/dev/rhdisk23 :EMC :SYMMETRIX :5876 :6402786000 : 02786: 134246400 :000492600664

/dev/rhdisk24 :EMC :SYMMETRIX :5876 :640278e000 : 0278E: 134246400 :000492600664

[LHRTEST2101:root]/]> lspv

hdisk0 00c49fc434da2434 rootvg active

hdisk1 00c49fc461fc76b2 None

hdisk2 00c49fc461fc76f5 None

hdisk3 00c49fc461fc7739 None

hdisk4 00c49fc461fc777a None

hdisk5 00c49fc461fc77bd None

hdisk6 00c49fc461fc77fe None

hdisk7 00c49fc461fc783f None

hdisk8 00c49fc461fc7880 None

hdisk9 00c49fc461fc78c5 None

hdisk10 00c49fc461fc7908 None

hdisk11 00c49fc461fc7958 None

hdisk12 00c49fc461fc79a0 None

hdisk13 00c49fc461fc79ea None

hdisk14 00c49fc461fc7a2f None

hdisk15 00c49fc461fc7a71 None

hdisk16 00c49fc461fc7ab1 None

hdisk17 00c49fb4e3a8fc12 None

hdisk18 00c49fc461fc7b3b T_NET_APP_vg active

hdisk19 00c49fc461fc7b7d None

hdisk20 00c49fc461fc7bbe None

hdisk21 00c49fc461fc7bff None

hdisk22 00c49fc461fc7c40 None

hdisk23 00c49fc461fc7c88 T_TEST_LHR_VG active

hdisk24 00c49fc461fc7cca T_TEST_LHR_VG active

[LHRTEST2101:root]/]> for diskname in \lspv\|cut -f "1" -d ' '\;do

echo "/dev/r$diskname" \getconf DISK_SIZE /dev/r$diskname\

done

/dev/rhdisk0 131100

/dev/rhdisk1 2

/dev/rhdisk2 2

/dev/rhdisk3 2

/dev/rhdisk4 2

/dev/rhdisk5 131100

/dev/rhdisk6 131100

/dev/rhdisk7 131100

/dev/rhdisk8 131100

/dev/rhdisk9 131100

/dev/rhdisk10 131100

/dev/rhdisk11 131100

/dev/rhdisk12 131100

/dev/rhdisk13 131100

/dev/rhdisk14 131100

/dev/rhdisk15 131100

/dev/rhdisk16 131100

/dev/rhdisk17 131100

/dev/rhdisk18 131100

/dev/rhdisk19 131100

/dev/rhdisk20 131100

/dev/rhdisk21 131100

/dev/rhdisk22 131100

/dev/rhdisk23 131100

/dev/rhdisk24 131100

[LHRTEST2101:root]/]>

[LHRTEST2101:root]/]> df -g

Filesystem GB blocks Free %Used Iused %Iused Mounted on

/dev/hd4 4.25 4.00 6% 12643 2% /

/dev/hd2 10.00 4.58 55% 118785 10% /usr

/dev/hd9var 4.50 4.08 10% 1175 1% /var

/dev/hd3 4.25 3.75 12% 1717 1% /tmp

/dev/hd1 1.00 1.00 1% 17 1% /home

/dev/hd11admin 0.25 0.25 1% 7 1% /admin

/proc - - - - - /proc

/dev/hd10opt 4.50 4.37 3% 2559 1% /opt

/dev/livedump 1.00 1.00 1% 6 1% /var/adm/ras/livedump

/dev/Plv_install 1.00 1.00 1% 4 1% /install

/dev/Plv_mtool 1.00 1.00 1% 4 1% /mtool

/dev/Plv_audit 2.00 1.99 1% 5 1% /audit

/dev/Plv_ftplog 1.00 1.00 1% 5 1% /ftplog

/dev/Tlv_bocnet 50.00 49.99 1% 4 1% /bocnet

/dev/Tlv_WebSphere 10.00 5.71 43% 45590 4% /WebSphere

/dev/TLV_TEST_DATA 100.00 99.98 1% 7 1% /lhr

ZTDNETAP3:/nfs 1240.00 14.39 99% 512924 14% /nfs

ZTINIMSERVER:/sharebkup 5500.00 1258.99 78% 2495764 1% /sharebkup

[LHRTEST2101:root]/]> mklv -t jfs2 -y tlv_u01 -x 1024 t_u01_vg 400

tlv_u01

[LHRTEST2101:root]/]> crfs -v jfs2 -d tlv_u01 -m /u01 -A yes

File system created successfully.

52426996 kilobytes total disk space.

New File System size is 104857600

[LHRTEST2101:root]/]> mount /u01

[LHRTEST2101:root]/]> df -g

Filesystem GB blocks Free %Used Iused %Iused Mounted on

/dev/hd4 4.25 4.00 6% 12648 2% /

/dev/hd2 10.00 4.58 55% 118785 10% /usr

/dev/hd9var 4.50 4.08 10% 1176 1% /var

/dev/hd3 4.25 3.75 12% 1717 1% /tmp

/dev/hd1 1.00 1.00 1% 17 1% /home

/dev/hd11admin 0.25 0.25 1% 7 1% /admin

/proc - - - - - /proc

/dev/hd10opt 4.50 4.37 3% 2559 1% /opt

/dev/livedump 1.00 1.00 1% 6 1% /var/adm/ras/livedump

/dev/Plv_install 1.00 1.00 1% 4 1% /install

/dev/Plv_mtool 1.00 1.00 1% 4 1% /mtool

/dev/Plv_audit 2.00 1.99 1% 5 1% /audit

/dev/Plv_ftplog 1.00 1.00 1% 5 1% /ftplog

/dev/Tlv_bocnet 50.00 49.99 1% 4 1% /bocnet

/dev/Tlv_WebSphere 10.00 5.71 43% 45590 4% /WebSphere

/dev/TLV_TEST_DATA 100.00 99.98 1% 7 1% /lhr

ZTDNETAP3:/nfs 1240.00 14.39 99% 512924 14% /nfs

ZTINIMSERVER:/sharebkup 5500.00 1258.99 78% 2495764 1% /sharebkup

/dev/tlv_u01 50.00 49.99 1% 4 1% /u01

[LHRTEST2101:root]/]>

[LHRTEST2101:root]/]> mklv -t jfs2 -y tlv_softtmp -x 1024 t_u01_vg 240

tlv_softtmp

[LHRTEST2101:root]/]> crfs -v jfs2 -d tlv_softtmp -m /softtmp -A yes

File system created successfully.

31456116 kilobytes total disk space.

New File System size is 62914560

[LHRTEST2101:root]/]> mount /softtmp

[LHRTEST2101:root]/]> df -g

Filesystem GB blocks Free %Used Iused %Iused Mounted on

/dev/hd4 4.25 4.00 6% 12650 2% /

/dev/hd2 10.00 4.58 55% 118785 10% /usr

/dev/hd9var 4.50 4.08 10% 1177 1% /var

/dev/hd3 4.25 3.75 12% 1717 1% /tmp

/dev/hd1 1.00 1.00 1% 17 1% /home

/dev/hd11admin 0.25 0.25 1% 7 1% /admin

/proc - - - - - /proc

/dev/hd10opt 4.50 4.37 3% 2559 1% /opt

/dev/livedump 1.00 1.00 1% 6 1% /var/adm/ras/livedump

/dev/Plv_install 1.00 1.00 1% 4 1% /install

/dev/Plv_mtool 1.00 1.00 1% 4 1% /mtool

/dev/Plv_audit 2.00 1.99 1% 5 1% /audit

/dev/Plv_ftplog 1.00 1.00 1% 5 1% /ftplog

/dev/Tlv_bocnet 50.00 49.99 1% 4 1% /bocnet

/dev/Tlv_WebSphere 10.00 5.71 43% 45590 4% /WebSphere

/dev/TLV_TEST_DATA 100.00 99.98 1% 7 1% /lhr

ZTDNETAP3:/nfs 1240.00 14.39 99% 512924 14% /nfs

ZTINIMSERVER:/sharebkup 5500.00 1258.99 78% 2495764 1% /sharebkup

/dev/tlv_u01 50.00 49.99 1% 4 1% /u01

/dev/tlv_softtmp 30.00 30.00 1% 4 1% /softtmp

[LHRTEST2101:root]/]>

创建卷组的时候注意踩盘,懂AIX的人懂的,不多说。

建立安装目录

直接复制粘贴执行:

mkdir -p /u01/app/11.2.0/grid

chmod -R 755 /u01/app/11.2.0/grid

mkdir -p /u01/app/grid

chmod -R 755 /u01/app/grid

mkdir -p /u01/app/oracle

chmod -R 755 /u01/app/oracle

[LHRTEST2101:root]/]> mkdir -p /u01/app/11.2.0/grid

[LHRTEST2101:root]/]> chmod -R 755 /u01/app/11.2.0/grid

[LHRTEST2101:root]/]> mkdir -p /u01/app/grid

[LHRTEST2101:root]/]> chmod -R 755 /u01/app/grid

[LHRTEST2101:root]/]> mkdir -p /u01/app/oracle

[LHRTEST2101:root]/]> chmod -R 755 /u01/app/oracle

[LHRTEST2101:root]/]>

[LHRTEST2101:root]/]> cd /u01/app

[LHRTEST2101:root]/u01/app]> l

total 0

drwxr-xr-x 3 root system 256 Mar 08 16:11 11.2.0

drwxr-xr-x 2 root system 256 Mar 08 16:11 grid

drwxr-xr-x 2 root system 256 Mar 08 16:11 oracle

[LHRTEST2101:root]/u01/app]>

建立用户和用户组

直接复制粘贴执行:

mkgroup -A id=1024 dba

mkgroup -A id=1025 asmadmin

mkgroup -A id=1026 asmdba

mkgroup -A id=1027 asmoper

mkgroup -A id=1028 oinstall

mkgroup -A id=1029 oper

mkuser -a id=1025 pgrp=oinstall groups=dba,asmadmin,asmdba,asmoper,oinstall home=/home/grid fsize=-1 cpu=-1 data=-1 core=-1 rss=-1 stack=-1 stack_hard=-1 capabilities=CAP_NUMA_ATTACH,CAP_BYPASS_RAC_VMM,CAP_PROPAGATE grid

echo "grid:grid" |chpasswd

pwdadm -c grid

mkuser -a id=1024 pgrp=dba groups=dba,asmadmin,asmdba,asmoper,oinstall home=/home/oracle fsize=-1 cpu=-1 data=-1 core=-1 rss=-1 stack=-1 stack_hard=-1 capabilities=CAP_NUMA_ATTACH,CAP_BYPASS_RAC_VMM,CAP_PROPAGATE oracle

echo "oracle:oracle" |chpasswd

pwdadm -c oracle

chown -R grid:dba /u01/app/11.2.0

chown grid:dba /u01/app

chown grid:dba /u01/app/grid

chown -R oracle:dba /u01/app/oracle

chown oracle:dba /u01

/usr/sbin/lsuser -a capabilities grid

/usr/sbin/lsuser -a capabilities oracle

[LHRTEST2101:root]/u01/app]> mkgroup -A id=1024 dba

[LHRTEST2101:root]/u01/app]> mkuser -a id=1025 pgrp=dba groups=dba home=/home/grid fsize=-1 cpu=-1 data=-1 core=-1 rss=-1 stack=-1 stack_hard=-1 capabilities=CAP_NUMA_ATTACH,CAP_BYPASS_RAC_VMM,CAP_PROPAGATE grid

[LHRTEST2101:root]/u01/app]> passwd grid

Changing password for "grid"

grid's New password:

Enter the new password again:

[LHRTEST2101:root]/u01/app]>

[LHRTEST2101:root]/u01/app]> mkuser -a id=1024 pgrp=dba groups=dba home=/home/oracle fsize=-1 cpu=-1 data=-1 core=-1 rss=-1 stack=-1 stack_hard=-1 capabilities=CAP_NUMA_ATTACH,CAP_BYPASS_RAC_VMM,CAP_PROPAGATE oracle

[LHRTEST2101:root]/u01/app]> passwd oracle

Changing password for "oracle"

oracle's New password:

Enter the new password again:

[LHRTEST2101:root]/u01/app]> chown -R grid:dba /u01/app/11.2.0

[LHRTEST2101:root]/u01/app]> chown grid:dba /u01/app

[LHRTEST2101:root]/u01/app]> chown grid:dba /u01/app/grid

[LHRTEST2101:root]/u01/app]> chown -R oracle:dba /u01/app/oracle

[LHRTEST2101:root]/u01/app]> chown oracle:dba /u01

[LHRTEST2101:root]/u01/app]> /usr/sbin/lsuser -a capabilities grid

grid capabilities=CAP_NUMA_ATTACH,CAP_BYPASS_RAC_VMM,CAP_PROPAGATE

[LHRTEST2101:root]/u01/app]> /usr/sbin/lsuser -a capabilities oracle

oracle capabilities=CAP_NUMA_ATTACH,CAP_BYPASS_RAC_VMM,CAP_PROPAGATE

[LHRTEST2101:root]/u01/app]>

2个节点都校验:

[LHRTEST1101:root]/]> id grid

uid=1025(grid) gid=1028(oinstall) groups=1024(dba),1025(asmadmin),1026(asmdba),1027(asmoper)

[LHRTEST1101:root]/]> id oracle

uid=1024(oracle) gid=1024(dba) groups=1025(asmadmin),1026(asmdba),1027(asmoper),1028(oinstall)

[LHRTEST1101:root]/]>

配置 grid 和 oracle的 .profile

---------2个节点分别配置,注意修改ORACLE_SID的值为+ASM1,+ASM2

su - grid

vi .profile

umask 022

export ORACLE_BASE=/u01/app/grid

export ORACLE_HOME=/u01/app/11.2.0/grid

export ORACLE_SID=+ASM

export ORACLE_TERM=vt100

export ORACLE_OWNER=grid

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/u01/app/oracle/product/11.2.0/dbhome_1/lib32

export LIBPATH=$LIBPATH:/u01/app/oracle/product/11.2.0/dbhome_1/lib

export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK

export PATH=$PATH:/bin:/usr/ccs/bin:/usr/bin/X11:$ORACLE_HOME/bin

export NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'

set -o vi

export EDITOR=vi

alias l='ls -l'

export PS1='[$LOGNAME@'\hostname\:'$PWD'']$ '

export AIXTHREAD_SCOPE=S

export ORACLE_TERM=vt100

export TMP=/tmp

export TMPDIR=/tmp

export LANG=en_US

export PS1='[$LOGNAME@'\hostname\:'$PWD'']$ '

export DISPLAY=20.188.216.97:0.0

su - oracle

vi .profile

umask 022

export ORACLE_SID=ora11g

export ORACLE_BASE=/u01/app/oracle

export GRID_HOME=/u01/app/11.2.0/grid

export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1

export PATH=$ORACLE_HOME/bin:$GRID_HOME/bin:$PATH:$ORACLE_HOME/OPatch

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/rdbms/lib:/lib:/usr/lib

export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib

export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK

export NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'

export ORACLE_OWNER=oracle

set -o vi

export EDITOR=vi

alias l='ls -l'

export AIXTHREAD_SCOPE=S

export ORACLE_TERM=vt100

export TMP=/tmp

export TMPDIR=/tmp

export LANG=en_US

export PS1='[$LOGNAME@'\hostname\:'$PWD'']$ '

export DISPLAY=20.188.216.97:0.0

. ~/.profile 生效当前的环境变量

[LHRTEST1101:root]/]> . ~/.profile

准备ASM磁盘

2个节点都执行, ASM磁盘权限和属性的修改,否则执行root.sh的时候报错:

Disk Group OCR creation failed with the following message:

ORA-15018: diskgroup cannot be created

ORA-15031: disk specification '/dev/rhdisk10' matches no disks

ORA-15025: could not open disk "/dev/rhdisk10"

ORA-15056: additional error message

chown grid.asmadmin /dev/rhdisk10

chown grid.asmadmin /dev/rhdisk11

chmod 660 /dev/rhdisk10

chmod 660 /dev/rhdisk11

lquerypv -h /dev/hdisk10

chdev -l hdisk10 -a reserve_policy=no_reserve -a algorithm=round_robin -a queue_depth=32 -a pv=yes

chdev -l hdisk11 -a reserve_policy=no_reserve -a algorithm=round_robin -a queue_depth=32 -a pv=yes

chdev -l hdisk10 -a pv=clear

chdev -l hdisk11 -a pv=clear

lsattr -El hdisk10

检测:

lsattr -El hdisk10 | grep reserve_

# 如果上面查看的结果是reserve_lock,则执行

chdev -l hdisk2 -a reserve_lock=no

[LHRTEST2101:root]/]> lsattr -El hdisk10

PCM PCM/friend/MSYMM_VRAID Path Control Module True

PR_key_value none Persistant Reserve Key Value True

algorithm fail_over Algorithm True

clr_q yes Device CLEARS its Queue on error True

dist_err_pcnt 0 Distributed Error Percentage True

dist_tw_width 50 Distributed Error Sample Time True

hcheck_cmd inquiry Health Check Command True

hcheck_interval 60 Health Check Interval True

hcheck_mode nonactive Health Check Mode True

location Location Label True

lun_id 0x9000000000000 Logical Unit Number ID False

lun_reset_spt yes FC Forced Open LUN True

max_coalesce 0x100000 Maximum Coalesce Size True

max_retries 5 Maximum Number of Retries True

max_transfer 0x100000 Maximum TRANSFER Size True

node_name 0x50000978080a6000 FC Node Name False

pvid 00c49fc461fc79080000000000000000 Physical volume identifier False

q_err no Use QERR bit True

q_type simple Queue TYPE True

queue_depth 32 Queue DEPTH True

reserve_policy single_path Reserve Policy True

rw_timeout 40 READ/WRITE time out value True

scsi_id 0xce0040 SCSI ID False

start_timeout 180 START UNIT time out value True

timeout_policy retry_path Timeout Policy True

ww_name 0x50000978080a61d1 FC World Wide Name False

[LHRTEST2101:root]/]> chdev -l hdisk10 -a reserve_policy=no_reserve -a algorithm=round_robin -a queue_depth=32 -a pv=yes

hdisk10 changed

[LHRTEST2101:root]/]> chdev -l hdisk11 -a reserve_policy=no_reserve -a algorithm=round_robin -a queue_depth=32 -a pv=yes

hdisk11 changed

[LHRTEST2101:root]/]> lsattr -El hdisk11

PCM PCM/friend/MSYMM_VRAID Path Control Module True

PR_key_value none Persistant Reserve Key Value True

algorithm round_robin Algorithm True

clr_q yes Device CLEARS its Queue on error True

dist_err_pcnt 0 Distributed Error Percentage True

dist_tw_width 50 Distributed Error Sample Time True

hcheck_cmd inquiry Health Check Command True

hcheck_interval 60 Health Check Interval True

hcheck_mode nonactive Health Check Mode True

location Location Label True

lun_id 0xa000000000000 Logical Unit Number ID False

lun_reset_spt yes FC Forced Open LUN True

max_coalesce 0x100000 Maximum Coalesce Size True

max_retries 5 Maximum Number of Retries True

max_transfer 0x100000 Maximum TRANSFER Size True

node_name 0x50000978080a6000 FC Node Name False

pvid 00c49fc461fc79580000000000000000 Physical volume identifier False

q_err no Use QERR bit True

q_type simple Queue TYPE True

queue_depth 32 Queue DEPTH True

reserve_policy no_reserve Reserve Policy True

rw_timeout 40 READ/WRITE time out value True

scsi_id 0xce0040 SCSI ID False

start_timeout 180 START UNIT time out value True

本人提供Oracle(OCP、OCM)、MySQL(OCP)、PostgreSQL(PGCA、PGCE、PGCM)等数据库的培训和考证业务,私聊QQ646634621或微信db_bao,谢谢!
AIX系统静默安装Oracle 11gR2 RAC后续精彩内容已被小麦苗无情隐藏,请输入验证码解锁本站所有文章!
验证码:
请先关注本站微信公众号,然后回复“验证码”,获取验证码。在微信里搜索“DB宝”或者“www_xmmup_com”或者微信扫描右侧二维码都可以关注本站微信公众号。

标签:

Avatar photo

小麦苗

学习或考证,均可联系麦老师,请加微信db_bao或QQ646634621

您可能还喜欢...

发表回复

嘿,我是小麦,需要帮助随时找我哦。
  • 18509239930
  • 个人微信

  • DB宝
  • 个人邮箱
  • 点击加入QQ群
  • 个人微店

  • 回到顶部