【安裝】AIX安裝單例項11gR2 GRID+DB
【安裝】AIX安裝單例項11gR2 GRID+DB
1.1 BLOG文件結構圖
1.2 前言部分
1.2.1 導讀和注意事項
各位技術愛好者,看完本文後,你可以掌握如下的技能,也可以學到一些其它你所不知道的知識,~O(∩_∩)O~:
① 基於aix安裝11gR2的grid和db軟體(重點)
② 靜默安裝
Tips:
① 若文章程式碼格式有錯亂,推薦使用QQ、搜狗或360瀏覽器,也可以下載pdf格式的文件來檢視,pdf文件下載地址:http://yunpan.cn/cdEQedhCs2kFz (提取碼:ed9b)
② 本篇BLOG中命令的輸出部分需要特別關注的地方我都用灰色背景和粉紅色字型來表示,比如下邊的例子中,thread 1的最大歸檔日誌號為33,thread 2的最大歸檔日誌號為43是需要特別關注的地方;而命令一般使用黃色背景和紅色字型標注;對程式碼或程式碼輸出部分的注釋一般採用藍色字型表示。
List of Archived Logs in backup set 11
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- ------------------- ---------- ---------
1 32 1621589 2015-05-29 11:09:52 1625242 2015-05-29 11:15:48
1 33 1625242 2015-05-29 11:15:48 1625293 2015-05-29 11:15:58
2 42 1613951 2015-05-29 10:41:18 1625245 2015-05-29 11:15:49
2 43 1625245 2015-05-29 11:15:49 1625253 2015-05-29 11:15:53
[ZFXXDB1:root]:/>lsvg -o
T_XDESK_APP1_vg
rootvg
[ZFXXDB1:root]:/>
00:27:22 SQL> alter tablespace idxtbs read write;
====》2097152*512/1024/1024/1024=1G
本文如有錯誤或不完善的地方請大家多多指正,ITPUB留言或QQ皆可,您的批評指正是我寫作的最大動力。
1.2.2 相關參考文章連結
如何建立ASM磁碟 http://blog.itpub.net/26736162/viewspace-1401193/
Oracle?ASM+11gR2安裝 http://blog.itpub.net/26736162/viewspace-1205206/
【DBCA -SILENT】靜默安裝之rac資料庫安裝 http://blog.itpub.net/26736162/viewspace-1586352/
ASM資料檔案和FILESYSTEM檔案轉移方法集錦 http://blog.itpub.net/26736162/viewspace-1400516/
1.2.3 本文簡介
本文亮點是全篇基於命令列來安裝。
---------------------------------------------------------------------------------------------------------------------
第二章 AIX安裝單例項11gR2 GRID+DB
2.1 安裝環境收集
專案 |
primary db |
db 型別 |
單例項 |
db version |
11.2.0.3.0 |
db 儲存 |
ASM |
主機IP地址/hosts配置 |
22.188.187.158 ZFFR4CB1101 |
OS版本及kernel版本 |
AIX 64位 7.1.0.0 |
2.2 系統硬體檢測
記憶體的基本要求
至少1GB的實體記憶體
Oracle官方推薦記憶體2GB或者更多
這裡我們如果是實驗環境滿足基本條件即可。實際生產環境要充分的評估業務使用情況和系統的架構來制定記憶體的分配和預留。
在AIX系統命令列中輸入
# getconf REAL_MEMORY
11927552
我們記憶體是12G,非常充裕,這個和實際生產系統使用的記憶體也差不多
l 下表列出記憶體與交換空間大小的對應關係
可用記憶體RAM |
交換空間需求 |
1GB到2GB之間 |
記憶體大小的1.5倍 |
2GB到16GB之間 |
等於記憶體的大小 |
超過16GB |
以16GB為準 |
檢視要安裝的AIX6.1系統的交換空間的尺寸,通過以下命令
# lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type Chksum
hd6 hdisk0 rootvg 11264MB 1 yes yes lv 0
輸出的結果是我們實體記憶體12個G,這裡系統還佔用一小部分,如果不是的話,
chps –s number hd6 增加交換空間,例如 chps –s 28 hd6 28*pp size算出number數即可。
1.2 磁碟空間要求
l 至少1GB的/TMP 目錄空間
我們繼續滿足條件,這個空間其實可以給大了,我們還要利用它存放oracle 11g安裝包,這裡我們給20個G.繼續下一個環節
1.3 執行級別要求
l 確保系統執行在2級別模式
# cat /etc/.init.state
2.檢查軟體需求
2.1 作業系統要求
l AIX 5L V5.3 TL 09 SP1 ("5300-09-01"), 64 bit kernel
l AIX 6.1 TL 02 SP 1 ("6100-02-01), 64-bit kernel
l AIX 7.1 TL 0 SP 1 ("7100-00-01"), 64-bit kernel
我們滿足上面羅列出的基本條件即可,或者更高的修訂版本,但是不能比上面所列出的低。我們安裝的是AIX 6.1的系統,確認作業系統版本,命令如下
# oslevel –s
6100-07-00-0000
滿足安裝條件,我們繼續下一步
2.2 安裝oracle 11G 所需要的作業系統環境包
我們要確保以下的作業系統環境包已安裝
bos.adt.base
bos.adt.lib
bos.adt.libm
bos.perf.libperfstat 6.1.2.1 or later
bos.perf.perfstat
bos.perf.proctools
xlC.aix61.rte.10.1.0.0 or later
xlC.rte.10.1.0.0 or later
gpfs.base 3.2.1.8 or later
命令列查詢是否安裝
# lslpp -l bos.adt.base bos.adt.lib bos.adt.libm bos.perf.perfstat bos.perf.libperfstat bos.perf.proctools
一般情況只要將AIX升級到最新的TL,這一步應該沒有問題
檢視實體記憶體大小
#/usr/sbin/lsattr -E -l sys0 -a realmem
realmem 2031616 Amount of usable physical memory in Kbytes False
檢視swap space,交換空間通常情況下是實體記憶體的2倍,通常採用如下公式計算交換空間的大小512M + (實體記憶體大小(單位M) - 256M) * 1.25
#lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type
hd6 hdisk0 rootvg 512MB 1 yes yes lv
檢視系統結構,AIX下安裝ORACLE需要是64位的系統
# getconf HARDWARE_BITMODE
64
或者
# bootinfo -K
64
檢查OS版本,11GR2需要5300-09以上的版本
# oslevel -s
5300-10-00-0000
檢查如下包是否已經安裝,沒有的話需要smit install進行安裝
lslpp -l bos.adt.base
lslpp -l bos.adt.lib
lslpp -l bos.adt.libm
lslpp -l bos.perf.perfstat
lslpp -l bos.perf.libperfstat
lslpp -l bos.perf.proctools
lslpp -l rsct.basic.rte (這個包官方文件沒有提及,不安裝的情況下檢查通不過)
[ZFFR4CB2101:root]/]> getconf REAL_MEMORY
4194304
[ZFFR4CB2101:root]/]> /usr/sbin/lsattr -E -l sys0 -a realmem
realmem 4194304 Amount of usable physical memory in Kbytes False
[ZFFR4CB2101:root]/]> lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type Chksum
hd6 hdisk0 rootvg 8192MB 0 yes yes lv 0
[ZFFR4CB2101:root]/]> getconf HARDWARE_BITMODE
64
[ZFFR4CB2101:root]/]> bootinfo -K
64
[ZFFR4CB2101:root]/]>
[ZFFR4CB2101: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
[ZFFR4CB2101:root]/]> cat /etc/.init.state
2
[ZFFR4CB2101:root]/]> oslevel -s
7100-03-03-1415
[ZFFR4CB2101:root]/]> lslpp -l bos.adt.base bos.adt.lib bos.adt.libm bos.perf.perfstat bos.perf.libperfstat bos.perf.proctools
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
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
lslpp: 0504-132 Fileset bos.perf.proctools not installed.
2.3 建立檔案系統
/usr/lpp/EMC/Symmetrix/bin/inq.aix64_51 -showvol -sid
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
[ZFFR4CB2101: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
[ZFFR4CB2101: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
[ZFFR4CB2101: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
[ZFFR4CB2101:root]/]> mklv -t jfs2 -y tlv_u01 -x 1024 t_u01_vg 400
tlv_u01
[ZFFR4CB2101: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
[ZFFR4CB2101:root]/]> mount /u01
[ZFFR4CB2101: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
[ZFFR4CB2101:root]/]>
[ZFFR4CB2101:root]/]> mklv -t jfs2 -y tlv_softtmp -x 1024 t_u01_vg 240
tlv_softtmp
[ZFFR4CB2101: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
[ZFFR4CB2101:root]/]> mount /softtmp
[ZFFR4CB2101: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
[ZFFR4CB2101:root]/]>
2.4 建立安裝目錄
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
[ZFFR4CB2101:root]/]> mkdir -p /u01/app/11.2.0/grid
[ZFFR4CB2101:root]/]> chmod -R 755 /u01/app/11.2.0/grid
[ZFFR4CB2101:root]/]> mkdir -p /u01/app/grid
[ZFFR4CB2101:root]/]> chmod -R 755 /u01/app/grid
[ZFFR4CB2101:root]/]> mkdir -p /u01/app/oracle
[ZFFR4CB2101:root]/]> chmod -R 755 /u01/app/oracle
[ZFFR4CB2101:root]/]>
[ZFFR4CB2101:root]/]> cd /u01/app
[ZFFR4CB2101: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
[ZFFR4CB2101:root]/u01/app]>
2.5 建立使用者和使用者組
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
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
[ZFFR4CB2101:root]/u01/app]> mkgroup -A id=1024 dba
[ZFFR4CB2101: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
[ZFFR4CB2101:root]/u01/app]> passwd grid
Changing password for "grid"
grid's New password:
Enter the new password again:
[ZFFR4CB2101:root]/u01/app]>
[ZFFR4CB2101: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
[ZFFR4CB2101:root]/u01/app]> passwd oracle
Changing password for "oracle"
oracle's New password:
Enter the new password again:
[ZFFR4CB2101:root]/u01/app]> chown -R grid:dba /u01/app/11.2.0
[ZFFR4CB2101:root]/u01/app]> chown grid:dba /u01/app
[ZFFR4CB2101:root]/u01/app]> chown grid:dba /u01/app/grid
[ZFFR4CB2101:root]/u01/app]> chown -R oracle:dba /u01/app/oracle
[ZFFR4CB2101:root]/u01/app]> chown oracle:dba /u01
[ZFFR4CB2101:root]/u01/app]> /usr/sbin/lsuser -a capabilities grid
grid capabilities=CAP_NUMA_ATTACH,CAP_BYPASS_RAC_VMM,CAP_PROPAGATE
[ZFFR4CB2101:root]/u01/app]> /usr/sbin/lsuser -a capabilities oracle
oracle capabilities=CAP_NUMA_ATTACH,CAP_BYPASS_RAC_VMM,CAP_PROPAGATE
[ZFFR4CB2101:root]/u01/app]>
2.6 配置 grid 和 oracle的 .profile
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=22.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=22.188.216.97:0.0
. ~/.profile 生效當前的環境變數
2.7 準備ASM磁碟
ASM磁碟許可權
chown grid.dba /dev/rhdiskN -> (ocr,votedisk)
chown oracle.dba /dev/rhdiskM -> (datafile)
chmod 660 /dev/rhdiskN、M
chown grid.dba /dev/rhdisk20
chown oracle.dba /dev/rhdisk21
chmod 660 /dev/rhdisk20
chmod 660 /dev/rhdisk21
[ZFFR4CB2101: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 t_u01_vg active
hdisk23 00c49fc461fc7c88 T_TEST_LHR_VG active
hdisk24 00c49fc461fc7cca T_TEST_LHR_VG active
[ZFFR4CB2101:root]/]> chown grid.dba /dev/rhdisk20
[ZFFR4CB2101:root]/]> chown oracle.dba /dev/rhdisk21
[ZFFR4CB2101:root]/]> chmod 660 /dev/rhdisk20
[ZFFR4CB2101:root]/]> chmod 660 /dev/rhdisk21
[ZFFR4CB2101:root]/]>
2.8 調整相應的系統引數
2.8.1 /etc/security/limits
vi /etc/security/limits
root:
fsize = -1
stack = -1
fsize_hard = -1
nofiles = 65536
core = -1
data = -1
cpu_hard = -1
data_hard = -1
stack_hard = -1
rss = -1
rss_hard = -1
nofiles_hard = 65536
cpu = -1
oracle:
fsize = -1
stack = -1
fsize_hard = -1
nofiles = 65536
core = -1
data = -1
cpu_hard = -1
data_hard = -1
stack_hard = -1
rss = -1
rss_hard = -1
nofiles_hard = 65536
cpu = -1
grid:
fsize = -1
stack = -1
fsize_hard = -1
nofiles = 65536
core = -1
data = -1
cpu_hard = -1
data_hard = -1
stack_hard = -1
rss = -1
rss_hard = -1
nofiles_hard = 65536
cpu = -1
2.8.2 調整使用者最大程式數調整maxuproc(系統最大程式數)
調整maxuproc(系統最大程式數)
smitty chgsys
或是
#chdev -l sys0 -a maxuproc=16384
sys0 changed
[ZFFR4CB2101:root]/]> lsattr -E -l sys0 -a maxuproc
maxuproc 16384 Maximum number of PROCESSES allowed per user True
[ZFFR4CB2101:root]/]> chdev -l sys0 -a maxuproc=16384
sys0 changed
[ZFFR4CB2101:root]/]> lsattr -E -l sys0 -a maxuproc
maxuproc 16384 Maximum number of PROCESSES allowed per user True
[ZFFR4CB2101:root]/]>
2.8.3 其它引數
[ZFFR4CB2101:root]/]> ioo -a | grep aio_maxreqs
aio_maxreqs = 131072
posix_aio_maxreqs = 131072
[ZFFR4CB2101:root]/]>
# ioo –o aio_maxreqs
aio_maxreqs = 65536
這裡有需要宣告的是在AIX 5L需要執行rootpre.sh指令碼才能開啟aio功能,在AIX 6L中預設已開啟。在AIX 5和6中都是65536(6k)的值去做最大的非同步io。
調整ncargs(系統塊大小)
#chdev -l sys0 -a ncargs=128
sys0 changed
調整非同步io
#smitty aio
修改完後需要重啟動,可以使用如下命令檢視aio server的程式數
$pstat -a|grep aios
修改完畢後,需重起系統生效.
優化虛擬記憶體管理
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
調整網路引數
no -r -o ipqmaxlen=512
no -p -o rfc1323=1
no -p -o sb_max=131072 //2*65536
no -p -o tcp_recvspace=65536
no -p -o tcp_sendspace=65536
no -p -o udp_recvspace=655360
no -p -o udp_sendspace=65536
2.8.4 shell指令碼
_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
第三章 grid安裝
3.1 準備安裝源
上傳檔案到softtmp目錄:
[ZFFR4CB2101:root]/softtmp]> l
total 9644872
drwxr-xr-x 2 root system 256 Mar 08 16:10 lost+found
-rw-r----- 1 root system 1766307597 Mar 02 04:05 p10404530_112030_AIX64-5L_1of7.zip
-rw-r----- 1 root system 1135393912 Mar 02 04:03 p10404530_112030_AIX64-5L_2of7.zip
-rw-r----- 1 root system 2036455635 Mar 02 04:06 p10404530_112030_AIX64-5L_3of7.zip
[ZFFR4CB2101:root]/softtmp]> unzip p10404530_112030_AIX64-5L_3of7.zip
Archive: p10404530_112030_AIX64-5L_3of7.zip
creating: grid/
creating: grid/stage/
inflating: grid/stage/shiphomeproperties.xml
creating: grid/stage/Components/
creating: grid/stage/Components/oracle.crs/
creating: grid/stage/Components/oracle.crs/11.2.0.3.0/
creating: grid/stage/Components/oracle.crs/11.2.0.3.0/1/
creating: grid/stage/Components/oracle.crs/11.2.0.3.0/1/DataFiles/
inflating: grid/stage/Components/oracle.crs/11.2.0.3.0/1/DataFiles/filegroup5.jar
inflating: grid/stage/Components/oracle.crs/11.2.0.3.0/1/DataFiles/filegroup4.jar
inflating: grid/stage/Components/oracle.crs/11.2.0.3.0/1/DataFiles/filegroup3.jar
inflating: grid/stage/Components/oracle.crs/11.2.0.3.0/1/DataFiles/filegroup2.jar
inflating: grid/stage/Components/oracle.crs/11.2.0.3.0/1/DataFiles/filegroup1.jar
creating: grid/stage/Components/oracle.has.crs/
《《《《。。。。。。。。篇幅原因,有省略。。。。。。。。》》》》
inflating: grid/doc/server.11203/E18951-02.mobi
inflating: grid/welcome.html
creating: grid/sshsetup/
inflating: grid/sshsetup/sshUserSetup.sh
inflating: grid/readme.html
[ZFFR4CB2101:root]/softtmp]>
[ZFFR4CB2101:root]/softtmp]> l
total 9644880
drwxr-xr-x 9 root system 4096 Oct 28 2011 grid
drwxr-xr-x 2 root system 256 Mar 08 16:10 lost+found
-rw-r----- 1 root system 1766307597 Mar 02 04:05 p10404530_112030_AIX64-5L_1of7.zip
-rw-r----- 1 root system 1135393912 Mar 02 04:03 p10404530_112030_AIX64-5L_2of7.zip
-rw-r----- 1 root system 2036455635 Mar 02 04:06 p10404530_112030_AIX64-5L_3of7.zip
[ZFFR4CB2101:root]/softtmp]> cd grid
[ZFFR4CB2101:root]/softtmp/grid]> l
total 168
drwxr-xr-x 9 root system 4096 Oct 10 2011 doc
drwxr-xr-x 4 root system 4096 Oct 21 2011 install
-rwxr-xr-x 1 root system 28122 Oct 28 2011 readme.html
drwxrwxr-x 2 root system 256 Oct 21 2011 response
drwxrwxr-x 3 root system 256 Oct 21 2011 rootpre
-rwxr-xr-x 1 root system 13369 Sep 22 2010 rootpre.sh
drwxrwxr-x 2 root system 256 Oct 21 2011 rpm
-rwxr-xr-x 1 root system 10006 Oct 21 2011 runInstaller
-rwxrwxr-x 1 root system 4878 May 14 2011 runcluvfy.sh
drwxrwxr-x 2 root system 256 Oct 21 2011 sshsetup
drwxr-xr-x 14 root system 4096 Oct 21 2011 stage
-rw-r--r-- 1 root system 4561 Oct 10 2011 welcome.html
3.2 配置連通性+執行runcluvfy.sh指令碼預檢測
該步驟主要是為了可以執行/softtmp/grid/runcluvfy.sh stage -pre crsinst -n ZFFR4CB2101 -verbose -fixup,若不檢測或者採用圖形安裝的話可以不用執行。
su - grid
mkdir -p ~/.ssh
chmod 700 ~/.ssh
ssh-keygen -t rsa ->回車->回車->回車
ssh-keygen -t dsa ->回車->回車->回車
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
ssh `hostname` date
[grid@ZFFR4CB2101:/home/grid]$ /softtmp/grid/runcluvfy.sh stage -pre crsinst -n ZFFR4CB2101 -verbose -fixup
Performing pre-checks for cluster services setup
Checking node reachability...
Check: Node reachability from node "ZFFR4CB2101"
Destination Node Reachable?
------------------------------------ ------------------------
ZFFR4CB2101 yes
Result: Node reachability check passed from node "ZFFR4CB2101"
Checking user equivalence...
Check: User equivalence for user "grid"
Node Name Status
------------------------------------ ------------------------
ZFFR4CB2101 passed
Result: User equivalence check passed for user "grid"
Checking node connectivity...
Checking hosts config file...
Node Name Status
------------------------------------ ------------------------
ZFFR4CB2101 passed
Verification of the hosts config file successful
Interface information for node "ZFFR4CB2101"
Name IP Address Subnet Gateway Def. Gateway HW Address MTU
------ --------------- --------------- --------------- --------------- ----------------- ------
en0 22.188.187.158 22.188.187.0 22.188.187.158 22.188.187.1 C6:03:AE:03:97:83 1500
Check: Node connectivity of subnet "22.188.187.0"
Result: Node connectivity passed for subnet "22.188.187.0" with node(s) ZFFR4CB2101
Check: TCP connectivity of subnet "22.188.187.0"
Result: TCP connectivity check passed for subnet "22.188.187.0"
Interfaces found on subnet "22.188.187.0" that are likely candidates for VIP are:
ZFFR4CB2101 en0:22.188.187.158
WARNING:
Could not find a suitable set of interfaces for the private interconnect
Result: Node connectivity check passed
Checking multicast communication...
Checking subnet "22.188.187.0" for multicast communication with multicast group "230.0.1.0"...
Check of subnet "22.188.187.0" for multicast communication with multicast group "230.0.1.0" passed.
Check of multicast communication passed.
Check: Total memory
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
ZFFR4CB2101 4GB (4194304.0KB) 2GB (2097152.0KB) passed
Result: Total memory check passed
Check: Available memory
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
ZFFR4CB2101 2.7969GB (2932716.0KB) 50MB (51200.0KB) passed
Result: Available memory check passed
Check: Swap space
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
ZFFR4CB2101 8GB (8388608.0KB) 4GB (4194304.0KB) passed
Result: Swap space check passed
Check: Free disk space for "ZFFR4CB2101:/tmp"
Path Node Name Mount point Available Required Status
---------------- ------------ ------------ ------------ ------------ ------------
/tmp ZFFR4CB2101 /tmp 1.7661GB 1GB passed
Result: Free disk space check passed for "ZFFR4CB2101:/tmp"
Check: User existence for "grid"
Node Name Status Comment
------------ ------------------------ ------------------------
ZFFR4CB2101 passed exists(1025)
Checking for multiple users with UID value 1025
Result: Check for multiple users with UID value 1025 passed
Result: User existence check passed for "grid"
Check: Group existence for "oinstall"
Node Name Status Comment
------------ ------------------------ ------------------------
ZFFR4CB2101 passed exists
Result: Group existence check passed for "oinstall"
Check: Group existence for "dba"
Node Name Status Comment
------------ ------------------------ ------------------------
ZFFR4CB2101 passed exists
Result: Group existence check passed for "dba"
Check: Membership of user "grid" in group "oinstall" [as Primary]
Node Name User Exists Group Exists User in Group Primary Status
---------------- ------------ ------------ ------------ ------------ ------------
ZFFR4CB2101 yes yes yes no failed
Result: Membership check for user "grid" in group "oinstall" [as Primary] failed
Check: Membership of user "grid" in group "dba"
Node Name User Exists Group Exists User in Group Status
---------------- ------------ ------------ ------------ ----------------
ZFFR4CB2101 yes yes yes passed
Result: Membership check for user "grid" in group "dba" passed
Check: Run level
Node Name run level Required Status
------------ ------------------------ ------------------------ ----------
ZFFR4CB2101 2 2 passed
Result: Run level check passed
Check: Hard limits for "maximum open file descriptors"
Node Name Type Available Required Status
---------------- ------------ ------------ ------------ ----------------
ZFFR4CB2101 hard 65536 65536 passed
Result: Hard limits check passed for "maximum open file descriptors"
Check: Soft limits for "maximum open file descriptors"
Node Name Type Available Required Status
---------------- ------------ ------------ ------------ ----------------
ZFFR4CB2101 soft 65536 1024 passed
Result: Soft limits check passed for "maximum open file descriptors"
Check: Hard limits for "maximum user processes"
Node Name Type Available Required Status
---------------- ------------ ------------ ------------ ----------------
ZFFR4CB2101 hard 16384 16384 passed
Result: Hard limits check passed for "maximum user processes"
Check: Soft limits for "maximum user processes"
Node Name Type Available Required Status
---------------- ------------ ------------ ------------ ----------------
ZFFR4CB2101 soft 16384 2047 passed
Result: Soft limits check passed for "maximum user processes"
Check: System architecture
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
ZFFR4CB2101 powerpc powerpc passed
Result: System architecture check passed
Check: Kernel version
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
ZFFR4CB2101 7.1-7100.03.03.1415 7.1-7100.00.01.1037 passed
Result: Kernel version check passed
Check: Kernel parameter for "ncargs"
Node Name Current Required Status
------------ ------------------------ ------------------------ ----------
ZFFR4CB2101 256 128 passed
Result: Kernel parameter check passed for "ncargs"
Check: Kernel parameter for "maxuproc"
Node Name Current Required Status
------------ ------------------------ ------------------------ ----------
ZFFR4CB2101 16384 2048 passed
Result: Kernel parameter check passed for "maxuproc"
Check: Kernel parameter for "tcp_ephemeral_low"
Node Name Current Required Status
------------ ------------------------ ------------------------ ----------
ZFFR4CB2101 32768 9000 failed (ignorable)
Result: Kernel parameter check passed for "tcp_ephemeral_low"
Check: Kernel parameter for "tcp_ephemeral_high"
Node Name Current Required Status
------------ ------------------------ ------------------------ ----------
ZFFR4CB2101 65535 65500 failed (ignorable)
Result: Kernel parameter check passed for "tcp_ephemeral_high"
Check: Kernel parameter for "udp_ephemeral_low"
Node Name Current Required Status
------------ ------------------------ ------------------------ ----------
ZFFR4CB2101 32768 9000 failed (ignorable)
Result: Kernel parameter check passed for "udp_ephemeral_low"
Check: Kernel parameter for "udp_ephemeral_high"
Node Name Current Required Status
------------ ------------------------ ------------------------ ----------
ZFFR4CB2101 65535 65500 failed (ignorable)
Result: Kernel parameter check passed for "udp_ephemeral_high"
Check: Package existence for "bos.adt.base"
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
ZFFR4CB2101 bos.adt.base-7.1.3.15-0 bos.adt.base-... passed
Result: Package existence check passed for "bos.adt.base"
Check: Package existence for "bos.adt.lib"
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
ZFFR4CB2101 bos.adt.lib-7.1.2.15-0 bos.adt.lib-... passed
Result: Package existence check passed for "bos.adt.lib"
Check: Package existence for "bos.adt.libm"
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
ZFFR4CB2101 bos.adt.libm-7.1.3.0-0 bos.adt.libm-... passed
Result: Package existence check passed for "bos.adt.libm"
Check: Package existence for "bos.perf.libperfstat"
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
ZFFR4CB2101 bos.perf.libperfstat-7.1.3.15-0 bos.perf.libperfstat-... passed
Result: Package existence check passed for "bos.perf.libperfstat"
Check: Package existence for "bos.perf.perfstat"
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
ZFFR4CB2101 bos.perf.perfstat-7.1.3.15-0 bos.perf.perfstat-... passed
Result: Package existence check passed for "bos.perf.perfstat"
Check: Package existence for "bos.perf.proctools"
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
ZFFR4CB2101 bos.perf.proctools-7.1.3.15-0 bos.perf.proctools-... passed
Result: Package existence check passed for "bos.perf.proctools"
Check: Package existence for "xlC.aix61.rte"
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
ZFFR4CB2101 xlC.aix61.rte-12.1.0.1-0 xlC.aix61.rte-10.1.0.0 passed
Result: Package existence check passed for "xlC.aix61.rte"
Check: Package existence for "xlC.rte"
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
ZFFR4CB2101 xlC.rte-12.1.0.1-0 xlC.rte-10.1.0.0 passed
Result: Package existence check passed for "xlC.rte"
Check: Operating system patch for "Patch IZ87216"
Node Name Applied Required Comment
------------ ------------------------ ------------------------ ----------
ZFFR4CB2101 Patch IZ87216:devices.common.IBM.mpio.rte Patch IZ87216 passed
Result: Operating system patch check passed for "Patch IZ87216"
Check: Operating system patch for "Patch IZ87564"
Node Name Applied Required Comment
------------ ------------------------ ------------------------ ----------
ZFFR4CB2101 Patch IZ87564:bos.adt.libmIZ87564:bos.adt.prof Patch IZ87564 passed
Result: Operating system patch check passed for "Patch IZ87564"
Check: Operating system patch for "Patch IZ89165"
Node Name Applied Required Comment
------------ ------------------------ ------------------------ ----------
ZFFR4CB2101 Patch IZ89165:bos.rte.bind_cmds Patch IZ89165 passed
Result: Operating system patch check passed for "Patch IZ89165"
Check: Operating system patch for "Patch IZ97035"
Node Name Applied Required Comment
------------ ------------------------ ------------------------ ----------
ZFFR4CB2101 Patch IZ97035:devices.vdevice.IBM.l-lan.rte Patch IZ97035 passed
Result: Operating system patch check passed for "Patch IZ97035"
Checking for multiple users with UID value 0
Result: Check for multiple users with UID value 0 passed
Check: Current group ID
Result: Current group ID check passed
Starting check for consistency of primary group of root user
Node Name Status
------------------------------------ ------------------------
ZFFR4CB2101 passed
Check for consistency of root user's primary group passed
Starting Clock synchronization checks using Network Time Protocol(NTP)...
NTP Configuration file check started...
The NTP configuration file "/etc/ntp.conf" is available on all nodes
NTP Configuration file check passed
Checking daemon liveness...
Check: Liveness for "xntpd"
Node Name Running?
------------------------------------ ------------------------
ZFFR4CB2101 yes
Result: Liveness check passed for "xntpd"
Check for NTP daemon or service alive passed on all nodes
Checking NTP daemon command line for slewing option "-x"
Check: NTP daemon command line
Node Name Slewing Option Set?
------------------------------------ ------------------------
ZFFR4CB2101 yes
Result:
NTP daemon slewing option check passed
Checking NTP daemon's boot time configuration, in file "/etc/rc.tcpip", for slewing option "-x"
Check: NTP daemon's boot time configuration
Node Name Slewing Option Set?
------------------------------------ ------------------------
ZFFR4CB2101 yes
Result:
NTP daemon's boot time configuration check for slewing option passed
Checking whether NTP daemon or service is using UDP port 123 on all nodes
Check for NTP daemon or service using UDP port 123
Node Name Port Open?
------------------------------------ ------------------------
ZFFR4CB2101 yes
Result: Clock synchronization check using Network Time Protocol(NTP) passed
Checking Core file name pattern consistency...
Core file name pattern consistency check passed.
Checking to make sure user "grid" is not in "system" group
Node Name Status Comment
------------ ------------------------ ------------------------
ZFFR4CB2101 passed does not exist
Result: User "grid" is not part of "system" group. Check passed
Check default user file creation mask
Node Name Available Required Comment
------------ ------------------------ ------------------------ ----------
ZFFR4CB2101 022 0022 passed
Result: Default user file creation mask check passed
Checking consistency of file "/etc/resolv.conf" across nodes
File "/etc/resolv.conf" does not exist on any node of the cluster. Skipping further checks
File "/etc/resolv.conf" is consistent across nodes
Check: Time zone consistency
Result: Time zone consistency check passed
Result: User ID < 65535 check passed
Result: Kernel 64-bit mode check passed
Fixup information has been generated for following node(s):
ZFFR4CB2101
Please run the following script on each node as "root" user to execute the fixups:
'/tmp/CVU_11.2.0.3.0_grid/runfixup.sh'
Pre-check for cluster services setup was unsuccessful on all the nodes.
[ZFFR4CB2101:root]/tmp/CVU_11.2.0.3.0_grid]> /tmp/CVU_11.2.0.3.0_grid/runfixup.sh
Response file being used is :/tmp/CVU_11.2.0.3.0_grid/fixup.response
Enable file being used is :/tmp/CVU_11.2.0.3.0_grid/fixup.enable
Log file location: /tmp/CVU_11.2.0.3.0_grid/orarun.log
Setting Kernel Parameters...
[ZFFR4CB2101:root]/tmp/CVU_11.2.0.3.0_grid]>
基本所有檢測項都pass,可以進行下一步。
3.3 開始安裝grid
3.3.1 靜默安裝grid軟體
先root執行:
/softtmp/grid/rootpre.sh
[ZFFR4CB2101:root]/]> /softtmp/grid/rootpre.sh
/softtmp/grid/rootpre.sh output will be logged in /tmp/rootpre.out_16-03-09.09:47:33
Checking if group services should be configured....
Nothing to configure.
[ZFFR4CB2101:root]/]>
/softtmp/grid/runInstaller -silent -force -noconfig -IgnoreSysPreReqs -ignorePrereq -showProgress \
ORACLE_HOSTNAME=ZFFR4CB2101 \
INVENTORY_LOCATION=/u01/app/oraInventory \
SELECTED_LANGUAGES=en \
oracle.install.option=CRS_SWONLY \
ORACLE_BASE=/u01/app/grid \
ORACLE_HOME=/u01/app/11.2.0/grid \
oracle.install.asm.OSDBA=asmdba \
oracle.install.asm.OSOPER=asmoper \
oracle.install.asm.OSASM=asmadmin \
oracle.install.crs.config.storageOption=ASM_STORAGE \
oracle.install.crs.config.sharedFileSystemStorage.votingDiskRedundancy=EXTERNAL \
oracle.install.crs.config.sharedFileSystemStorage.ocrRedundancy=EXTERNAL \
oracle.install.crs.config.useIPMI=false \
oracle.install.asm.SYSASMPassword=lhr \
oracle.install.asm.diskGroup.name=OCR \
oracle.install.asm.diskGroup.redundancy=EXTERNAL \
oracle.install.asm.diskGroup.disks=/dev/rhdisk20 \
oracle.install.asm.monitorPassword=lhr \
oracle.installer.autoupdates.option=SKIP_UPDATES
命令列模式執行靜默安裝,注意複製指令碼的時候最後不能多加回車符號:
[grid@ZFFR4CB2101:/home/grid]$ /softtmp/grid/runInstaller -silent -force -noconfig -IgnoreSysPreReqs -ignorePrereq -showProgress \
> ORACLE_HOSTNAME=ZFFR4CB2101 \
ORACLE_HOSTNAME=ZFFR4CB2101 \
> INVENTORY_LOCATION=/u01/app/oraInventory \
> SELECTED_LANGUAGES=en \
> oracle.install.option=CRS_SWONLY \
> ORACLE_BASE=/u01/app/grid \
> ORACLE_HOME=/u01/app/11.2.0/grid \
> oracle.install.asm.OSDBA=asmdba \
> oracle.install.asm.OSOPER=asmoper \
> oracle.install.asm.OSASM=asmadmin \
> oracle.install.crs.config.storageOption=ASM_STORAGE \
> oracle.install.crs.config.sharedFileSystemStorage.votingDiskRedundancy=EXTERNAL \
> oracle.install.crs.config.sharedFileSystemStorage.ocrRedundancy=EXTERNAL \
> oracle.install.crs.config.useIPMI=false \
> oracle.install.asm.SYSASMPassword=lhr \
> oracle.install.asm.diskGroup.name=OCR \
> oracle.install.asm.diskGroup.redundancy=EXTERNAL \
> oracle.install.asm.diskGroup.disks=/dev/rhdisk20 \
> oracle.install.asm.monitorPassword=lhr \
> oracle.installer.autoupdates.option=SKIP_UPDATES
********************************************************************************
Your platform requires the root user to perform certain pre-installation
OS preparation. The root user should run the shell script 'rootpre.sh' before
you proceed with Oracle installation. rootpre.sh can be found at the top level
of the CD or the stage area.
Answer 'y' if root has run 'rootpre.sh' so you can proceed with Oracle
installation.
Answer 'n' to abort installation and then ask root to run 'rootpre.sh'.
********************************************************************************
Has 'rootpre.sh' been run by root on all nodes? [y/n] (n)
y
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 190 MB. Actual 4335 MB Passed
Checking swap space: must be greater than 150 MB. Actual 8192 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2016-03-09_04-44-05PM. Please wait ...[grid@ZFFR4CB2101:/home/grid]$ You can find the log of this install session at:
/u01/app/oraInventory/logs/installActions2016-03-09_04-44-05PM.log
Prepare in progress.
.................................................. 9% Done.
Prepare successful.
Copy files in progress.
.................................................. 19% Done.
.................................................. 24% Done.
.................................................. 29% Done.
.................................................. 34% Done.
.................................................. 39% Done.
.................................................. 44% Done.
.................................................. 49% Done.
Copy files successful.
.................................................. 60% Done.
Link binaries in progress.
Link binaries successful.
.................................................. 77% Done.
Setup files in progress.
.................................................. 94% Done.
Setup files successful.
The installation of Oracle Grid Infrastructure was successful.
Please check '/u01/app/oraInventory/logs/silentInstall2016-03-09_04-44-05PM.log' for more details.
Execute Root Scripts in progress.
As a root user, execute the following script(s):
1. /u01/app/oraInventory/orainstRoot.sh
2. /u01/app/11.2.0/grid/root.sh
.................................................. 100% Done.
Execute Root Scripts successful.
Successfully Setup Software.
[grid@ZFFR4CB2101:/home/grid]$
檢視安裝過程中檔案的大小:
[ZFFR4CB2101:root]/]> du -sg /u01/app/11.2.0/grid
0.28 /u01/app/11.2.0/grid
[ZFFR4CB2101:root]/]> du -sg /u01/app/11.2.0/grid
0.55 /u01/app/11.2.0/grid
[ZFFR4CB2101:root]/]> du -sg /u01/app/11.2.0/grid
4.09 /u01/app/11.2.0/grid
[ZFFR4CB2101:root]/]> du -sg /u01/app/11.2.0/grid
6.48 /u01/app/11.2.0/grid
[ZFFR4CB2101:root]/]> du -sg /u01/app/11.2.0/grid
9.58 /u01/app/11.2.0/grid
[ZFFR4CB2101:root]/]> du -sg /u01/app/11.2.0/grid
9.58 /u01/app/11.2.0/grid
[ZFFR4CB2101:root]/]>
安裝要求,root執行如下2個指令碼:
As a root user, execute the following script(s):
1. /u01/app/oraInventory/orainstRoot.sh
2. /u01/app/11.2.0/grid/root.sh
[ZFFR4CB2101:root]/]> /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to dba.
The execution of the script is complete.
[ZFFR4CB2101:root]/]> /u01/app/11.2.0/grid/root.sh
Check /u01/app/11.2.0/grid/install/root_ZFFR4CB2101_2016-03-09_16-49-06.log for the output of root script
[ZFFR4CB2101:root]/]> more /u01/app/11.2.0/grid/install/root_ZFFR4CB2101_2016-03-09_16-49-06.log
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/app/11.2.0/grid
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 script.
Now product-specific root actions will be performed.
To configure Grid Infrastructure for a Stand-Alone Server run the following command as the root user:
/u01/app/11.2.0/grid/perl/bin/perl -I/u01/app/11.2.0/grid/perl/lib -I/u01/app/11.2.0/grid/crs/install /u01/app/11.2.0/grid/crs/install/roothas.pl
To configure Grid Infrastructure for a Cluster execute the following command:
/u01/app/11.2.0/grid/crs/config/config.sh
This command launches the Grid Infrastructure Configuration Wizard. The wizard also supports silent operation, and the parameters can be passed through the response fi
le that is available in the installation media.
安裝要求,單例項執行指令碼/u01/app/11.2.0/grid/perl/bin/perl -I/u01/app/11.2.0/grid/perl/lib -I/u01/app/11.2.0/grid/crs/install /u01/app/11.2.0/grid/crs/install/roothas.pl :
[ZFFR4CB2101:root]/]>/u01/app/11.2.0/grid/perl/bin/perl -I/u01/app/11.2.0/grid/perl/lib -I/u01/app/11.2.0/grid/crs/install /u01/app/11.2.0/grid/crs/install/roothas.pl
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp 'dba'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'system'..
Operation successful.
CRS-4664: Node zffr4cb2101 successfully pinned.
Adding Clusterware entries to inittab
zffr4cb2101 2016/03/09 16:50:11 /u01/app/11.2.0/grid/cdata/zffr4cb2101/backup_20160309_165011.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server
[ZFFR4CB2101:root]/]>
[grid@ZFFR4CB2101:/home/grid]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.cssd ora.cssd.type OFFLINE OFFLINE
ora.diskmon ora....on.type OFFLINE OFFLINE
ora.evmd ora.evm.type ONLINE ONLINE zffr4cb2101
ora.ons ora.ons.type OFFLINE OFFLINE
[grid@ZFFR4CB2101:/home/grid]$
3.3.2 靜默建立asm例項
/u01/app/11.2.0/grid/bin/asmca -silent -configureASM -sysAsmPassword lhr -asmsnmpPassword lhr -diskGroupName OCR -diskList /dev/rhdisk20 -redundancy EXTERNAL
[grid@ZFFR4CB2101:/home/grid]$ /u01/app/11.2.0/grid/bin/asmca -silent -configureASM -sysAsmPassword lhr -asmsnmpPassword lhr -diskGroupName OCR -diskList /dev/rhdisk20 -redundancy EXTERNAL
ASM created and started successfully.
Disk Group OCR created successfully.
vi crsstat_lhr.sh
awk 'BEGIN {printf "%-26s %-26s %-10s %-10s %-10s \n","Name ","Type ","Target ","State ","Host "; printf "%-30s %-26s %-10s %-10s %-10s\n","----------------------------------------","--------------------------","----------", "---------","----------";}'
crs_stat | awk 'BEGIN { FS="=| ";state = 0;} $1~/NAME/ {appname = $2; state=1}; state == 0 {next;} $1~/TYPE/ && state == 1 {apptype = $2; state=2;} $1~/TARGET/ && state == 2 {apptarget = $2; state=3;} $1~/STATE/ && state == 3 {appstate = $2; apphost = $4; state=4;} state == 4 {printf "%-40s %-26s %-10s %-10s %-10s\n", appname,apptype,apptarget,appstate,apphost; state=0;}'
[ZFFR4CB2101:root]/]> chmod +x crsstat_lhr.sh
[ZFFR4CB2101:root]/]> ./crsstat_lhr.sh
Name Type Target State Host
---------------------------------------- -------------------------- ---------- --------- ----------
ora.OCR.dg ora.diskgroup.type ONLINE ONLINE zffr4cb2101
ora.asm ora.asm.type ONLINE ONLINE zffr4cb2101
ora.cssd ora.cssd.type ONLINE ONLINE zffr4cb2101
ora.diskmon ora.diskmon.type OFFLINE OFFLINE
ora.evmd ora.evm.type ONLINE ONLINE zffr4cb2101
ora.ons ora.ons.type OFFLINE OFFLINE
[ZFFR4CB2101:root]/]>
[grid@ZFFR4CB2101:/home/grid]$ ps -ef|grep asm_
grid 6553706 1 0 16:52:35 - 0:00 asm_mmnl_+ASM
grid 6750336 1 0 16:52:34 - 0:00 asm_mmon_+ASM
grid 6947042 1 0 16:52:34 - 0:00 asm_gmon_+ASM
grid 7078108 1 0 16:52:34 - 0:00 asm_rbal_+ASM
grid 7274504 1 0 16:52:34 - 0:00 asm_smon_+ASM
grid 7405708 1 0 16:52:34 - 0:00 asm_ckpt_+ASM
grid 7536862 1 0 16:52:34 - 0:00 asm_lgwr_+ASM
grid 7667964 1 0 16:52:34 - 0:00 asm_mman_+ASM
grid 7733486 1 0 16:52:34 - 0:00 asm_gen0_+ASM
grid 7799032 1 0 16:52:34 - 0:00 asm_dbw0_+ASM
grid 7864574 6225956 0 16:53:55 pts/2 0:00 grep asm_
grid 7930102 1 0 16:52:34 - 0:00 asm_diag_+ASM
grid 7995640 1 0 16:52:33 - 0:00 asm_psp0_+ASM
grid 8061182 1 0 16:52:34 - 0:00 asm_vktm_+ASM
grid 8126716 1 0 16:52:33 - 0:00 asm_pmon_+ASM
grid 8192010 1 0 16:52:34 - 0:00 asm_dia0_+ASM
[grid@ZFFR4CB2101:/home/grid]$
第四章 db安裝
4.1 準備安裝檔案
unzip p10404530_112030_AIX64-5L_1of7.zip && unzip p10404530_112030_AIX64-5L_2of7.zip
[ZFFR4CB2101:root]/]> cd /soft*
[ZFFR4CB2101:root]/softtmp]> l
total 9644880
drwxr-xr-x 9 root system 4096 Oct 28 2011 grid
drwxr-xr-x 2 root system 256 Mar 08 16:10 lost+found
-rw-r----- 1 root system 1766307597 Mar 02 04:05 p10404530_112030_AIX64-5L_1of7.zip
-rw-r----- 1 root system 1135393912 Mar 02 04:03 p10404530_112030_AIX64-5L_2of7.zip
-rw-r----- 1 root system 2036455635 Mar 02 04:06 p10404530_112030_AIX64-5L_3of7.zip
[ZFFR4CB2101:root]/softtmp]> unzip p10404530_112030_AIX64-5L_1of7.zip && unzip p10404530_112030_AIX64-5L_2of7.zip
Archive: p10404530_112030_AIX64-5L_1of7.zip
creating: database/
creating: database/stage/
inflating: database/stage/shiphomeproperties.xml
creating: database/stage/Components/
《《《《。。。。。。。。篇幅原因,有省略。。。。。。。。》》》》
inflating: database/doc/server.11203/E22487-03.mobi
inflating: database/doc/server.11203/e22487.pdf
inflating: database/welcome.html
creating: database/sshsetup/
inflating: database/sshsetup/sshUserSetup.sh
inflating: database/readme.html
Archive: p10404530_112030_AIX64-5L_2of7.zip
creating: database/stage/Components/oracle.ctx/
creating: database/stage/Components/oracle.ctx/11.2.0.3.0/
creating: database/stage/Components/oracle.ctx/11.2.0.3.0/1/
creating: database/stage/Components/oracle.ctx/11.2.0.3.0/1/DataFiles/
《《《《。。。。。。。。篇幅原因,有省略。。。。。。。。》》》》
creating: database/stage/Components/oracle.javavm.containers/
creating: database/stage/Components/oracle.javavm.containers/11.2.0.3.0/
creating: database/stage/Components/oracle.javavm.containers/11.2.0.3.0/1/
creating: database/stage/Components/oracle.javavm.containers/11.2.0.3.0/1/DataFiles/
inflating: database/stage/Components/oracle.javavm.containers/11.2.0.3.0/1/DataFiles/filegroup4.jar
inflating: database/stage/Components/oracle.javavm.containers/11.2.0.3.0/1/DataFiles/filegroup3.jar
inflating: database/stage/Components/oracle.javavm.containers/11.2.0.3.0/1/DataFiles/filegroup2.jar
inflating: database/stage/Components/oracle.javavm.containers/11.2.0.3.0/1/DataFiles/filegroup1.jar
[ZFFR4CB2101:root]/softtmp]>
[ZFFR4CB2101:root]/softtmp]> l
total 9644888
drwxr-xr-x 9 root system 4096 Oct 28 2011 database
drwxr-xr-x 9 root system 4096 Oct 28 2011 grid
drwxr-xr-x 2 root system 256 Mar 08 16:10 lost+found
-rw-r----- 1 root system 1766307597 Mar 02 04:05 p10404530_112030_AIX64-5L_1of7.zip
-rw-r----- 1 root system 1135393912 Mar 02 04:03 p10404530_112030_AIX64-5L_2of7.zip
-rw-r----- 1 root system 2036455635 Mar 02 04:06 p10404530_112030_AIX64-5L_3of7.zip
[ZFFR4CB2101:root]/softtmp]>
4.2 靜默安裝DB軟體
[ZFFR4CB2101:root]/]> /softtmp/database/rootpre.sh
/softtmp/database/rootpre.sh output will be logged in /tmp/rootpre.out_16-03-09.16:57:12
Checking if group services should be configured....
Nothing to configure.
[ZFFR4CB2101:root]/]>
[ZFFR4CB2101:root]/softtmp/database]>
/softtmp/database/runInstaller -silent -force -noconfig -IgnoreSysPreReqs -ignorePrereq -showProgress \
oracle.install.option=INSTALL_DB_SWONLY \
DECLINE_SECURITY_UPDATES=true \
UNIX_GROUP_NAME=oinstall \
INVENTORY_LOCATION=/u01/app/oraInventory \
SELECTED_LANGUAGES=en \
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 \
ORACLE_BASE=/u01/app/oracle \
oracle.install.db.InstallEdition=EE \
oracle.install.db.isCustomInstall=false \
oracle.install.db.DBA_GROUP=dba \
oracle.install.db.OPER_GROUP=dba \
oracle.install.db.isRACOneInstall=false \
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE \
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false \
oracle.installer.autoupdates.option=SKIP_UPDATES
同樣,複製指令碼的時候注意最後不能加回車符號:
[oracle@ZFFR4CB2101:/home/oracle]$ /softtmp/database/runInstaller -silent -force -noconfig -IgnoreSysPreReqs -ignorePrereq -showProgress \
> oracle.install.option=INSTALL_DB_SWONLY \
> DECLINE_SECURITY_UPDATES=true \
> UNIX_GROUP_NAME=oinstall \
> INVENTORY_LOCATION=/u01/app/oraInventory \
> SELECTED_LANGUAGES=en,zh_CN \
> ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 \
> ORACLE_BASE=/u01/app/oracle \
> oracle.install.db.InstallEdition=EE \
> oracle.install.db.isCustomInstall=false \
> oracle.install.db.DBA_GROUP=dba \
> oracle.install.db.OPER_GROUP=dba \
> oracle.install.db.isRACOneInstall=false \
> oracle.install.db.config.starterdb.type=GENERAL_PURPOSE \
> SECURITY_UPDATES_VIA_MYORACLESUPPORT=false \
> oracle.installer.autoupdates.option=SKIP_UPDATES
********************************************************************************
Your platform requires the root user to perform certain pre-installation
OS preparation. The root user should run the shell script 'rootpre.sh' before
you proceed with Oracle installation. rootpre.sh can be found at the top level
of the CD or the stage area.
Answer 'y' if root has run 'rootpre.sh' so you can proceed with Oracle
installation.
Answer 'n' to abort installation and then ask root to run 'rootpre.sh'.
********************************************************************************
Has 'rootpre.sh' been run by root? [y/n] (n)
y
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 190 MB. Actual 4331 MB Passed
Checking swap space: must be greater than 150 MB. Actual 8192 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2016-03-09_05-16-47PM. Please wait ...[oracle@ZFFR4CB2101:/home/oracle]$ You can find the log of this install session at:
/u01/app/oraInventory/logs/installActions2016-03-09_05-16-47PM.log
Prepare in progress.
.................................................. 9% Done.
Prepare successful.
Copy files in progress.
.................................................. 14% Done.
.................................................. 19% Done.
.................................................. 24% Done.
.................................................. 29% Done.
.................................................. 34% Done.
.................................................. 39% Done.
.................................................. 44% Done.
.................................................. 50% Done.
.................................................. 55% Done.
.................................................. 60% Done.
.................................................. 65% Done.
.................................................. 70% Done.
Copy files successful.
Link binaries in progress.
Link binaries successful.
.................................................. 77% Done.
Setup files in progress.
.................................................. 94% Done.
Setup files successful.
The installation of Oracle Database 11g was successful.
Please check '/u01/app/oraInventory/logs/silentInstall2016-03-09_05-16-47PM.log' for more details.
Execute Root Scripts in progress.
As a root user, execute the following script(s):
1. /u01/app/oracle/product/11.2.0/dbhome_1/root.sh
.................................................. 100% Done.
Execute Root Scripts successful.
Successfully Setup Software.
[oracle@ZFFR4CB2101:/home/oracle]$
[ZFFR4CB2101:root]/]> du -sg /u01/app/oracle
0.00 /u01/app/oracle
[ZFFR4CB2101:root]/]> du -sg /u01/app/oracle
1.49 /u01/app/oracle
[ZFFR4CB2101:root]/]> du -sg /u01/app/oracle
6.65 /u01/app/oracle
[ZFFR4CB2101:root]/]> du -sg /u01/app/oracle
7.10 /u01/app/oracle
[ZFFR4CB2101:root]/]> du -sg /u01/app/oracle
7.10 /u01/app/oracle
[ZFFR4CB2101:root]/]>
執行root.sh指令碼:
[ZFFR4CB2101:root]/u01/app/oracle]> /u01/app/oracle/product/11.2.0/dbhome_1/root.sh
Check /u01/app/oracle/product/11.2.0/dbhome_1/install/root_ZFFR4CB2101_2016-03-09_17-23-12.log for the output of root script
[ZFFR4CB2101:root]/u01/app/oracle]>
[ZFFR4CB2101:root]/u01/app/oracle]> more /u01/app/oracle/product/11.2.0/dbhome_1/install/root_ZFFR4CB2101_2016-03-09_17-23-12.log
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0/dbhome_1
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 script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
[ZFFR4CB2101:root]/u01/app/oracle]>
--------- 若報如下錯誤
SEVERE:OUI-10182:The effective user ID does not match the owner of the file, or the process is not the super-user; the system indicates that super-user privilege is required.
[FATAL] [INS-10008] Session initialization failed
CAUSE: An unexpected error occured while initializing the session.
ACTION: Contact Oracle Support Services or refer logs
SUMMARY:
-
解決辦法:新建 /etc/oraInst.loc ,修改inst_group=oinstall
--在/etc目錄下建立一個名為 oraInst.loc 的檔案,檔案中的內容(兩行程式碼)如下:
inventory_loc=/u01/app/oraInventory
inst_group=oinstall
--輸入下面的命令在oraInst.loc檔案上設定合適的擁有者,組和許可權:
[root@ORCLTEST ~] chown oracle:oinstall /etc/oraInst.loc
[root@ORCLTEST ~] chmod 664 /etc/oraInst.loc
4.3 靜默配置監聽
[grid@ZFFR4CB2101:/home/grid]$ netca -silent -responsefile $ORACLE_HOME/assistants/netca/netca.rsp
Parsing command line arguments:
Parameter "silent" = true
Parameter "responsefile" = /u01/app/11.2.0/grid/assistants/netca/netca.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0
[grid@ZFFR4CB2101:/home/grid]$
[grid@ZFFR4CB2101:/home/grid]$ ./crsstat_lhr.sh
Name Type Target State Host
---------------------------------------- -------------------------- ---------- --------- ----------
ora.LISTENER.lsnr ora.listener.type ONLINE ONLINE zffr4cb2101
ora.OCR.dg ora.diskgroup.type ONLINE ONLINE zffr4cb2101
ora.asm ora.asm.type ONLINE ONLINE zffr4cb2101
ora.cssd ora.cssd.type ONLINE ONLINE zffr4cb2101
ora.diskmon ora.diskmon.type OFFLINE OFFLINE
ora.evmd ora.evm.type ONLINE ONLINE zffr4cb2101
ora.ons ora.ons.type OFFLINE OFFLINE
[grid@ZFFR4CB2101:/home/grid]$
第五章 dbca靜默方式建庫
[grid@ZFFR4CB2101:/home/grid]$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.3.0 Production on Wed Mar 9 17:25:26 2016
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Automatic Storage Management option
SQL> CREATE DISKGROUP DATA external redundancy DISK '/dev/rhdisk21';
Diskgroup created.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Automatic Storage Management option
[grid@ZFFR4CB2101:/home/grid]$ su - oracle
oracle's Password:
[oracle@ZFFR4CB2101:/home/oracle]$ dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbname ora11g -sid ora11g -sysPassword lhr -systemPassword lhr -responseFile NO_VALUE -datafileDestination 'DATA/' -redoLogFileSize 50 -recoveryAreaDestination 'DATA/' -storageType ASM -asmsnmpPassword lhr -diskGroupName 'DATA' -characterSet ZHS16GBK -nationalCharacterSet AL16UTF16 -sampleSchema true -memoryPercentage 30 -totalMemory 200 -databaseType OLTP -emConfiguration NONE -automaticMemoryManagement true
Copying database files
1% complete
3% complete
10% complete
17% complete
24% complete
35% complete
Creating and starting Oracle instance
37% complete
42% complete
47% complete
52% complete
53% complete
56% complete
58% complete
Registering database with Oracle Restart
64% complete
Completing Database Creation
68% complete
71% complete
75% complete
85% complete
96% complete
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/ora11g/ora11g.log" for further details.
[oracle@ZFFR4CB2101:/home/oracle]$
[oracle@ZFFR4CB2101:/home/oracle]$
[oracle@ZFFR4CB2101:/home/oracle]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE zffr4cb2101
ora.LISTENER.lsnr
ONLINE ONLINE zffr4cb2101
ora.OCR.dg
ONLINE ONLINE zffr4cb2101
ora.asm
ONLINE ONLINE zffr4cb2101 Started
ora.ons
OFFLINE OFFLINE zffr4cb2101
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE ONLINE zffr4cb2101
ora.diskmon
1 OFFLINE OFFLINE
ora.evmd
1 ONLINE ONLINE zffr4cb2101
ora.ora11g.db
1 ONLINE ONLINE zffr4cb2101 Open
[oracle@ZFFR4CB2101:/home/oracle]$ ./crsstat_lhr.sh
Name Type Target State Host
---------------------------------------- -------------------------- ---------- --------- ----------
ora.DATA.dg ora.diskgroup.type ONLINE ONLINE zffr4cb2101
ora.LISTENER.lsnr ora.listener.type ONLINE ONLINE zffr4cb2101
ora.OCR.dg ora.diskgroup.type ONLINE ONLINE zffr4cb2101
ora.asm ora.asm.type ONLINE ONLINE zffr4cb2101
ora.cssd ora.cssd.type ONLINE ONLINE zffr4cb2101
ora.diskmon ora.diskmon.type OFFLINE OFFLINE
ora.evmd ora.evm.type ONLINE ONLINE zffr4cb2101
ora.ons ora.ons.type OFFLINE OFFLINE
ora.ora11g.db ora.database.type ONLINE ONLINE zffr4cb2101
[oracle@ZFFR4CB2101:/home/oracle]$ ORACLE_SID=ora11g
[oracle@ZFFR4CB2101:/home/oracle]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Thu Mar 10 10:03:28 2016
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
SQL> select INST_ID,name , open_mode, log_mode,force_logging from gv$database;
INST_ID NAME OPEN_MODE LOG_MODE FOR
---------- --------- -------------------- ------------ ---
1 ORA11G READ WRITE NOARCHIVELOG NO
SQL>
第六章 解除安裝
crsctl stop has -f
解除安裝 GRID軟體,grid使用者執行: $ORACLE_HOME/deinstall/deinstall
解除安裝 ORACLE軟體,oracle使用者執行: $ORACLE_HOME/deinstall/deinstall
--dd if=/dev/zero of=/dev/rhdiskN bs=1024k count=1024
--lquerypv -h /dev/rhdisk5
dbca -silent -deleteDatabase -sourceDB ora11g -sysDBAUserName sys -sysDBAPassword lhr
$ORACLE_HOME/bin/crsctl stop has -f
rmuser -p grid
rmuser -p oracle
rmgroup dba
rmgroup asmadmin
rmgroup asmdba
rmgroup asmoper
rmgroup oinstall
rm -rf /tmp/.oracle
rm -rf /tmp/oraclone_RAC
rm -rf /tmp/oraclone
rm -rf /tmp/oraclone_RAC
rm -rf /var/tmp/.oracle
rm -rf /opt/ORCLfmap
rm -rf /etc/ora*
rm -rf /etc/ohasd
rm -rf /etc/rc.d/rc2.d/K19ohasd
rm -rf /etc/rc.d/rc2.d/S96ohasd
rm -rf /etc/init.ohasd
rm -rf /etc/inittab.crs
fuser -kuxc /u01
umount -f /u01
rmfs -r /u01
dd if=/dev/zero of=/dev/rhdiskN bs=1024k count=1024
lquerypv -h /dev/rhdiskN
About Me
...............................................................................................................................
● 本文作者:小麥苗,只專注於資料庫的技術,更注重技術的運用
● 本文在itpub(http://blog.itpub.net/26736162)、部落格園(http://www.cnblogs.com/lhrbest)和個人微信公眾號(xiaomaimiaolhr)上有同步更新
● 本文itpub地址:http://blog.itpub.net/26736162/viewspace-2057286/
● 本文部落格園地址:http://www.cnblogs.com/lhrbest
● 本文pdf版及小麥苗雲盤地址:http://blog.itpub.net/26736162/viewspace-1624453/
● 資料庫筆試面試題庫及解答:http://blog.itpub.net/26736162/viewspace-2134706/
● QQ群:230161599 微信群:私聊
● 聯絡我請加QQ好友(646634621),註明新增緣由
● 於 2016-03-07 10:00~ 2016-03-11 19:00 在魔都完成
● 文章內容來源於小麥苗的學習筆記,部分整理自網路,若有侵權或不當之處還請諒解
● 版權所有,歡迎分享本文,轉載請保留出處
...............................................................................................................................
拿起手機使用微信客戶端掃描下邊的左邊圖片來關注小麥苗的微信公眾號:xiaomaimiaolhr,掃描右邊的二維碼加入小麥苗的QQ群,學習最實用的資料庫技術。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26736162/viewspace-2057286/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Redis單例項安裝Redis單例
- AIX的yum安裝AI
- 19C 單例項資料庫安裝單例資料庫
- Linux下安裝 Docker例項LinuxDocker
- Memcached安裝與使用例項
- aix安裝oracle客戶端AIOracle客戶端
- RAC安裝【AIX 7 + 11.2.0.4 + ASM】AIASM
- ORACLE-LINUX環境字元介面單例項安裝OracleLinux字元單例
- Oracle 11G資料庫單例項安裝Oracle資料庫單例
- 【PSU】Oracle打PSU及解除安裝PSU(單例項)Oracle單例
- 【Oracle】ASM例項安裝入門OracleASM
- oracle 11g 單例項資料庫的安裝Oracle單例資料庫
- Solaris 10.5 安裝Oracle 11gR2Oracle
- 靜默方式安裝11gR2
- 11.2.0.4單例項ASM安裝報錯ohasd failed to ... line 73.單例ASMAI
- oracle11g安裝 單例項 系統centos7Oracle單例CentOS
- 安裝c, c++編譯器 on AIXC++編譯AI
- AIX6.1下安裝及配置VNCAIVNC
- 【爬蟲】Heritrix 3.2安裝和執行例項爬蟲
- Argo 安裝和 workflow 例項配置檔案解析Go
- oracle19c安裝 單例項 系統centos7 非cdbOracle單例CentOS
- mysql多例項安裝MySql
- 2,ELK安裝--ES安裝(單機版)
- CentOS 8 安裝 Docker 以及常用命令例項CentOSDocker
- linux7 靜默安裝 11GR2 RACLinux
- 記錄一則AIX使用裸裝置安裝OracleRAC的問題AIOracle
- ASM單例項安裝後,需要手動設定ASM的引數檔案ASM單例
- 操作規範(四)——Linux 5.4安裝Oracle 11gR2LinuxOracle
- 麒麟 V10 一鍵安裝 Oracle 11GR2(231017)單機版 2Oracle
- kubernetes單機安裝
- mysql 簡單安裝MySql
- Zookeeper單機安裝
- Linux(以CentOS 7為例)下安裝、解除安裝、啟動OpenOfficeLinuxCentOS
- 滴滴雲伺服器上安裝Oracle12cR2單例項資料庫伺服器Oracle單例資料庫
- 安裝npm 解除安裝npm 安裝apidocNPMAPI
- 使用NIM Server網路半自動安裝AIX系統ServerAI
- ORACLE11GR2 RAC解除安裝ASM例項步驟OracleASM
- mysql多版本例項安裝MySql
- Oracle 11gR2(11.2.0.4)安裝包(7個)作用說明Oracle