首页 » ORACLE, ORACLE [C]系列 » Install Oracle 12c R2 RAC on Aix 7.2 Power System

Install Oracle 12c R2 RAC on Aix 7.2 Power System

记录一下oracle 12.2 RAC 在 IBM AIX 7.2 Power System上的安装,GI安装过程很慢,总耗时4小时。安装建议首选参考oracle 官方文档。

AIX 如果没有安装unzip (解决安装介质),bash(自带ssh互信脚本) 等工具,   官方公开下载路径 ftp://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/

1, 操作系统需求

4G memory
5G /temp
16G swap
13G GI home -- Oracle recommends that you allocate 100 GB
11G DB home

1. To determine physical RAM size on the server:
# /usr/sbin/lsattr -E -l sys0 -a realmem
2. To determine the available RAM and swap space:
# /usr/sbin/lsps -s

3. Determine the amount of space available in the /tmp directory( TMP and TMPDIR environment variables ):
# df -m /tmp

#lslpp -l bos.adt.base bos.adt.lib bos.adt.libm bos.perf.perfstat \
bos.perf.libperfstat bos.perf.proctools rsct.basic.rte rsct.compat.clients.rte

#/usr/sbin/instfix -i -k "IV16716 IV20880 IV21128 IV28319"

2, IP 网络地址

vi /etc/hosts

127.0.0.1               loopback localhost      # loopback (lo0) name/address
::1                     loopback localhost      # IPv6 loopback (lo0) name/address

#public ip
192.168.1.77      node1
192.168.1.88      node2
# private ip
10.1.1.1  node1-priv
10.1.1.2 node2-priv
# vip
192.168.1.78      node1-vip
192.168.1.89      node2-vip
# scan ip
192.168.1.99      scan-vip

3, 创建用户组

mkgroup -A id=54421 oinstall
mkgroup -A id=54322 dba
mkgroup -A id=54323 oper
mkgroup -A id=54325 dgdba
mkgroup -A id=54326 kmdba
mkgroup -A id=54327 asmdba
mkgroup -A id=54328 asmoper
mkgroup -A id=54329 asmadmin
mkgroup -A id=54330 racdba

mkuser id='53322' pgrp='oinstall' groups='asmadmin,asmdba,racdba' home='/home/grid' grid
mkuser id='53321' pgrp='oinstall' groups='dba,dgdba,kmdba,asmdba,racdba,asmoper' home='/home/oracle' oracle

# /usr/bin/lsuser -a capabilities grid
# /usr/bin/chuser capabilities=CAP_NUMA_ATTACH,CAP_BYPASS_RAC_VMM,CAP_PROPAGATE grid

# /usr/bin/lsuser -a capabilities oracle
# /usr/bin/chuser capabilities=CAP_NUMA_ATTACH,CAP_BYPASS_RAC_VMM,CAP_PROPAGATE oracle

4, 存储划分(华为)

# upadm show lun
Vendor of hdisk0 is not managed by UltraPath
Vendor of hdisk1 is not managed by UltraPath
Vendor of hdisk2 is not managed by UltraPath
------------------------------------------------------------------------------------------------------------------------------------
Device Name:        Lun Name:                     Vendor ID:  Type:          Serial Number:        Device WWN:                     
------------------------------------------------------------------------------------------------------------------------------------
hdisk3              AIX_ASM_01                    HUAWEI      XSG1            2102351QDS10K9000007  6F4796010057FB1D288980560000000D
hdisk4              AIX_ASM_02                    HUAWEI      XSG1            2102351QDS10K9000007  6F4796010057FB1D2889807A0000000F
hdisk5              AIX_ASM_03                    HUAWEI      XSG1            2102351QDS10K9000007  6F4796010057FB1D288980B600000010
hdisk6              AIX_ASM_04                    HUAWEI      XSG1            2102351QDS10K9000007  6F4796010057FB1D288980EE00000011
hdisk7              AIX_LVM_01                    HUAWEI      XSG1            2102351QDS10K9000007  6F4796010057FB1D288AC4FD00000012
hdisk8              AIX_LVM_02                    HUAWEI      XSG1            2102351QDS10K9000007  6F4796010057FB1D288AC52B00000013


$ cd /dev
$ chdev -l  hdisk3  -areserve_policy=no_reserve 
$ chdev -l  hdisk4  -areserve_policy=no_reserve 
$ chdev -l  hdisk5  -areserve_policy=no_reserve 
$ chdev -l  hdisk6  -areserve_policy=no_reserve 
$ chdev -l  hdisk11 -areserve_policy=no_reserve 


chown grid.asmadmin /dev/hdisk3 
chown grid.asmadmin /dev/hdisk4 
chown grid.asmadmin /dev/hdisk5 
chown grid.asmadmin /dev/hdisk6 
chown grid.asmadmin /dev/hdisk11

chown grid.asmadmin /dev/rhdisk3 
chown grid.asmadmin /dev/rhdisk4 
chown grid.asmadmin /dev/rhdisk5 
chown grid.asmadmin /dev/rhdisk6 
chown grid.asmadmin /dev/rhdisk11

chmod  660 /dev/rhdisk3 
chmod  660 /dev/rhdisk4 
chmod  660 /dev/rhdisk5 
chmod  660 /dev/rhdisk6 
chmod  660 /dev/rhdisk11

-- clear PVID if ASM disk have
/usr/sbin/chdev -l hdisk3 -a pv=clear
/usr/sbin/chdev -l hdisk4 -a pv=clear
/usr/sbin/chdev -l hdisk5 -a pv=clear
/usr/sbin/chdev -l hdisk6 -a pv=clear
/usr/sbin/chdev -l hdisk11 -a pv=clear

5, 内核参数

/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=4194304
/usr/sbin/no -p -o ipqmaxlen=512

# /usr/sbin/no -p -o tcp_ephemeral_low=9000 -o tcp_ephemeral_high=65500
# /usr/sbin/no -p -o udp_ephemeral_low=9000 -o udp_ephemeral_high=65500

-- modify maxuproc
a. Enter the following command:
# smit chgsys
b. Verify that the value shown for Maximum number of PROCESSES allowed
per user is greater than or equal to 16384.
If necessary, edit the existing value.
c. When you have finished making changes, press F10 to exit.

-- modify ncargs
Enter the following command:
# smit chgsys
b. Verify that the value shown for ARG/ENV list size in 4K byte blocks
is greater than or equal to 128.
If necessary, edit the existing value.
c. When you have finished making changes, press F10 to exit.

# ioo –o aio_maxreqs
aio_maxreqs = 65536

# ioo -r –o aio_maxservers = 65536

vmo -p -o minperm%=3
vmo -p -o maxperm%=90
vmo -p -o maxclient%=90
vmo -p -o lru_file_repage=0
vmo -p -o strict_maxclient=1
vmo -p -o strict_maxperm=0

/usr/sbin/chdev -l sys0 -a ncargs='1024'

# vi  /etc/security/login.cfg

##Modificar
STD_AUTH

##Por
PAM_AUTH

# vi /etc/pam.conf

dtsession    auth    required /usr/lib/security/pam_aix
dtlogin      session required /usr/lib/security/pam_aix
ftp          session required /usr/lib/security/pam_aix
imap         session required /usr/lib/security/pam_aix
login        session required /usr/lib/security/pam_aix
rexec        session required /usr/lib/security/pam_aix
rlogin       session required /usr/lib/security/pam_aix
rsh          session required /usr/lib/security/pam_aix
snapp        session required /usr/lib/security/pam_aix
su           session required /usr/lib/security/pam_aix
swrole       session required /usr/lib/security/pam_aix
telnet       session required /usr/lib/security/pam_aix
xdm          session required /usr/lib/security/pam_aix
OTHER        session required /usr/lib/security/pam_prohibit
websm_rlogin session required /usr/lib/security/pam_aix
websm_su     session required /usr/lib/security/pam_aix
wbem         session required /usr/lib/security/pam_aix


vmo -p -o minperm%=3
vmo -p -o maxperm%=90
vmo -p -o maxclient%=90
vmo -p -o lru_file_repage=0
vmo -p -o strict_maxclient=1
vmo -p -o strict_maxperm=0

/usr/sbin/chdev -l sys0 -a ncargs='1024'

schedo -L| grep "vpm_xvcpus" |cut -d " " -f 17

# vi  /etc/ssh/sshd_config
Modificar 
#LoginGraceTime 2m
Por
LoginGraceTime 0


#vi /etc/rc.net

if [ -f /usr/sbin/no ] ; then
 /usr/sbin/no -o udp_sendspace=65536
 /usr/sbin/no -o udp_recvspace=655360
 /usr/sbin/no -o tcp_sendspace=65536
 /usr/sbin/no -o tcp_recvspace=65536
 /usr/sbin/no -o rfc1323=1
 /usr/sbin/no -o sb_max=4194304
 /usr/sbin/no -o ipqmaxlen=512
fi

Note:
udp_sendspace = ((DB_BLOCK_SIZE * DB_FILE_MULTIBLOCK_READ_COUNT) + 4 KB) but no lower than 65536
udp_recvspace = 655360 (Minimum recommended value is 10x udp_sendspace, parameter value must be less than sb_max)
注意有时rc.net可能不会执行 udp_sedspace 参数没有修改,导致只能启动一个实例,另一个实例启动会提示CRS-5818错误。cssd.log中

2018-03-29 21:51:23.639 : CSSDGNS:2057: clssgnsCheckGNSConfigured: CLSCE wait(30000)  returned 0, clskerror: clsce: CRS-10203: (:CLSCE0063:)  Could not connect to the Event Manager daemon, evtres 3
2018-03-29 21:51:23.640 : CSSDGNS:2057: clssgnsCheckGNSConfigured: CLSCE connection error, re-subscribing for GNS resource events.
2018-03-29 21:51:23.641 :GIPCXCPT:2057: gipcShutdownF: relinquishGipcCtx
2018-03-29 21:51:23.641 : CLSCEVT:2057: (:CLSCE0028:)clsce_unsubscribe 111890370 successfully unsubscribed : 0
2018-03-29 21:51:23.953 :    CSSD:8483: clssscthrdmain: Terminating thread clssscMonitorThread
2018-03-29 21:51:23.991 :    CSSD:7455: clssnmPollingThread: state(3) clusterState(1) exit
2018-03-29 21:51:23.991 :    CSSD:7455: clssscthrdmain: Terminating thread clssnmPollingThread
2018-03-29 21:51:24.223 :    CSSD:7712: clssnmSendingThread: state(3) clusterState(0) exit
2018-03-29 21:51:24.223 :    CSSD:7712: clssscthrdmain: Terminating thread clssnmSendingThread
2018-03-29 21:51:24.225 :GIPCHAUP:5912: gipchaUpperProcessDisconnect: processing DISCONNECT for hendp 115768d50 

6, Enabling I/O Completion Ports

$ lsdev | grep iocp
By default, IOCP is set to Defined. To enable IOCP, set IOCP to Available using the
following procedure:
1. Log in as root and run the following command:
# smitty iocp
2. Select Change / Show Characteristics of I/O Completion Ports.
3. Change configured state at system restart from Defined to Available.
4. Run the lsdev command to confirm the IOCP status is set to Available:
$ lsdev | grep iocp
iocp0 Available I/O Completion Ports
Restart the system to make the changes permanent.

否则CRS启动会失败

WARNING: [Jun 29, 2017 3:19:34 PM] 0509-130 Symbol resolution failed for /app/12.2.0.1/grid/lib/libons.so because:
WARNING: [Jun 29, 2017 3:19:34 PM] 0509-136 Symbol CreateIoCompletionPort (number 93) is not exported from
WARNING: [Jun 29, 2017 3:19:34 PM] dependent module /unix.
WARNING: [Jun 29, 2017 3:19:34 PM] 0509-136 Symbol GetQueuedCompletionStatus (number 94) is not exported from
WARNING: [Jun 29, 2017 3:19:34 PM] dependent module /unix.
WARNING: [Jun 29, 2017 3:19:34 PM] 0509-136 Symbol ReadFile (number 95) is not exported from
WARNING: [Jun 29, 2017 3:19:34 PM] dependent module /unix.

7 , 改密码配置SSH 互信

-Cambiar passwords
#passwd oracle
#passwd grid

# ./sshsetup/sshUserSetup.sh –user grid  –hosts "node1 node2"

# ./sshsetup/sshUserSetup.sh –user oracle –hosts "node1 node2"

8, 创建GI & DB 软件目录

mkdir -p /u01/app/12.2.0/grid
mkdir -p /u01/app/grid
mkdir -p /u01/app/oracle
mkdir -p /u01/app/oracle/product/12.2.0/dbhome_1
chown -R grid:oinstall /u01
chown oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/

9, 配置用户profile

-- grid --
umask 022
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java7_64/jre/bin:/usr/java7_64/bin

export ORACLE_SID=+ASM[N]
export ORACLE_HOME=/u01/app/12.2.0/grid
export ORACLE_BASE=/u01/app/grid
export PATH=$ORACLE_HOME/bin:$PATH
export PS1='[$ORACLE_SID:$PWD]$'

-- oracle --
umask 022
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java7_64/jre/bin:/usr/java7_64/bin

export ORACLE_SID=dwhg
export ORACLE_HOME=/u01/app/oracle/product/12.2.0/dbhome_1
export ORACLE_BASE=/u01/app/oracle
export PATH=$ORACLE_HOME/bin:$PATH
export PS1='[$ORACLE_SID:$PWD]$'

10, 上传安装介质,使用对应software owner用户解压

su – grid
cd $GI_HOME
unzip GI.ZIP

su – oracle
unzip DG.zip

11 , Running the rootpre.sh Script

Run the rootpre.sh script only the first time you install Oracle Database on IBM AIX on POWER Systems (64-Bit).

Note:You do not have to run the rootpre.sh script on an IBM AIX on POWER Systems (64-Bit) server that has an Oracle Database software already installed.
Use the following procedure to run the rootpre.sh script:
Switch the user to root:
$ su – root
password:
#
Complete one of the following steps, depending on the location of the installation files:
If the installation files are on a disc, enter a command similar to the following,
# /directory_path/rootpre/rootpre.sh
directory_path is the disc mount point directory or the path of the db directory:
If the installation files are on the hard disk, change the directory to the location where rootpre.sh exists and enter the following command:
# ./rootpre.sh

12. 图形安装 或静默安装 ,推荐图形
e.g.

$./gridSetup.sh -silent -noconfig -ignorePrereqFailure -responseFile /u01/app/12.2.0/grid/install/response/response_grid.rsp
$/u01/app/12.2.0/grid/perl/bin/perl -I/u01/app/12.2.0/grid/perl/lib -I/u01/app/12.2.0/grid/crs/install /u01/app/12.2.0/grid/crs/install/roothas.pl
$asmca -silent -configureASM -diskString '/dev/rhdisk*' -diskGroupName DG_DWHG -disk '/dev/rhdisk4' -au_size 8 -redundancy EXTERNAL -sysAsmPassword dwhg00 -asmsnmpPassword dwhg00
$asmca -createDiskGroup -diskString '/dev/rhdisk*' -diskGroupName DG_ARCH -disklist '/dev/rhdisk5' -au_size 8 -redundancy EXTERNAL -silent

$./runInstaller -silent -noconfig -ignorePrereqFailure -responseFile /media/softwareBD12cR2/database/response/db_install.rsp

注意 节点1的root.sh 会花费很长的时间 /u01/app/12.2.0/grid/root.sh 执行了40分钟,step 18 of 19: ‘ConfigNode’ 就要20分钟,造成一种假死现象。

打赏

对不起,这篇文章暂时关闭评论。