aix5.3 安裝oracle11g 準備工作

wmlm發表於2008-11-11

參考安裝文件:
Oracle® Database Installation Guide
11g Release 1 (11.1) for AIX Based Systems
Part Number B32076-03


檢查作業系統位數和記憶體
# bootinfo -y
64
#
# bootinfo -r
1048576

# lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type
hd6 hdisk0 rootvg 512MB 1 yes yes lv
擴充套件交換記憶體 到1.5G 從16*32M到48*32M
# chps -s32 hd6
# lsps hd6
Page Space Physical Volume Volume Group Size %Used Active Auto Type
hd6 hdisk0 rootvg 1536MB 1 yes yes lv

[@more@]

或者直接檢視詳情
# lslv hd6

檢視磁碟空間 ORACLE連軟體帶資料庫需要6G空間(/opt) TMP需要至少400M
# df -m
Filesystem MB blocks Free %Used Iused %Iused Mounted on
/dev/hd4 32.00 19.45 40% 1670 28% /
/dev/hd2 2048.00 815.70 61% 31670 15% /usr
/dev/hd9var 512.00 498.72 3% 433 1% /var
/dev/hd3 3072.00 3069.50 1% 17 1% /tmp
/dev/hd1 32.00 31.64 2% 7 1% /home
/proc - - - - - /proc
/dev/hd10opt 10240.00 10156.23 1% 1617 1% /opt
/dev/ww 10240.00 5346.43 48% 2950 1% /ww

修改時區
# chtz BEIST-8

同步時間(可選)
# ntpdate 10.0.1.1

修改檔案大小限制
chuser
fsize='-1' data='-1' core='-1' root


重啟作業系統
# shutdown -r


增加目錄/ww_,用於儲存安裝盤等,大小10g

mklv -t jfs2 -y ww rootvg 300
mkdir -p /ww
crfs -v jfs2 -d ww -m /ww -A yes
mount /dev/ww /ww

擴充套件檔案系統
extendlv ww 20
chfs -a size=+640M /ww

使用FTP工具上傳安裝盤

校驗安裝盤的完整性
# cksum ww/*
4226392030 650295373 ww/aix.ppc64_11gR1_database_1013_1of2.zip
1762733015 32 ww/lost+found

下載上傳安裝unzip工具 unzip_aix.Z
uncompress unzip_aix.Z
chmod 777 unzip_aix

解壓安裝盤
./unzip aix.ppc64_11gR1_database_1013_1of2.zip
./unzip aix.ppc64_11gR1_database_1013_2of2.zip

#############################################################################

2.3 Checking the Software Requirements
2.3.1 Operating System Requirements
作業系統要求最低AIX 5L version 5.3, TL 05, Service Pack 06
# oslevel -s
5300-07-00-0000

檢查檔案集是否有以下內容
# 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.7.0 COMMITTED Base Application Development
Toolkit
bos.adt.lib 5.3.0.60 COMMITTED Base Application Development
Libraries
bos.perf.libperfstat 5.3.7.0 COMMITTED Performance Statistics Library
Interface
bos.perf.perfstat 5.3.7.0 COMMITTED Performance Statistics
Interface
bos.perf.proctools 5.3.7.0 COMMITTED Proc Filesystem Tools

Path: /etc/objrepos
bos.perf.libperfstat 5.3.7.0 COMMITTED Performance Statistics Library
Interface
bos.perf.perfstat 5.3.7.0 COMMITTED Performance Statistics
Interface
lslpp: 0504-132 Fileset bos.adt.libm not installed.

安裝缺少的檔案集bos.adt.libm
因為安裝盤已掛載,所以可以直接進行安裝,否則先掛載1號安裝盤
smit install_latest
# lslpp -l bos.adt.libm
Fileset Level State Description
----------------------------------------------------------------------------
Path: /usr/lib/objrepos
bos.adt.libm 5.3.7.0 COMMITTED Base Application Development Math Library

2.3.2 Compiler Requirements
需要兩個元件
XL C/C++ Enterprise Edition V8.0 for AIX:
gcc 3.4.5

smit list software /XL 找到已安裝了9.0.0.1版本
xlC.aix50.rte 9.0.0.1 C F XL C/C++ Runtime for AIX 5.2

並且已經安裝了RPM管理器
rpm.rte 3.0.5.41 C F RPM Package Manager
如果沒有安裝,也可去網上下載後安裝,方式如下:
1. Installing the RedHat Package Manager (RPM)
在安裝GCC軟體之前,必須安裝RPM - the RedHat Package Manager。
你需要用installp安裝RPM包, 下載此包的地址為:

安裝rpm 包,必須以root 使用者操作,命令如下:

# installp -qacXgd rpm.rte rpm.rte
rpm程式在/opt/freeware/bin/中
#cd /opt/freeware/bin/

GCC的下載 gcc-4.2.0-3.aix5.3.ppc.rpm

地址為 ... linux/download.html

因AIX5.3已預設安裝rpm,只需要安裝gcc即可
例如
#rpm -ivh gcc-4.2.0-3.aix5.3.ppc.rpm


2.3.3 Patch Requirement
# instfix -i -k "IY89080 IY92037 IY94343 Iz01060 Iz03260"
All filesets for IY89080 were found.
All filesets for IY92037 were found.
All filesets for IY94343 were found.
There was no data for Iz01060 in the fix database.
There was no data for Iz03260 in the fix database.


Comments
5200-10 - use AIX APAR IZ05734
5300-06 - use AIX APAR IZ01060
5300-07 - use AIX APAR IZ02837
5300-08 - use AIX APAR IZ02933


APAR is sysrouted TO one or more of the following:
IZ03475
IZ03621

IZ02837 IZ03475 已安裝 未做操作

2.3.4 Additional Software Requirements
2.3.4.1 Oracle JDBC/OCI Drivers
因JDK5已安裝,需要改一下PATH

find . -name java
# find . -name java
./opt/LicenseUseManagement/java
./usr/lib/java
./usr/java5/bin/java
./usr/java5/jre/bin/java
./usr/java14/bin/java
./usr/java14/jre/bin/java

ls -l /usr/lib/java
echo $PATH
vi /etc/envi*
將其中的java14改為java5 然後驗證一下

# java -version
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build pap32devifx-20070725 (SR5a))
IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 AIX ppc-32 j9vmap3223-20070426 (JIT enabled)
J9VM - 20070420_12448_bHdSMR
JIT - 20070419_1806_r8
GC - 200704_19)
JCL - 20070725


##########################################################################


2.6 Creating Required Operating System Groups and Users

檢查是否安裝過ORACLE?
more /etc/oraInst.loc

建立組
Creating the Oracle Inventory Group

smit security

oinstall
dba
oper
asmadmin
使用命令列方式如下:
# mkgroup -A oinstall
# mkgroup dba
# mkgroup oper
# mkgroup asmadmin

建立oracle使用者
oracle
uid=440(oracle) gid=200(oinstall) groups=201(dba),202(oper)
使用命令列方式如下:
mkuser pgrp='oinstall' groups='oper,dba,asmadmin' oracle

設定oracle的口令
passwd oracle

2.7 Configure Shell Limits and System Configuration Parameters
2.7.1 Configure Shell Limits
smit chuser
Soft FILE size -1 (Unlimited)
Soft CPU time -1 (Unlimited) Note: This is the default value.
Soft DATA segment -1 (Unlimited)
Soft STACK size -1 (Unlimited)
Soft Real Memory size -1 (Unlimited)

使用命令列方式如下:
chuser fsize='-1' data='-1' stack='-1' core='-1' oracle

2.7.2 Configure System Configuration Parameters
# smit chgsys
Maximum number of PROCESSES 2048
ARG/ENV list size in 4K byte blocks 128
使用命令列
chdev -l sys0 -a maxuproc='2048' -a ncargs='128'

2.8 Identifying Required Software Directories

Oracle Base Directory 如/mount_point/app/oracle_sw_owner /u01/app/oracle
Oracle Inventory Directory 如/u01/app/oraInventory
Oracle Home Directory 如oracle_base/product/11.1.0/db_1

先檢視是否已有ORACLE目錄?
# more /etc/oratab

建立目錄如下:
mkdir -p /opt/app
chown -R oracle:oinstall /opt/app
chmod -R 775 /opt/app/

##########################################################################

2.10 Choosing a Storage Option for Oracle Database and Recovery Files

建立ORACLE的資料目錄如下:
Database file directory:

# mkdir /opt/oradata
# chown oracle:oinstall /opt/oradata
# chmod 775 /opt/oradata
The default location for Database file directory is $ORACLE_BASE/oradata.

Recovery file directory (flash recovery area):

# mkdir /opt/flash_recovery_area
# chown oracle:oinstall /opt/flash_recovery_area
# chmod 775 /opt/flash_recovery_area

##########################################################################


2.12 Preparing Disk Groups for an Automatic Storage Management Installation

使用一個已存在ASM 方法略

2.12.5 Step 4: Configuring Disks for Automatic Storage Management

確認有可用磁碟
# /usr/sbin/lsdev -Cc disk


If a disk is not listed as available, then enter the following command to configure the new

disks:
# /usr/sbin/cfgmgr

此次不使用ASM 略去
##########################################################################
2.12.6 Identifying Required Raw Partitions for Database Files

2.13 Stopping Existing Oracle Processes

##########################################################################

2.14 Configuring the oracle User's Environment

先配置AIX,使xmanager 可以登入
原來沒有安裝CDT,依次插入1號盤2號盤,安裝CDT

/etc/rc.dt
再使用xmanager xclock成功。

oracle使用者進入
修改.profile 檔案
umask 022
AIXTHREAD_SCOPE=S; export AIXTHREAD_SCOPE
連DISPLAY也設上,方便
DISPLAY=10.0.10.143:0.0; export DISPLAY

修改完後,使之生效
$ . ./.profile

#######################################################################
如果不使用/tmp做為臨時資料夾,可以另外建一個大點的檔案系統做為臨時資料夾,不過要設定環境變數

此處沒有設定,具體設定略

#######################################################################

不在profile檔案中設定ORACLE_SID等變數,而是在使用時臨時設定
ORACLE_BASE=/opt/app/oracle
ORACLE_SID=sales
export ORACLE_BASE ORACLE_SID

不要設定這兩個變數
unset ORACLE_HOME
unset TNS_ADMIN

最後檢查一下
umask
env | more


#######################################################################
2.15 Running the rootpre.sh Script
僅在未安裝過ORACLE的環境上執行!

在安裝盤上沒有找到rootpre目錄,只好上傳下載來的rootpre zip包
Switch user to root:
./rootpre.sh

#######################################################################

安裝過程
如果使用DVD光碟
/usr/sbin/mount -rv cdrfs /dev/cd0 /dvd

安裝檢查時,Warning
Checking for rsct.basic.rte(0.0); Not found. Failed<<<<
Checking for rsct.compat.clients.rte(0.0); Not found. Failed<<<<

另外一warning是swap space
Expected result: 1536MB
Actual Result: 1520M

忽略後next
先安裝軟體,最後使用指令碼建庫,比較順利完成.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/271063/viewspace-1013221/,如需轉載,請註明出處,否則將追究法律責任。

相關文章