Oracle10g 在AIX 6.1上的静默安装

环境:AIX 6.1 ML07 ,数据库版本: Oracle 10g for AIX 5L 64bit

简单记录了一下安装过程:

一, 检查系统硬件环境

Oracle10g最低安装要求:

1G物理内存、

SWAP空间

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

400M /TMP空间、4G+6G Oracle目录空间、64位体系结构、数据库空间

1,检查内存大小

# /usr/sbin/lsattr -E -l sys0 -a realmem

realmem 47448064 Amount of usable physical memory in Kbytes False

2,检查交换空间大小

# /usr/sbin/lsps -a

Page Space      Physical Volume   Volume Group    Size %Used Active  Auto  Type

paging00        hdisk1            rootvg        8192MB    86   yes   yes    lv

hd6             hdisk0            rootvg        8192MB    86   yes   yes    lv

如果不满足需要,可以使用下面的命令扩展原有交换分区
[root@sddstech3 /root]# /usr/bin/smitty chps

 

3,确认/TMP和Oracle目录空间(其中Oracle10g放在/oracle下):

400M /TMP空间

Oracle目录磁盘空间,要求 >= 4GB(这是仅装企业版10.2.0.1软件,不包含10.2.0.4补丁和数据库所需要的空间)+6G

# df -m

Filesystem    MB blocks      Free %Used    Iused %Iused Mounted on

/dev/hd4        5120.00   5010.31    3%     5152     1% /

/dev/hd2        3072.00   1444.27   53%    33634    10% /usr

/dev/hd9var     5120.00   4993.07    3%     4481     1% /var

/dev/hd3        5120.00   5115.52    1%       47     1% /tmp

/dev/fwdump     2048.00   2031.58    1%       10     1% /var/adm/ras/platform

/dev/hd1         256.00    254.07    1%       25     1% /home

/proc                 -         -    -         -     -  /proc

/dev/hd10opt    5120.00   5008.79    3%     3459     1% /opt

/dev/oraclelv   7680.00   2774.87   64%    44266     7% /oracle

/dev/archlv   460800.00 334172.68   28%     3378     1% /arch

如果不满足要求,可以通过下面的命令扩展原有 /tmp 文件系统
[root@sddstech3 /root]# /usr/bin/smitty chjfs2

也可以通过环境变量临时扩展 ORACLE 用户所使用的 /tmp 空间
[oracle@sddstech3 /home/oracle]$ export /tmp=
[oracle@sddstech3 /home/oracle]$ export /temp=

 

二, 检查系统结构

1,   检查操作系统位数

#  /usr/bin/getconf HARDWARE_BITMODE

64

2,    可以通过下面的命令来确认系统CPU个数和主频

#  lsdev -C |grep proc

 

#  lsattr -E -l proc0

frequency   3504000000     Processor Speed       False

smt_enabled true           Processor SMT enabled False

smt_threads 2              Processor SMT threads False

state       enable         Processor state       False

type        PowerPC_POWER6 Processor type        False

#  lsattr -E -l proc2

frequency   3504000000     Processor Speed       False

smt_enabled true           Processor SMT enabled False

smt_threads 2              Processor SMT threads False

state       enable         Processor state       False

type        PowerPC_POWER6 Processor type        False

#  lsattr -E -l proc4

frequency   3504000000     Processor Speed       False

smt_enabled true           Processor SMT enabled False

smt_threads 2              Processor SMT threads False

state       enable         Processor state       False

type        PowerPC_POWER6 Processor type        False

#  lsattr -E -l proc6

frequency   3504000000     Processor Speed       False

smt_enabled true           Processor SMT enabled False

smt_threads 2              Processor SMT threads False

state       enable         Processor state       False

type        PowerPC_POWER6 Processor type        False

#  lsattr -E -l proc8

frequency   3504000000     Processor Speed       False

smt_enabled true           Processor SMT enabled False

smt_threads 2              Processor SMT threads False

state       enable         Processor state       False

type        PowerPC_POWER6 Processor type        False

#  lsattr -E -l proc10

frequency   3504000000     Processor Speed       False

smt_enabled true           Processor SMT enabled False

smt_threads 2              Processor SMT threads False

state       enable         Processor state       False

type        PowerPC_POWER6 Processor type        False

#  lsattr -E -l proc12

frequency   3504000000     Processor Speed       False

smt_enabled true           Processor SMT enabled False

smt_threads 2              Processor SMT threads False

state       enable         Processor state       False

type        PowerPC_POWER6 Processor type        False

#  lsattr -E -l proc14

frequency   3504000000     Processor Speed       False

smt_enabled true           Processor SMT enabled False

smt_threads 2              Processor SMT threads False

state       enable         Processor state       False

type        PowerPC_POWER6 Processor type        False

#  lsattr -E -l proc16

frequency   3504000000     Processor Speed       False

smt_enabled true           Processor SMT enabled False

smt_threads 2              Processor SMT threads False

state       enable         Processor state       False

type        PowerPC_POWER6 Processor type        False

#  lsattr -E -l proc18

frequency   3504000000     Processor Speed       False

smt_enabled true           Processor SMT enabled False

smt_threads 2              Processor SMT threads False

state       enable         Processor state       False

type        PowerPC_POWER6 Processor type        False

#  lsattr -E -l proc20

frequency   3504000000     Processor Speed       False

smt_enabled true           Processor SMT enabled False

smt_threads 2              Processor SMT threads False

state       enable         Processor state       False

type        PowerPC_POWER6 Processor type        False

#  lsattr -E -l proc22

frequency   3504000000     Processor Speed       False

smt_enabled true           Processor SMT enabled False

smt_threads 2              Processor SMT threads False

state       enable         Processor state       False

type        PowerPC_POWER6 Processor type        False

#

 

三, 检查系统软件环境

1,   检查操作系统版本号(要求AIX必须是5.2 LEVEL 1以上(含LEVEL 1))

# oslevel -r

6100-07

# oslevel -qr

 

# oslevel -qs

 

2,检查安装的软件包和补丁包

要求安装了这些FILESETS(包括AIX C++ 8.0 运行时)

# /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

对于缺少的包,用installp -a -d /dev/cd0 包名 进行安装,安装时放入AIX的安装光盘

光盘放入光驱就可以看了,不用加载,是自动加载的,如果没有自动加载,试试手动加载:

mount -r -v cdrfs /dev/cd0 /mnt

 

检查更新(APARs授权问题分析报告)要求安装了APARs(Authorized Problem Analysis Reports): IZ10223

# /usr/sbin/instfix -i -k "IZ10223"

    All filesets for IZ10223 were found.

在 AIX5.3版本下不必做此项检查。在5.2如果检查出来缺少的,可以访问http://www14.software.ibm.com/webapp/set2/psearch/search?domain=sysp&q=IY68989&Go.x=0&Go.y=0&sort=2&pgLen=5&os=no&exp=y&apar=y

http://www-912.ibm.com/eserver/support/fixes/获取。进去后要输入操作系统、版本号、APAR号等信息,下载上传到主机上,

smit-软件安装中专门有安装APARs的 条目。

Smitty install

四, 创建Oracle10g用户和用户组,并创建相关目录

1、创建用户组smit security进入安全管理画面,选择创建用户组,创建oinstall和dba两个组。使用其缺省选项即可。

# smitty security

2、 创建用户
在 安全管理页面创建oracle用户,将其Primary Group定义为oinstall,Group SET设置为dba。不妨顺便把它的Soft FILE size、Soft CPU time、soft DATA segment和soft STACK size设为-1,省得在下面再设

# smitty security

3、 设置口令
# passwd oracle

4、确认nobody用户存在 id nobdy

# id nobody

uid=4294967294(nobody) gid=4294967294(nobody)

5、创建目录

    a、创建卷组

# smit vg

  VOLUME GROUP name                                  [datavg]

Physical partition SIZE in megabytes                     512Mb  +

* PHYSICAL VOLUME names                              []  +

  Force the creation of a volume group?               no  +

  Activate volume group AUTOMATICALLY                 yes  +

    at system restart?

  Volume Group MAJOR NUMBER                          []   +#

  Create VG Concurrent Capable?                       n

b、 在新建卷组datavg内创建逻辑卷

# smit lv

Logical volume NAME                                [oraclelv]

* VOLUME GROUP name                                   datavg

* Number of LOGICAL PARTITIONS                       [100]  #

  PHYSICAL VOLUME names                              []  +

  Logical volume TYPE                                []      +

  POSITION on physical volume                         middle  +

  RANGE of physical volumes                           minimum   +

  MAXIMUM NUMBER of PHYSICAL VOLUMES                 []  #

    to use for allocation

  Number of COPIES of each logical                    1         +

    partition

  Mirror Write Consistency?                           active     +

  Allocate each logical partition copy                yes         +

    on a SEPARATE physical volume?

  RELOCATE the logical volume during                  yes     +

    reorganization?

  Logical volume LABEL                               [/oracle]

  MAXIMUM NUMBER of LOGICAL PARTITIONS               [512]   #

  Enable BAD BLOCK relocation?                        yes          +

  SCHEDULING POLICY for writing/reading               parallel     +

    logical partition copies

  Enable WRITE VERIFY?                                no           +

  File containing ALLOCATION MAP                     []

  Stripe Size?                                       [Not Striped]    +

  Serialize IO?                                       no     
Smit- 系统存储管理有逻辑卷管理,新建比如oraclelv卷,选择物理卷,类型选择jsf2,分配空间>20G,定义mount点比如/oracle。其 他都可以不作变更。注意空间分配只需要设置LP数,一个LP是256M,不能超过32652个。有什么不明白可以查看/usr所在的逻辑卷相关信息。


c、 创建文件系统

# smit fs

                                                        [Entry Fields]

* LOGICAL VOLUME name                                 oraclelv    +

* MOUNT POINT                                        [/oracle]

  Mount AUTOMATICALLY at system restart?              no       +

  PERMISSIONS                                         read/write   +

  Mount OPTIONS                                      []            +

  Block Size (bytes)                                  4096           +

  Logical Volume for Log                                             +

  Inline Log size (MBytes)                           []               #

  Extended Attribute Format                           Version 1     +

  ENABLE Quota Management?                            no        +

Smit-系统存储管理有文件系统管理。基于刚定义的oracle卷创建文件系统,最好将之设为自动mount。然后将之mount。

#mount /oracle
d、 创建目录
# mkdir –p /oracle作为ORACLE_BASE

# mkdir –p /oracle/product/10.2.0/database作为ORACLE_HOME
# mkdir /oracle/oradata作为oracle数据目录
e、 改变目录安全属性
# chown –R oracle:oinstall /oracle /oracle/oradata改变目录的所有者和用户组。
# chmod –R 775 /oracle /oracle/oradata改变目录的许可权限。

6、修改oracle用户的.profile文件,添加下面的内容:

ORACLE_SID=tzsmk
export ORACLE_SID
ORACLE_BASE=/oracle
export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/database
export ORACLE_HOME
PATH=$ORACLE_HOME/bin:$PATH
export PATH
DISPLAY=127.0.0.1:0.0
export DISPLAY

 

 

下面是确认信息

HZCG560Q2:/oracle$id

uid=500(oracle) gid=204(dba) groups=205(oinstall)
HZCG560Q2:/oracle$pwd

/oracle

HZCG560Q2:/oracle$env|grep ORA

ORACLE_BASE=/oracle

ORACLE_SID=tzsmk

ORACLE_HOME=/oracle/product/10.2.0/database

五, 配置SHELL LIMITS和系统 配置参数

1,设置oracle用户和root用户的属性:

# smit chuser

将Soft FILE size、Soft CPU time、Soft DATA segment和Soft STACK size都设置为没有限制,也就是-1。

2,设置系统参数,将Maximum number of PROCESSES allowed per user参数的值设置超过2048。

# smit chgsys

 

六, 准备Oracle10.2.0.1软件及Oracle10.2.0.4补丁包

1,AIX下开启ftp服务
a,   首先应保证inetd守护进程是开启的

# lssrc -a |grep inetd

 inetd            tcpip            77830        active

active 表示inetd进程已开启

b,   启动ftp服务:

 # startsrc -t ftp

c,   停止ftp服务:

# stopsrc -t ftp
d,可输入lssrc -t ftp命令查看ftp进程是否已开启

# lssrc -t ftp

Service       Command          Description              Status

 ftp          /usr/sbin/ftpd   ftpd                     active
e,另请查看/etc/inetd.conf文件的以下字段是否被注释掉,如果被注释掉,说明开机时不自动打开FTP服务
ftp     stream  tcp6    nowait  root    /usr/sbin/ftpd         ftpd

说明:
startsrc 是开启进程,stopsrc 是停止进程 
lssrc   是获取子系统的状态 

2,将文件enterprise.rsp、patchset.rsp、dbca.rsp和p6718715_10203_AIX64-5L.zip、p6810189_10204_AIX5L.zip用ftp工具上传到AIX

jar -xvf p6718715_10203_AIX64-5L.zip
七, 静默模式安装Oracle 10g过程

1、光盘放入光驱就可以看了,不用加载,是自动加载的,如果没有自动加载,试试手动加载:

mount -r -v cdrfs /dev/cd0 /mnt

2、 运行rootpre.sh(从p6718715_10203_AIX64-5L.zip文件解压的)

#cd /oracle

#./rootpre.sh

    3,切换回oracle用户,安装oracle10.2.0.1软件

# export DISPLAY=127.0.0.1:0.0

# xhost +

# su - oracle
运行Disk1/runInstaller完成安装

     或

     #gunzip 10gr2_aix5l64_database.cpio.gz

#cpio -icdmv < 10gr2_aix5l64_database.cpio

     #./runInstaller -silent –ignoreSysPrereqs -force -noconfig -responseFile /oracle/enterprise.rsp

     ./runInstaller -silent –ignoreSysPrereqs -responseFile /oracle/enterprise.rsp

直到提示用root用户执行/oracle/oraInventory/root.sh ,/oracle/product/10.2.0/database/root.sh脚本。  

新打开一个SHELL,切换到root用户执行上述2个脚本。

4,静默模式升级Oracle到10.2.0.4

#/usr/bin/slibclean

#jar -xvf p6810189_10204_AIX5L.zip
$ ./runInstaller -silent -ignoreDiskWarning -responseFile /oracle/patchset.rsp

执行root.sh

5,静默模式创建数据库

dbca -silent –responseFile /oracle/dbca.rsp

     6,静默配置监听

vi $ORACLE_HOME/network/admin/ listener.ora文件即可,初始没有这个文件,需要手动创建。

[oracle@stream admin]$ vi listener.ora

LISTENER =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

  )

lsnrctl start

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/14359/viewspace-730183/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/14359/viewspace-730183/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值