(非原创,出自哪里我也不太记得了,共享给大家吧!单纯的安装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的文件)
本文地址:http://com.8s8s.com/it/it20398.htm