首页 > 数据库 > Oracle > 正文

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的文件)
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表