------------------------------------------------------------------
Checking the Hardware Requirements
------------------------------------------------------------------
/oracle 20G
/orabak 10G
/tmp 2G
SWAP
<2G 1.5*RAM
2G~8G 1*RAM
>8G 0.75*RAM
------------------------------------------------------------------
Checking the Software Requirements
------------------------------------------------------------------
参考文档 169706.1获取每个版本下的补丁要求
11.31 (Itanium) required patches:
1)Following patches need to be installed ,PHKL_35900 dependencies :
PHCO_40211 (replaces PHCO_38050)--
PHKL_36261 (replaces PHKL_36261)
PHKL_40205 (replaces PHKL_37462)
PHKL_38746 (replaces PHKL_37463)
PHKL_40136 (replaces PHKL_38034)
PHKL_40273 (replaces PHKL_38035)
PHKL_38080 (replaces PHKL_38080)--
PHKL_40531 (replaces PHKL_38091)
PHKL_39328 (replaces PHKL_38398)
PHKL_39740 (replaces PHKL_38414)--
PHSS_39898 (replaces PHSS_37553)--
PHSS_40538 (replaces PHSS_37955)
To determine whether the patche is installed ,enter the following command:
/usr/sbin/swlist -l patch | grep PHKL_40384
2)Following patches need to be installed.
PHKL_41005 11.31 vm cumulative patch (replaces PHKL_35936 s/b PHKL_36242 s/b PHKL_37185 s/b PHKL_38449 s/b PHKL_38038,
replaces PHKL_35900 PHKL_35936)
PHKL_40941 11.31 scheduler cumulative patch (replaces PHKL_38397 Note 580273.1 dbca hang)--
PHKL_40383 11.31 esctl cumulative patch (replaces PHKL_36248)--
PHKL_40384 11.31 esdisk cumulative patch (replaces PHKL_36249)--
To determine whether the patche is installed ,enter the following command:
/usr/sbin/swlist -l patch | grep PHKL_41005
3)To determine the version of the bundle installed, enter the following command:
/usr/sbin/swlist -l bundle | grep FEATURE11i
/usr/sbin/swlist -l bundle | grep QPK
Need to install the latest patch bundle, version 11.31.1009 (or newer version)
4)Download and install JDK/SDK 1.4.2_11 or higher from the HP website.
/usr/sbin/swlist -l product | grep -i jdk
Install 10.2.0.2 (or higher) into the new 10.2 home by running OUI from where the patchset has been unzipped :
./runInstaller -jreLoc /jre
5)To determine whether the compiler is installed,version should higher than C.11.31.04
/usr/sbin/swlist -l bundle | grep aC++
B9007AA C.11.31.04.2 HP C/aC++ Developer's Bundle
6)Creating Required Symbolic Links
cd /usr/lib
ln -s /usr/lib/libX11.3 libX11.sl
ln -s /usr/lib/libXIE.2 libXIE.sl
ln -s /usr/lib/libXext.3 libXext.sl
ln -s /usr/lib/libXhp11.3 libXhp11.sl
ln -s /usr/lib/libXi.3 libXi.sl
ln -s /usr/lib/libXm.4 libXm.sl
ln -s /usr/lib/libXp.2 libXp.sl
ln -s /usr/lib/libXt.3 libXt.sl
ln -s /usr/lib/libXtst.2 libXtst.sl
7)Asnyc I/O is required for Oracle on RAW devices and configured on HP-UX 11.23 by default.
You can check if you have the following file:
#ll /dev/async
crw-rw-rw- 1 bin bin 101 0x000000 Jul 29 11:55 /dev/async
If you want to use Oracle on RAW devices and Async I/O is not configured, then
Create the /dev/async character device
# /sbin/mknod /dev/async c 101 0x0
# chown oracle:dba /dev/async
# chmod 660 /dev/async
MAX_ASYNC_PORTS limits the maximum number of processes that can concurrently use /dev/async. Set this
parameter to the sum of 'processes' from init.ora + number of background processes. If
max_async_ports is reached, subsequent processes will use synchronous i/o.
/usr/sbin/kctune -h -B -C '' max_async_ports='4096'
AIO_MAX_OPS limits the maximum number of asynchronous i/o operations that can be queued at any time. Set this
parameter to the default value (2048), and monitor over time using glance
/usr/sbin/kctune -h -B -C '' aio_max_ops='4096'
8)set RTSCHED and MLOCK
The HP scheduling policy called SCHED_NOAGE enhances Oracle's performance by
scheduling Oracle processes so that they do not increase or decrease in priority, or become
preempted. On HP, most processes use a time sharing scheduling policy. Time sharing can
have detrimental effects on Oracle performance by descheduling an Oracle process during
critical operations, for example, holding a latch. HP has a modified scheduling policy,
referred to as SCHED_NOAGE, that specifically addresses this issue.
The RTSCHED and RTPRIO privileges grant Oracle the ability to change its process
scheduling policy to SCHED_NOAGE and also tell Oracle what priority level it should use
when setting the policy. The MLOCK privilege grants Oracle the ability to execute asynch
I/Os through the HP asynch driver. Without this privilege, Oracle9i generates trace files with
the following error message: "Ioctl ASYNCH_CONFIG error, errno = 1".
If /etc/privgroup does not already exist, create the file using following command:
cat > /etc/privgroup
dba MLOCK RTSCHED RTPRIO
Use the following command syntax to assign these privileges and to avoid reboot os.
setprivgrp dba MLOCK
setprivgrp -f /etc/privgroup
9)To determine the kernel bits, enter the following command:
#/bin/getconf KERNEL_BITS
64
------------------------------------------------------------------
Kernel Parameter Settings
------------------------------------------------------------------
/usr/sbin/kctune -h -B -C '' executable_stack='0'
/usr/sbin/kctune -h -B -C '' filecache_min='5%'
/usr/sbin/kctune -h -B -C '' filecache_max='10%'
/usr/sbin/kctune -h -B -C '' maxdsiz='1073741824'
/usr/sbin/kctune -h -B -C '' maxdsiz_64bit='2147483648'
/usr/sbin/kctune -h -B -C '' maxssiz='134217728'
/usr/sbin/kctune -h -B -C '' maxssiz_64bit='1073741824'
/usr/sbin/kctune -h -B -C '' nproc='4096'
/usr/sbin/kctune -h -B -C '' ksi_alloc_max='nproc*8'
/usr/sbin/kctune -h -B -C '' maxuprc='((nproc*9)/10)+1'
/usr/sbin/kctune -h -B -C '' msgtql='nproc'
/usr/sbin/kctune -h -B -C '' msgmni='nproc'
/usr/sbin/kctune -h -B -C '' nflocks='nproc'
/usr/sbin/kctune -h -B -C '' nkthread='((nproc*7)/4)+16'
/usr/sbin/kctune -h -B -C '' semmni='nproc'
/usr/sbin/kctune -h -B -C '' semmns='semmni*2'
/usr/sbin/kctune -h -B -C '' semmnu='nproc-4'
/usr/sbin/kctune -h -B -C '' semume='4096'
/usr/sbin/kctune -h -B -C '' ninode='8*nproc+2048'
/usr/sbin/kctune -h -B -C '' shmmni='512'
/usr/sbin/kctune -h -B -C '' shmmax='8589934592'
/usr/sbin/kctune -h -B -C '' shmseg='120'
/usr/sbin/kctune -h -B -C '' ncsize='35840'
/usr/sbin/kctune -h -B -C '' maxfiles='2048'
/usr/sbin/kctune -h -B -C '' maxfiles_lim='65048'
/usr/sbin/kctune -h -B -C '' max_thread_proc='1024'
/usr/sbin/kctune -h -B -C '' swchunk='65536'
/usr/sbin/kctune -h -B -C '' semvmx='32767'
/usr/sbin/kctune -h -B -C '' vps_ceiling='16384'
------------------------------------------------------------------
Creating Required Operating System Groups and Users
------------------------------------------------------------------
/usr/sbin/groupadd -g 200 dba
/usr/sbin/useradd -u 200 -g dba -d /oracle -s /sbin/sh oracle
To create the extjob unprivileged local user to own the extjob executable, enter the following command:
/usr/sbin/useradd extjob
Verifying that the User nobody Exists,If the nobody user does not exist, then enter the following command to create it:
/usr/sbin/useradd nobody
chown -R oracle:dba /oracle
chown -R oracle:dba /orabak
/oracle>more .profile
# Set up the PATH
PATH=/usr/sbin:$PATH:/sbin
# Set up the stty and vi editor
stty erase "^H" kill "^U" intr "^C" eof "^D"
stty hupcl ixon ixoff
tabs
EDITOR=vi
export EDITOR
#set up umask
umask 022
PS1=`hostname`':$PWD>'
#Set up the env for oracle
export ORACLE_BASE=/oracle/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db
export ORA_CRS_HOME=$ORACLE_BASE/product/10.2.0/crs
export ORACLE_SID=rectest
export ORACLE_TERM=xterm
export NLS_LANG=american_america.zhs16gbk
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:$ORACLE_HOME/rdbms/lib
export LIBPATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib32:$ORACLE_HOME/ctx/lib
export PATH=.:$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:$ORACLE_BASE/OPatch:$PATH
export CLASSPATH=$ORACLE_HOME/JRE/lib:$ORACLE_HOME/JRE/lib/rt.jar:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export CDPATH=.:$ORACLE_HOME:/oraclelog/ngbil
alias killoracle='ps -ef | grep oracle | grep "(LOCAL=NO)" | grep -v grep | awk '{print $2}' | xargs kill -9 '
alias cdora='cd $ORACLE_HOME'
alias cdcrs='cd $ORA_CRS_HOME'
alias cddump='cd $ORACLE_BASE/admin/rectest/bdump'
alias tailalert='tail -100 $ORACLE_BASE/admin/rectest/bdump/alert*.log'
alias cdnetwork='cd $ORACLE_HOME/network'
------------------------------------------------------------------
Installing software
------------------------------------------------------------------
rectest1:/orabak>ll
total 6112306
-rw-rw-rw- 1 oracle dba 1286727545 Jul 29 20:11 10gr2_database_hpi.zip
drwxr-xr-x 5 oracle dba 1024 Apr 2 02:26 9352164
drwxr-xr-x 4 oracle dba 96 Apr 10 10:21 9572766
drwxr-xr-x 5 oracle dba 1024 Apr 24 2008 Disk1
drwxrwxr-x 6 oracle dba 1024 Feb 7 2006 database
drwxrwxrwx 2 root sys 3072 Jul 30 09:35 hppatch
drwxr-xr-x 2 oracle dba 96 Jul 29 15:08 lost+found
-rw-rw-rw- 1 oracle dba 1758061824 Jul 29 20:17 p6810189_10204_HPUX-IA64.zip
-rw-r--r-- 1 oracle dba 36486763 Jul 30 16:00 p6880880_102000_HPUX-IA64.zip
-rw-r--r-- 1 oracle dba 46301761 Jul 30 15:05 p9352164_10204_HPUX-IA64.zip
-rw-r--r-- 1 oracle dba 1675160 Jul 30 15:05 p9572766_10204_HPUX-IA64.zip
-rwx------ 1 oracle dba 110955 Jul 29 20:02 unzip
1)Install 10.2.0.1
rectest1:/orabak>unzip 10gr2_database_hpi.zip
rectest1:/orabak>cd database
rectest1:/orabak/database>runInstaller –ignoreSysPreReqs
2)install 10.2.0.4
rectest1:/orabak>unzip p6810189_10204_HPUX-IA64.zip
rectest1:/orabak>cd Disk1
rectest1:/orabak>ps -ef | grep oracle && kill -9 oraclepid
rectest1:/orabak/Disk1>runInstaller –ignoreSysPreReqs
3)unzip OPatch
rectest1:/orabak>unzip p6880880_102000_HPUX-IA64.zip
rectest1:/orabak>mv OPatch $ORACLE_BASE
因为后面安装PSU的问题,这里的OPatch采用10205的opatch版本
rectest1:/orabak>opatch version
Invoking OPatch 10.2.0.5.0
OPatch Version: 10.2.0.5.0
4)安装PSU遇错
PSU=Patch Set Upgrade
在metalink上查到需要打的PSU为 9352164
rectest1:/orabak>unzip p9352164_10204_HPUX-IA64.zip
rectest1:/orabak>cd 9352164
/orabak/9352164
rectest1:/orabak/9352164>cd ..
初始安装的opatch版本为11.1.0.6.5,但是安装失败
rectest1:/orabak>/orabak/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./9352164
Invoking OPatch 11.1.0.6.5
Oracle Interim Patch Installer version 11.1.0.6.5
Copyright (c) 2008, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /oracle/app/oracle/product/10.2.0/db
Central Inventory : /oracle/app/oracle/oraInventory
from : /var/opt/oracle/oraInst.loc
OPatch version : 11.1.0.6.5
OUI version : 10.2.0.4.0
OUI location : /oracle/app/oracle/product/10.2.0/db/oui
Log file location : /oracle/app/oracle/product/10.2.0/db/cfgtoollogs/opatch/opatch2010-07-30_15-29-34PM.log
Patch history file: /oracle/app/oracle/product/10.2.0/db/cfgtoollogs/opatch/opatch_history.txt
Invoking prereq "checkconflictagainstohwithdetail"
The location "./9352164/README.html" is not a directory or a valid patch zip file.
Prereq "checkConflictAgainstOHWithDetail" not executed
PrereqSession failed: Invalid patch location.
OPatch failed with error code 73
使用绝对路径也报错:
rectest1:/orabak>/orabak/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /orabak/9352164
Invoking OPatch 11.1.0.6.5
Oracle Interim Patch Installer version 11.1.0.6.5
Copyright (c) 2008, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /oracle/app/oracle/product/10.2.0/db
Central Inventory : /oracle/app/oracle/oraInventory
from : /var/opt/oracle/oraInst.loc
OPatch version : 11.1.0.6.5
OUI version : 10.2.0.4.0
OUI location : /oracle/app/oracle/product/10.2.0/db/oui
Log file location : /oracle/app/oracle/product/10.2.0/db/cfgtoollogs/opatch/opatch2010-07-30_15-35-09PM.log
Patch history file: /oracle/app/oracle/product/10.2.0/db/cfgtoollogs/opatch/opatch_history.txt
Invoking prereq "checkconflictagainstohwithdetail"
The location "/orabak/9352164/README.html" is not a directory or a valid patch zip file.
Prereq "checkConflictAgainstOHWithDetail" not executed
PrereqSession failed: Invalid patch location.
OPatch failed with error code 73
rectest1:/orabak>/orabak/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./9352164
Invoking OPatch 11.1.0.6.5
Oracle Interim Patch Installer version 11.1.0.6.5
Copyright (c) 2008, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /oracle/app/oracle/product/10.2.0/db
Central Inventory : /oracle/app/oracle/oraInventory
from : /var/opt/oracle/oraInst.loc
OPatch version : 11.1.0.6.5
OUI version : 10.2.0.4.0
OUI location : /oracle/app/oracle/product/10.2.0/db/oui
Log file location : /oracle/app/oracle/product/10.2.0/db/cfgtoollogs/opatch/opatch2010-07-30_15-45-47PM.log
Patch history file: /oracle/app/oracle/product/10.2.0/db/cfgtoollogs/opatch/opatch_history.txt
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" not executed
Unable to create Patch Object.
Exception occured : Patch ID is null.
OPatch succeeded.
使用了10.2.0.5.0版本的opatch,psu安装成功。先check,再apply
rectest1:/orabak>/orabak/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./9352164
Invoking OPatch 10.2.0.5.0
Oracle Interim Patch Installer version 10.2.0.5.0
Copyright (c) 2010, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /oracle/app/oracle/product/10.2.0/db
Central Inventory : /oracle/app/oracle/oraInventory
from : /var/opt/oracle/oraInst.loc
OPatch version : 10.2.0.5.0
OUI version : 10.2.0.4.0
OUI location : /oracle/app/oracle/product/10.2.0/db/oui
Log file location : /oracle/app/oracle/product/10.2.0/db/cfgtoollogs/opatch/opatch2010-07-30_16-02-53PM.log
Patch history file: /oracle/app/oracle/product/10.2.0/db/cfgtoollogs/opatch/opatch_history.txt
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
rectest1:/orabak/9352164>/orabak/OPatch/opatch apply
Invoking OPatch 10.2.0.5.0
Oracle Interim Patch Installer version 10.2.0.5.0
Copyright (c) 2010, Oracle Corporation. All rights reserved.
Oracle Home : /oracle/app/oracle/product/10.2.0/db
Central Inventory : /oracle/app/oracle/oraInventory
from : /var/opt/oracle/oraInst.loc
OPatch version : 10.2.0.5.0
OUI version : 10.2.0.4.0
OUI location : /oracle/app/oracle/product/10.2.0/db/oui
Log file location : /oracle/app/oracle/product/10.2.0/db/cfgtoollogs/opatch/opatch2010-07-30_16-03-30PM.log
Patch history file: /oracle/app/oracle/product/10.2.0/db/cfgtoollogs/opatch/opatch_history.txt
ApplySession applying interim patch '9352164' to OH '/oracle/app/oracle/product/10.2.0/db'
Execution of 'sh /orabak/9352164/custom/scripts/init -apply 9352164 ':
Return Code = 0
...
ApplySession adding interim patch '9352164' to inventory
Verifying the update...
Inventory check OK: Patch ID 9352164 is registered in Oracle Home inventory with proper meta-data.
Files check OK: Files from Patch ID 9352164 are present in Oracle Home.
--------------------------------------------------------------------------------
********************************************************************************
********************************************************************************
** ATTENTION **
** **
** Please note that the Patch Set Update Installation (PSU Deinstallation) **
** is not complete until all the Post Installation (Post Deinstallation) **
** instructions noted in the Readme accompanying this PSU, have been **
** successfully completed. **
** **
********************************************************************************
********************************************************************************
--------------------------------------------------------------------------------
Execution of 'sh /orabak/9352164/custom/scripts/post -apply 9352164 ':
Return Code = 0
The local system has been patched and can be restarted.
OPatch succeeded.
------------------------------------------------------------------
Create database
------------------------------------------------------------------
这个数据库中使用NFS来存放数据文件,根据metalink 359515.1,NFS以以下参数mount
mount -o rw,bg,hard,rsize=32768,wsize=32768,vers=3,nointr,timeo,proto=tcp,suid,forcedirectio \
130.34.1.110:/vol/vol4 /oradata2
rectest1:/oracle>mount
/ on /dev/vg00/lvol3 ioerror=mwdisable,largefiles,delaylog,dev=40000003 on Fri Jul 30 11:55:29 2010
/stand on /dev/vg00/lvol1 ioerror=mwdisable,nolargefiles,log,tranflush,dev=40000001 on Fri Jul 30 11:55:36 2010
/var on /dev/vg00/lvol8 ioerror=mwdisable,largefiles,delaylog,dev=40000008 on Fri Jul 30 11:56:04 2010
/usr on /dev/vg00/lvol7 ioerror=mwdisable,largefiles,delaylog,dev=40000007 on Fri Jul 30 11:56:05 2010
/tmp on /dev/vg00/lvol6 ioerror=mwdisable,largefiles,delaylog,dev=40000006 on Fri Jul 30 11:56:05 2010
/oradata on /dev/vg00/lvol11 ioerror=mwdisable,largefiles,delaylog,dev=4000000b on Fri Jul 30 11:56:05 2010
/oracle on /dev/vg00/lvol9 ioerror=mwdisable,largefiles,delaylog,dev=40000009 on Fri Jul 30 11:56:05 2010
/orabak on /dev/vg00/lvol10 ioerror=mwdisable,largefiles,delaylog,dev=4000000a on Fri Jul 30 11:56:05 2010
/opt on /dev/vg00/lvol5 ioerror=mwdisable,largefiles,delaylog,dev=40000005 on Fri Jul 30 11:56:05 2010
/home on /dev/vg00/lvol4 ioerror=mwdisable,largefiles,delaylog,dev=40000004 on Fri Jul 30 11:56:06 2010
/net on -hosts ignore,indirect,nosuid,soft,nobrowse,dev=4000002 on Fri Jul 30 11:57:03 2010
/oradata2 on 130.34.1.110:/vol/vol4 nointr,noac,forcedirectio,rsize=32768,wsize=32768,NFSv3,dev=4000008 on Fri Jul 30 18:18:11 2010
dbca
netca
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10867315/viewspace-670536/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/10867315/viewspace-670536/