AIX4.3.3上安裝ORACLE9.2過程詳解
2024-08-29 13:31:23
供稿:網友
(非原創,出自哪里我也不太記得了,共享給大家吧!單純的安裝oracle其實非常簡單,只要按照下面的步驟,一般都不會有什么問題)
aix 4.3.3 上面安裝 oracle 9.2
1. 檢查物理內存:(ram >= 512 mb)
# lsattr -el sys0 -a realmem
realmem 1048576 amount of usable physical memory in kbytes false
#
我們的是1g,呵呵,夠了
2. 檢查swap空間:(等于物理內存或者1g,最好大一些)
# lsps -a
page space physical volume volume group size %used active auto type
hd6 hdisk0 rootvg 2048mb 1 yes yes lv
#
我們的是2g,呵呵
3. 檢查磁盤空間,主要注意兩點:
a) 安裝9.2 , 主要是存放 oracle code,這個空間建議在4g左右,或者更大一點。
b) 另外,安裝oracle的過程中,oracle universal installer 需要大約400m左右的臨時空間,可以使用系統默認的/tmp目錄,
也可以自己設置環境變量tmpdir來指定一個具有足夠空間的目錄,或者在安裝過程中指定一個有足夠空間的臨時目錄
如:
tmpdir=/oratools
export tmpdir
一般來說,oracle的安裝文件都放在內置盤上,所以,我們需要看看內置盤的空間:
# lsdev -cc disk
hdisk0 available 40-60-00-4,0 16 bit lvd scsi disk drive
hdisk1 available 14-08-l ssa logical disk drive
#
我們看到hdisk0是內置盤,現在確定其大小:
# lspv hdisk0
physical volume: hdisk0 volume group: rootvg
pv identifier: 000ca13f7ebe3b7e vg identifier 000ca13f7ebe3e67
pv state: active
stale partitions: 0 allocatable: yes
pp size: 32 megabyte(s) logical volumes: 11
total pps: 542 (17344 megabytes) vg descriptors: 2
free pps: 217 (6944 megabytes) hot spare: no
used pps: 325 (10400 megabytes)
free distribution: 108..20..00..00..89
used distribution: 01..88..108..108..20
#
我們看到,total 為18g,free 為7g,夠了,呵呵
4. 檢查 os 的版本,兩種方法:
你可以用oslevel 命令確定當前的aix 版本,
# oslevel
4.3.3.0
#
或者你也可以用oslevel -r,確定當前的aix 版本和ml(the maintenance level of the system):
# oslevel -r
4330-09
#
這樣的結果,類似于用instfix 命令查看當前的ml:
$ instfix -i | grep ml
all filesets for 4.3.0.0_aix_ml were found.
all filesets for 4.3.1.0_aix_ml were found.
all filesets for 4.3.2.0_aix_ml were found.
all filesets for 4320-02_aix_ml were found.
all filesets for 4.3.3.0_aix_ml were found.
all filesets for 4330-01_aix_ml were found.
all filesets for 4330-02_aix_ml were found.
all filesets for 4330-03_aix_ml were found.
all filesets for 4330-04_aix_ml were found.
all filesets for 4330-05_aix_ml were found.
all filesets for 4330-06_aix_ml were found.
not all filesets for 4330-07_aix_ml were found.
all filesets for 4330-08_aix_ml were found.
all filesets for 4330-09_aix_ml were found.
all filesets for aix43ml were found.
$
可見,我們的是aix 4.3.3 ,ml是09的
5. 查看os 是否為64 bit:
如果是64 bit位的os,可以裝32 bit 或者64 bit 的oracle 8i ,但是 32 bit的os 只能裝32 bit 的oracle;
因為oracle 9.2 沒有32 bit的,所以,我們必須驗證我們的os 是64位的os:
也是有兩種方法:
# locale64
lang=c
lc_collate="c"
lc_ctype="c"
lc_monetary="c"
lc_numeric="c"
lc_time="c"
lc_messages="c"
lc_all=
#
或者
# bootinfo -y
64
#
6.看看os的patch夠不夠
oracle的文檔上,對于aix 4.3.3 要求至少在ml 09 ,并且iy24568, iy25282, iy27614,iy30151這四個patch,實際上
但是實際上,我們還需要一個iy30927,文檔上說這個包僅僅是和cpu的使用效率有關的包,可以不要,但是我安裝的經驗
是,一定要,否則會出問題。上述包如果不存在,那么需要到下面的站點download:
http://techsupport.services.ibm.com/server/fixes
$ instfix -i | grep ml
all filesets for 4.3.0.0_aix_ml were found.
all filesets for 4.3.1.0_aix_ml were found.
all filesets for 4.3.2.0_aix_ml were found.
all filesets for 4320-02_aix_ml were found.
all filesets for 4.3.3.0_aix_ml were found.
all filesets for 4330-01_aix_ml were found.
all filesets for 4330-02_aix_ml were found.
all filesets for 4330-03_aix_ml were found.
all filesets for 4330-04_aix_ml were found.
all filesets for 4330-05_aix_ml were found.
all filesets for 4330-06_aix_ml were found.
not all filesets for 4330-07_aix_ml were found.
all filesets for 4330-08_aix_ml were found.
all filesets for 4330-09_aix_ml were found.
all filesets for aix43ml were found.
$
顯然,我們的aix 是4.3.3 ml09
查看某個patch是否安裝了:
# instfix -i | grep iy24568
all filesets for iy25282 were found
表示已經有這個patch了
# instfix -i | grep iy30927
not all filesets for iy30927 were found.
表示沒有安裝iy30927這個patch
7. 特別要說明的是,java是在aix 4.3.3 的默認安裝中是不安裝的,需要手工安裝
(在aix 5.1 就不要手工裝了,系統的默認安裝就會安裝java)
至少需要jdk1.1.8 ,對應的patch是 iy30886
如果使用http server,那么就需要jdk1.3.1 ,對應的patch是: iy31033
下載地址:
ftp://service.software.ibm.com/aix/efixes/
(如果已經裝了這個補丁,會有一個/usr/jdk_base目錄,它就是你的java_home)
8. 檢查是否具備所需的os package
aix 4.3.3 需要下列package:
bos.adt.base, bos.adt.lib, bos.adt.libm, bos.perf.perfstat
我們可以使用lslpp pl os_package 命令來查看:
# lslpp -l bos.adt.base
fileset level state description
----------------------------------------------------------------------------
path: /usr/lib/objrepos
bos.adt.base 4.3.3.77 committed base application development
toolkit
# lslpp -l bos.adt.lib
fileset level state description
----------------------------------------------------------------------------
path: /usr/lib/objrepos
bos.adt.lib 4.3.3.10 committed base application development
libraries
# lslpp -l bos.adt.libm
fileset level state description
----------------------------------------------------------------------------
path: /usr/lib/objrepos
bos.adt.libm 4.3.3.50 committed base application development
math library
#
如果上面需要的patch和packgae沒有安裝,那么去相應的站點download他們,并使用smit的update all來安裝他們。
安裝過程中有時候會出現類似 "這個包已經被安裝了或者指定的目錄不對" 等錯誤,這時候,去你指定的目錄下面看看,
如果有.toc文件,我們需要刪除它(它是個隱含文件,需要用ls -a 查看),然后重新update all
9. 上面的都做完了以后,reboot機器:
shutdown -fr
10. 檢查一下剛才的patch和package都有了,現在給oracle劃分存儲空間
首先,需要一個地方存放安裝文件,假設為/oratools,我們需要進入
smit- system storage management (physical & logical storage)
-file systems 或者 -logical volume manager,
(如果你是個aix新手,那么你最好就選擇fs,讓系統為你建立邏輯卷就好了,呵呵;
如果想裝ops或者rac那么你就要用先建邏輯卷,再建文件系統的方法了,因為系統建立的邏輯卷也許會重名,呵呵)
-add / change / show / delete file systems
-journaled file systems
-add a journaled file system
- add a large file enabled journaled file system(選擇這個,可以支持大于2g的文件系統)
這是系統會出現讓你選擇一個vg的窗口,最好不要選擇rootvg,因為我們通常把和os相關的東西放在那里。
然后出現:類似下面的窗口:
size of file system (in 512-byte blocks) [] #
* mount point []
mount automatically at system restart? no
(注意將mount automatically at system restart設置為自動mount)
11. 在建立一個oracle_home主目錄(方法同上)
12. 建立dba 組
smit group - add a group
13. 建立oracle 用戶
smit user - add a user
14. 以oracle登陸,修改profile,如:
path=/usr/bin:/etc:/usr/sbin:/usr/ucb:$home/bin:/usr/bin/x11:/sbin:.
export path
if [ -s "$mail" ] # this is at shell startup. in normal
then echo "$mailmsg" # operation, the shell checks
fi # periodically.
path=$path:/oratools/gzip-1.2.4a
export path
display = 192.168.2.216:0.0
export display
oracle_base=/oracle92
export oracle_base
oracle_home=$oracle_base/product/9.2
export oracle_home
oracle_sid=ora92
export oracle_sid
oracle_term=vt100
export oracle_term
ora_nls33=$oracle_home/ocommon/nls/admin/data
export ora_nls33
java_home=/usr/jdk_base
export java_home
libpath=$oracle_home/lib
export libpath
classpath=$oracle_home/product/jlib:$oracle_home/jlib
export classpath
path=$oracle_home/bin:$path
export path
nls_lang=american_america.zhs16gbk
export nls_lang
tmpdir=/oratools
export tmpdir
set -o vi
umask 022
set -o vi不是必須的,呵呵,它讓你可以在輸入os的時候使用vi的命令(類似vi的命令模式),
例如:
h : 左移一個字符
j : 剛才執行過的后一個命令
k : 剛才執行過的前一個命令
l : 右移一個字符
等等
15. 安裝oracle,需要xwindow的支持
以oracle登陸,輸入:xclock,看看是否可以出現一個小時鐘,如果可以就ok了
否則,su 到root,然后xhost +192.168.2.216
16. 剩下的就沒什么好說的了吧,照著提示,中間有幾次需要root權限執行幾個sh,然后ok
注意,我安裝的時候因為忽略了iy30927 所以link的時候報錯,然后查看make文件發現問題多多,呵呵,
我的解決辦法:
首先,安裝 iy30927,然后reboot;
然后,relink
如果還有類似下面的問題:
ld: 0711-317 error: undefined symbol: ksusga_
ld: 0711-317 error: undefined symbol: kwqpls_
ld: 0711-317 error: undefined symbol: kclnlt_
ld: 0711-317 error: undefined symbol: ksulsg_
ld: 0711-317 error: undefined symbol: kcbstdbz_
ld: 0711-345 use the -bloadmap or -bnoquiet option to obtain more information.
make: the error code from the last command is 8.
那么到$oracle_home/lib,看看ksms.imp是否為0 bytes,如果是,那么刪除這個文件,并且執行relink,因該就沒有問題了。
(這個錯誤是由于剛剛在沒有裝那個iy30927 的時候,安裝過程中提示某個.so出錯,我們選擇了忽略,那么,
$oracle_home/bin/genksms執行就會失敗,并且在$oracle_home/lib/ksms.imp 生成了那個0 bytes的文件)