目录
1, AIX系统硬件环境检查 2
a) 内存检查 2
b) 交换空间检查 2
c) 检查/tmp目录的空闲空间 2
d) 检查磁盘空间 3
e) 检查硬件架构 3
2, AIX软件环境检查 4
a) AIX系统版本号检查 4
b) 软件包安装情况检查 4
c) 系统相关fix检查 4
3, 创建系统需求的用户和组 6
a) 创建Oracle oinstall组 6
b) 创建Oracle 用户 7
c) 检查用户情况 7
4, 创建oracle文件系统 8
5, 改变oracle用户的环境变量 9
6, 上传安装介质 10
7, 安装oracle软件 11
本文经孤独红尘收集整理,转载请注明出处:http://huxuan713.blog.163.com/
本文根据Oracle? Database Quick Installation Guide实施操作。具体详细步骤如下:
1, AIX系统硬件环境检查
a) 内存检查
Oracle10g文档中说明 Physical RAM>=1GB。这里请注意Oracle11G需要4GB物理内存,因为机器限制所以本人只有安装Oracle10g。运行如下命令查看系统内存
# lsattr -E -l sys0 -a realmem
realmem 1048576 Amount of usable physical memory in Kbytes False
如上所示realmem 1048576K =1GB。符合oracle安装需求,继续安装步骤。
b) 交换空间检查
按照Oracle文档中的要求,我们对照可以计算出我们需要设置1.5GB交换空间。
RAM Swap Space
Between 1024 MB and 2048 MB 1.5 times the size of RAM
Between 2049 MB and 8192 MB Equal to the size of RAM
More than 8192 MB 0.75 times the size of RAM
通过以下命令查看和修改交换空间:
# lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type
hd6 hdisk0 rootvg 1280MB 1 yes yes lv
#smitty chps -> hd6
将NUMBER of additional logical partitions []该选项设置为4回车执行(因为我rootvg的PPsize为64MB),再次执行lsps命令查看交换空间的大小:
# lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type
hd6 hdisk0 rootvg 1536MB 1 yes yes lv
继续执行下一步操作。
c) 检查/tmp目录的空闲空间
# df -m /tmp
Filesystem MB blocks Free %Used Iused %Iused Mounted on
/dev/hd3 2048.00 709.50 66% 46 1% /tmp
满足oracle10g的需求,安装继续
d) 检查磁盘空间
Installation Type Requirement for Software Files (GB)
Enterprise Edition 2.0
Standard Edition 3.0
Custom (maximum) 2.5
Oracle的安装对系统磁盘的需求如上表所述。
e) 检查硬件架构
# getconf HARDWARE_BITMODE
64
现在针对aix发布的Oracle都是64位的。所以必须安装在64位的操作系统。
本文经孤独红尘收集整理,转载请注明出处:http://huxuan713.blog.163.com/
?
2, AIX软件环境检查
a) AIX系统版本号检查
# oslevel -s
5300-06-12-0920
Oracle需要安装在5204或者是5302以上版本的操作系统中,如上所示我系统已经满足Oracle需求。
b) 软件包安装情况检查
# 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 5.3.0.64 COMMITTED Base Application Development
Toolkit
bos.adt.lib 5.3.0.61 COMMITTED Base Application Development
Libraries
bos.adt.libm 5.3.0.62 COMMITTED Base Application Development
Math Library
bos.perf.libperfstat 5.3.0.61 COMMITTED Performance Statistics Library
Interface
bos.perf.perfstat 5.3.0.63 COMMITTED Performance Statistics
Interface
bos.perf.proctools 5.3.0.63 COMMITTED Proc Filesystem Tools
Path: /etc/objrepos
bos.perf.libperfstat 5.3.0.60 COMMITTED Performance Statistics Library
Interface
bos.perf.perfstat 5.3.0.63 COMMITTED Performance Statistics
Interface
如上所示,该系统已经满足Oracle的软件包需求。
本文经孤独红尘收集整理,转载请注明出处:http://huxuan713.blog.163.com/
c) 系统相关fix检查
# instfix -i -k "IY63133 IY64978 IY63366 \ IY64691 IY65001 IY64737 IY64361 IY65305 IY58350 \ IY63533"
There was no data for IY63133 in the fix database.
There was no data for IY64978 in the fix database.
There was no data for IY63366 in the fix database.
There was no data for \ in the fix database.
There was no data for IY64691 in the fix database.
There was no data for IY65001 in the fix database.
There was no data for IY64737 in the fix database.
There was no data for IY64361 in the fix database.
There was no data for IY65305 in the fix database.
There was no data for IY58350 in the fix database.
There was no data for \ in the fix database.
There was no data for IY63533 in the fix database.
# java -version
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2)
Classic VM (build 1.4.2, J2RE 1.4.2 IBM AIX build ca142-20070317 (SR8) (JIT enabled: jitc))
因为我的系统版本比安装文档中的操作系统版本要高。并且java版本也高于系统所需要的版本号,所以不需要打上文档中需要的FIX补丁。当然如果是生产系统的话最好是到metalink.oracle.com上面去找一下最新的fix需求信息。
?
3, 创建系统需求的用户和组
a) 创建Oracle oinstall组
#smitty mkgroup
Item Value
Group NAME Oinstall
GroupID(Num) 201
ADMINISTRATIVE group? False
ADMINISTRATOR list root
同样创建名叫dba和oper的用户组
#smitty mkgroup
Item Value
Group NAME dba
GroupID(Num) 202
ADMINISTRATIVE group? False
ADMINISTRATOR list root
Item Value
Group NAME oper
GroupID(Num) 203
ADMINISTRATIVE group? False
ADMINISTRATOR list root
本文经孤独红尘收集整理,转载请注明出处:http://huxuan713.blog.163.com/
b) 创建Oracle 用户
Item Value
User NAME oracle
UserID(Num) 202
ADMINISTRATIVE USER? False
Primary GROUP oinstall
Group SET dba,oper
User INFORMATION
EXPIRATION date(MMDDHHmmyy) 0
Is this user ACCOUNT LOCKED? false
User can LOGIN true
Soft FILE size(Num) -1
Soft CPU time -1
Soft DATA segment(Num) -1
Soft STACK size(Num) -1
Soft CORE file size(Num) -1
File createion UMASK 22
TRUSTED PATH nosak
PRIMARY authentication method SYSTEM
SECONDARY authentication method NONE
# smitty mkuser
c) 检查用户情况
# id oracle
uid=202(oracle) gid=201(oinstall) groups=202(dba),203(oper)
# id nobody
uid=4294967294(nobody) gid=4294967294(nobody)
# passwd oracle
Changing password for "oracle"
oracle's New password: //输入oracle用户的密码
Enter the new password again: //再次输入oracle用户密码
4, 创建oracle文件系统
在创建文件系统的时候我没有按照oracle安装文档上面写的名称创建。但是其原理都是一样的。相应的安装目录名称和具体创建步骤如下:
ORACLE_BASE=/db/oracle
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
创建挂载点:
# mkdir -p /db/oracle
改变挂载点的所有者:
# crfs -v jfs2 -g rootvg -a size=10G -A yes -m /db/oracle
# mount /db/oracle]
# mkdir -p /db/oracle/product/10.2.0/db_1
# chown -R oracle:oinstall /db/oracle
# chmod -R 775 /db/oracle
检查挂载点的权限和所有者
# ls -al /db/oracle
total 0
drwxrwxr-x 2 oracle oinstall 256 Dec 14 14:52 .
drwxr-xr-x 3 root system 256 Dec 14 14:52 .
drwxrwxr-x 2 oracle oinstall 256 Dec 14 15:06 lost+found
drwxrwxr-x 3 oracle oinstall 256 Dec 14 15:19 product
本文经孤独红尘收集整理,转载请注明出处:http://huxuan713.blog.163.com/
5, 改变oracle用户的环境变量
用图形终端登录aix小型机,输入(此例中192.168.1.71为我本地登录用的终端)
# xhost 192.168.1.71
192.168.1.71 being added to access control list
切换到oracle用户更改环境变量
# su - oracle
$ echo $SHELL
/usr/bin/ksh
$ vi .profile
在文件末尾加上一段话
ORACLE_SID=orcl
ORACLE_BASE=/db/oracle
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID ORACLE_BASE ORACLE_HOME PATH
执行该配置文件。使以上变量声明生效:
$ ./.profile
检查以上变量是否生效:
$ env |grep ORA
ORACLE_BASE=/db/oracle
ORACLE_SID=orcl
ORACLE_HOME=/db/oracle/product/10.2.0/db_1
编辑图形配置文件,使以上配置在图形界面中生效
$ vi .dtprofile(如果该文件不存在将自动创建一个同名的新文件)
在最后一行输入:(或是将最后以行原文前面的"#"去掉)
DTSOURCEPROFILE=true
本文经孤独红尘收集整理,转载请注明出处:http://huxuan713.blog.163.com/
6, 上传安装介质
用oracle用户ftp的方式登录aix机器。并把10gr2_aix5l64_database.cpio.gz文件上传到/db/oracle目录下,并用一下命令解压:
$gunzip 10gr2_aix5l64_database.cpio.gz
$cpio -idcmv < 10gr2_aix5l64_database.cpio
7, 安装oracle软件
用oracle用户经图形界面登陆aix
$ cd /db/oracle/Disk1/
$ ./runInstaller
***********************************************************************
Your platform requires the root user to perform certain pre-installation
OS preparation. The root user should run the shell script 'rootpre.sh' be
fore
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)
按照提示另开一个telnet窗口,用root用户登陆,执行以下命令
# cd /db/oracle/Disk1/rootpre
# ./rootpre.sh
./rootpre.sh output will be logged in /tmp/rootpre.out_10-12-14.16:14:16
Saving the original files in /etc/ora_save_10-12-14.16:14:16....
Copying new kernel extension to /etc....
Loading the kernel extension from /etc
Oracle Kernel Extension Loader for AIX
Copyright (c) 1998,1999 Oracle Corporation
Successfully loaded /etc/pw-syscall.64bit_kernel with kmid: 0x4050400
Successfully configured /etc/pw-syscall.64bit_kernel with kmid: 0x4050400
The kernel extension was successfuly loaded.
Configuring Asynchronous I/O....
Asynchronous I/O is already defined
Configuring POSIX Asynchronous I/O....
Checking if group services should be configured....
Nothing to configure.
执行结束之后返回oracle安装窗口。点击Y继续安装程序。
在下图中我们选择高级安装:
inventory目录和安装组不变,继续下一步:
选择安装类型,我们采用默认选择,企业版:
还是默认选项不要改变,继续:
oracle执行检查checks,看安装环境是否存在问题:
这里请注意,我们只安装数据库软件,不创建实例。
安装信息汇总,看看而已,直接下一步:
开始安装:
以root用户执行以下两个脚本:
# ./orainstRoot.sh
Changing permissions of /db/oracle/oraInventory to 775.
Changing groupname of /db/oracle/oraInventory to oinstall.
The execution of the script is complete
# ../product/10.2.0/db_1/root.sh
Running Oracle10 root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /db/oracle/product/10.2.0/db_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Creating /usr/local/bin directory...
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
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.sh script.
Now product-specific root actions will be performed.
#
安装完成