基于 AIX 6 操作系统,安装 ORACLE 10G R2 (10.2.0.4)的过程,重点描述安装前操作系统相关准备工作及注意事项
等过一段时间,再测试安装 ORACLE 10G R2 RAC 的情况
我是先在 ULTRAEDIT 中编辑后,粘贴过来的,格式有点乱
[@more@]AIX6 ORACLE 10G R2 安装简要过程
----------------------------
0 环境介绍
----------------------------
* IBM P630,7028-6C4 (2 核 POWER4 1.45,2GB 物理内存,2 块 36 GB 硬盘
* AIX6 VERSION 6.1,TL 01,SP 01
[root@sddstech3 /root]# oslevel -qr
Known Recommended Maintenance Levels
------------------------------------
6100-01
6100-00
6110-00
[root@sddstech3 /root]# oslevel -qs
Known Service Packs
-------------------
6100-01-01-0823
6100-01-00-0000
6100-00-04-0815
6100-00-03-0808
6100-00-02-0750
6100-00-01-0748
* ORACLE 10G,RELEASE 2
ORACLE 10G R2 (10.2.0.1)
PATCH p6810189 (10.2.0.4)
PATCH p6613550 (rootpre 补丁)
----------------------------
1 参考文档
----------------------------
* b19074(12) - Oracle Database Release Notes 10g Release 2 (10.2) for AIX
* b19075(02) - Oracle Database Installation Guide 10g Release 2 (10.2) for AIX 5L Based Systems (64-Bit)
* metalink 169706.1 - Oracle Database on Unix AIX,HP-UX,Linux,Mac OS X,Solaris,Tru64 Unix Operating Systems Installation and Configuration Requirements Quick Reference (8.0.5 to 11.2) [ID 169706.1]
----------------------------
2 安装前准备
----------------------------
2.1 检查硬件要求
2.1.1 物理内存,要求 >= 1GB
[root@sddstech3 /root]# /usr/sbin/lsattr -E -l sys0 -a realmem
realmem 2097152 Amount of usable physical memory in Kbytes False
2.1.2 交换分区(SWAP SPACE),要求 1GB-2GB RAM:1.5*RAM,2GB-8GB:1*RAM,>=8GB:0.75*RAM
[root@sddstech3 /root]# /usr/sbin/lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type Chksum
hd6 hdisk0 rootvg 2048MB 1 yes yes lv 0
如果不满足需要,可以使用下面的命令扩展原有交换分区
[root@sddstech3 /root]# /usr/bin/smitty chps
+--------------------------------------------------------------------------+
| PAGING SPACE name |
| |
| Move cursor to desired item and press Enter. |
| |
| hd6 |
| |
| F1=Help F2=Refresh F3=Cancel |
| F8=Image F10=Exit Enter=Do |
| /=Find n=Find Next |
+--------------------------------------------------------------------------+
Change / Show Characteristics of a Paging Space
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
Paging space name hd6
Volume group name rootvg
Physical volume name hdisk0
NUMBER of additional logical partitions [] #
Or NUMBER of logical partitions to remove [] #
Use this paging space each time the system is yes +
RESTARTED?
F1=Help F2=Refresh F3=Cancel F4=List
F5=Reset F6=Command F7=Edit F8=Image
F9=Shell F10=Exit Enter=Do
也可以使用下面的命令新增加交换分区
[root@sddstech3 /root]# /usr/bin/smitty mkps
+--------------------------------------------------------------------------+
| VOLUME GROUP name |
| |
| Move cursor to desired item and press Enter. |
| |
| rootvg |
| datavg |
| |
| F1=Help F2=Refresh F3=Cancel |
| F8=Image F10=Exit Enter=Do |
| /=Find n=Find Next |
+--------------------------------------------------------------------------+
Add Another Paging Space
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
Volume group name rootvg
SIZE of paging space (in logical partitions) [] #
PHYSICAL VOLUME name +
Start using this paging space NOW? no +
Use this paging space each time the system is no +
RESTARTED?
F1=Help F2=Refresh F3=Cancel F4=List
F5=Reset F6=Command F7=Edit F8=Image
F9=Shell F10=Exit Enter=Do
2.1.3 /tmp 空间,要求 >= 400MB
[root@sddstech3 /root]# /usr/bin/df -m /tmp
Filesystem MB blocks Free %Used Iused %Iused Mounted on
/dev/hd3 1024.00 1012.04 2% 78 1% /tmp
如果不满足要求,可以通过下面的命令扩展原有 /tmp 文件系统
[root@sddstech3 /root]# /usr/bin/smitty chjfs2
+--------------------------------------------------------------------------+
| File System Name |
| |
| Move cursor to desired item and press Enter. |
| |
| / |
| /home |
| /usr |
| /var |
| /tmp |
| /admin |
| /opt |
| /wangxh |
| /oracle |
| |
| F1=Help F2=Refresh F3=Cancel |
| F8=Image F10=Exit Enter=Do |
| /=Find n=Find Next |
+--------------------------------------------------------------------------+
Change / Show Characteristics of an Enhanced Journaled File System
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
File system name /tmp
NEW mount point [/tmp]
SIZE of file system
Unit Size 512bytes +
Number of units [2097152] #
Mount GROUP []
Mount AUTOMATICALLY at system restart? yes +
PERMISSIONS read/write +
Mount OPTIONS [] +
Start Disk Accounting? no +
Block Size (bytes) 4096
Inline Log? no
Inline Log size (MBytes) [0] #
Extended Attribute Format [v1]
ENABLE Quota Management? no +
Allow Small Inode Extents? yes +
Enable EFS? no +
F1=Help F2=Refresh F3=Cancel F4=List
F5=Reset F6=Command F7=Edit F8=Image
F9=Shell F10=Exit Enter=Do
也可以通过环境变量临时扩展 ORACLE 用户所使用的 /tmp 空间
[oracle@sddstech3 /home/oracle]$ export /tmp=
[oracle@sddstech3 /home/oracle]$ export /temp=
2.1.4 磁盘空间,要求 >= 4GB(这是仅装企业版10.2.0.1软件,不包含10.2.0.4补丁和数据库所需要的空间)
所使用的命令基本类似与 2.1.3 节。
2.2 检查软件要求
[root@sddstech3 /root]# /usr/bin/lslpp -l bos.adt.base bos.adt.lib bos.adt.libm bos.perf.libperfstat bos.perf.perfstat bos.perf.proctools xlC.aix61.rte xlC.rte
Fileset Level State Description
----------------------------------------------------------------------------
Path: /usr/lib/objrepos
bos.adt.base 6.1.1.0 COMMITTED Base Application Development
Toolkit
bos.adt.lib 6.1.0.0 COMMITTED Base Application Development
Libraries
bos.adt.libm 6.1.1.0 COMMITTED Base Application Development
Math Library
bos.perf.libperfstat 6.1.1.0 COMMITTED Performance Statistics Library
Interface
bos.perf.perfstat 6.1.1.0 COMMITTED Performance Statistics
Interface
bos.perf.proctools 6.1.1.0 COMMITTED Proc Filesystem Tools
xlC.aix61.rte 9.0.0.5 COMMITTED XL C/C++ Runtime for AIX 6.1
xlC.rte 9.0.0.5 COMMITTED XL C/C++ Runtime
Path: /etc/objrepos
bos.adt.base 6.1.1.0 COMMITTED Base Application Development
Toolkit
bos.perf.libperfstat 6.1.1.0 COMMITTED Performance Statistics Library
Interface
bos.perf.perfstat 6.1.1.0 COMMITTED Performance Statistics
Interface
如果发现有未安装的软件包,可以通过下面的命令来从安装光盘上安装相应的软件包,默认安装情况下,bos.adt.libm 需要手工安装
[root@sddstech3 /root]# /usr/bin/smitty install_latest
Install Software
Type or select a value for the entry field.
Press Enter AFTER making all desired changes.
[Entry Fields]
* INPUT device / directory for software [] +
F1=Help F2=Refresh F3=Cancel F4=List
F5=Reset F6=Command F7=Edit F8=Image
F9=Shell F10=Exit Enter=Do
Install Software
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
* INPUT device / directory for software .
* SOFTWARE to install < @@I:bos.adt.libm 6.1.1.0] +
PREVIEW only? (install operation will NOT occur) no +
COMMIT software updates? yes +
SAVE replaced files? no +
AUTOMATICALLY install requisite software? yes +
EXTEND file systems if space needed? yes +
OVERWRITE same or newer versions? no +
VERIFY install and check file sizes? no +
Include corresponding LANGUAGE filesets? yes +
DETAILED output? no +
Process multiple volumes? yes +
ACCEPT new license agreements? yes +
Preview new LICENSE agreements? no +
F1=Help F2=Refresh F3=Cancel F4=List
F5=Reset F6=Command F7=Edit F8=Image
F9=Shell F10=Exit Enter=Do
2.3 创建用户及目录
2.3.1 创建 dba 组
[root@sddstech3 /root]# /usr/bin/smitty mkgroup
Add a Group
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
* Group NAME [dba]
ADMINISTRATIVE group? false +
Group ID [500] #
USER list [] +
ADMINISTRATOR list [] +
Projects [] +
Initial Keystore Mode [] +
Keystore Encryption Algorithm [] +
Keystore Access [] +
F1=Help F2=Refresh F3=Cancel F4=List
F5=Reset F6=Command F7=Edit F8=Image
F9=Shell F10=Exit Enter=Do
2.3.2 创建 oinstall 组
[root@sddstech3 /root]# /usr/bin/smitty mkgroup
Add a Group
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
* Group NAME [oinstall]
ADMINISTRATIVE group? false +
Group ID [501] #
USER list [] +
ADMINISTRATOR list [] +
Projects [] +
Initial Keystore Mode [] +
Keystore Encryption Algorithm [] +
Keystore Access [] +
F1=Help F2=Refresh F3=Cancel F4=List
F5=Reset F6=Command F7=Edit F8=Image
F9=Shell F10=Exit Enter=Do
2.3.3 创建 oracle 用户
[root@sddstech3 /root]# /usr/bin/smitty mkuser
Add a User
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[TOP] [Entry Fields]
* User NAME [oracle]
User ID [500] #
ADMINISTRATIVE USER? false +
Primary GROUP [dba] +
Group SET [dba,oinstall] +
ADMINISTRATIVE GROUPS [] +
ROLES [] +
Another user can SU TO USER? true +
SU GROUPS [ALL] +
HOME directory [/home/oracle]
Initial PROGRAM []
User INFORMATION []
EXPIRATION date (MMDDhhmmyy) [0]
Is this user ACCOUNT LOCKED? false +
User can LOGIN? true +
User can LOGIN REMOTELY(rsh,tn,rlogin)? true +
Allowed LOGIN TIMES []
Number of FAILED LOGINS before [0] #
[MORE...47]
F1=Help F2=Refresh F3=Cancel F4=List
F5=Reset F6=Command F7=Edit F8=Image
F9=Shell F10=Exit Enter=Do
2.3.4 创建 oracle 目录
[root@sddstech3 /root]# /usr/bin/chown oracle.dba /oracle
[root@sddstech3 /root]# /usr/bin/su - oracle
[oracle@sddstech3 /home/oracle]$ mkdir -p /oracle/product/10.2.0
[oracle@sddstech3 /home/oracle]$ passwd # 修改 oracle 用户口令
2.4 调整用户 SHELL 限制参数
Shell Limit Default Value Recommended Value
---------------- ----------------- -------------------
Soft FILE size 2097151 -1
Soft CPU time -1 -1
Soft DATA segment 262144 -1
Soft STACK size 65536 -1
Soft NOFILE descriptors 2000 -1 # 安装文档中没有要求,但一般情况下,2000 值有点小
root 和 oracle 用户均需要调整,可以使用以下的命令查看当前用户的情况
[root@sddstech3 /root]# ulimit -a
time(seconds) unlimited # Soft CPU time
file(blocks) unlimited # Soft FILE size
data(kbytes) unlimited # Soft DATA segment
stack(kbytes) 4194304 # Soft STACK size
memory(kbytes) 32768
coredump(blocks) 2097151
nofiles(descriptors) unlimited # Soft NOFILE descriptors
threads(per process) unlimited
processes(per user) unlimited
可以使用 smitty chuser 选择用户调整 SHELL 限制参数
Change / Show Characteristics of a User
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[MORE...30] [Entry Fields]
Password MIN. ALPHA characters [0] #
Password MIN. OTHER characters [0] #
Password MAX. REPEATED characters [8] #
Password MIN. DIFFERENT characters [0] #
Password REGISTRY [files]
Soft CPU time [-1]
Soft FILE size [-1] #
Soft DATA segment [-1] #
Soft STACK size [-1] #
Soft CORE file size [2097151] #
Soft RSS size [65536] #
Soft NOFILE descriptors [-1] #
Soft THREADS per process [] #
Soft NPROC per user [] #
Hard CPU time []
Hard FILE size [] #
Hard DATA segment [] #
Hard STACK size [] #
[MORE...17]
F1=Help F2=Refresh F3=Cancel F4=List
F5=Reset F6=Command F7=Edit F8=Image
F9=Shell F10=Exit Enter=Do
2.5 设置 ORACLE 用户环境变量
在 oracle 用户 .profile 中增加以下内容
# oracle environment
export ORACLE_BASE=/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0
export LANG=C
export PATH=$PATH:$ORACLE_HOME/bin
测试中 .profile 完整内容如下:
[oracle@sddstech3 /home/oracle]$ cat .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.
export PS1=[$USER@`hostname`' $PWD]$ '
# oracle environment
export ORACLE_BASE=/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0
export ORACLE_SID=aix6test
export LANG=C
export PATH=$PATH:$ORACLE_HOME/bin
2.6 注意事项
2.6.1 AIX 6.1 补丁问题
当前可以从 IBM 网站下载到的最新补丁是 6100-04-01-0944,经过多次测试,如果先安装该补丁,则安装 ORACLE 10.2.0.1 过程中不会报错,但是打 10.2.0.4 补丁及创建数据库过程中,会提示几个错误(没能保存,SORRY),如果使用 6100-01-01-0823 默认版本,则非常顺利。
因此,本次测试,采用的过程是先使用默认版本,进行安装,创建数据库,最后,再升级操作系统补丁。
[root@sddstech3 /root]# oslevel -qr
Known Recommended Maintenance Levels
------------------------------------
6100-04
6100-03
6100-02
6100-01
6100-00
[root@sddstech3 /root]# oslevel -qs
Known Service Packs
-------------------
6100-04-01-0944
6100-04-00-0000
6100-03-02-0939
6100-03-01-0921
6100-02-05-0939
6100-02-04-0920
6100-02-03-0909
6100-02-02-0849
6100-02-01-0847
6100-01-06-0939
6100-01-05-0920
6100-01-04-0909
6100-01-03-0846
6100-01-02-0834
6100-01-01-0823
6100-00-10-0939
6100-00-09-0920
6100-00-08-0909
6100-00-07-0846
6100-00-06-0834
6100-00-05-0822
6100-00-04-0815
6100-00-03-0808
6100-00-02-0750
6100-00-01-0748
2.6.2 AIX_THREADS
在 AIX 5L 上安装 ORACLE,需要在 oracle 用户环境变量中设置,AIXTHREAD_SCOPE=S,在 AIX 6 新特性中,默认将 AIXTHREAD_SCOPE 由 P 改为 S,因此,不需要额外设置。
----------------------------
3 安装过程
----------------------------
3.1 安装 ORACLE 软件
3.1.1 解包 p6613550,以 root 用户执行 ./rootpre.sh
3.1.2 以 oracle 用户执行 ./runInstaller -ignoreSysPrereqs
3.1.3 其余常规安装,没有什么特别的地方
3.2 安装 10.2.0.4 补丁
3.2.1 以 root 用户执行 /usr/sbin/slibc
3.2.2 以 oracle 用户执行 ./runInstaller -ignoreSysPrereqs
3.2.3 其余常规安装,没有什么特别的地方
3.3 创建数据库
3.3.1 以 oracle 用户执行 netca,创建 Lisenter
3.3.2 以 oracle 用户执行 dbca,创建数据库,常规过程,没有特别的地方
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/72654/viewspace-1029517/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/72654/viewspace-1029517/