Friday, September 19, 2014

Install Oracle 11gR2 on HP-UX 11.31

This installation of Oracle 11.2.0.1 is for HP-UX 11.31 ia64.

Pre-Instalation Tasks
1. Create oracle User Account
Login as root and create the user oracle which belongs to oinstall and dba groups.
su -
# /usr/sbin/groupadd dba
# /usr/sbin/groupadd oinstall
# /usr/sbin/useradd -g oinstall -G dba -m -s /usr/local/bin/bash -p /home/oracle oracle
# passwd oracle
# chown -R oracle:oinstall /home/oracle
Note: "#" sign means that you need execute this command as root user.

2. Setting System parameters
I use kctune to edit kernel parameters:
# /usr/sbin/kctune ksi_alloc_max=32768
# /usr/sbin/kctune executable_stack=0
# /usr/sbin/kctune max_thread_proc=1024
# /usr/sbin/kctune maxdsiz=1073741824
# /usr/sbin/kctune maxdsiz_64bit=2147483648
# /usr/sbin/kctune maxssiz=134217728
# /usr/sbin/kctune maxssiz_64bit=1073741824
# /usr/sbin/kctune maxuprc=3686
# /usr/sbin/kctune msgmni=4096
# /usr/sbin/kctune msgtql=4096
# /usr/sbin/kctune ncsize=35840
# /usr/sbin/kctune maxfiles_lim=32767
# /usr/sbin/kctune maxfiles=1024
# /usr/sbin/kctune nflocks=4096
# /usr/sbin/kctune ninode=34816
# /usr/sbin/kctune nkthread=7184
# /usr/sbin/kctune nproc=4096
# /usr/sbin/kctune semmni=4096
# /usr/sbin/kctune semmns=8192
# /usr/sbin/kctune semmnu=4092
# /usr/sbin/kctune semvmx=32767
# /usr/sbin/kctune shmmax=1073741824
# /usr/sbin/kctune shmmni=4096
# /usr/sbin/kctune shmseg=512
# /usr/sbin/kctune tcp_largest_anon_port=65500
# /usr/sbin/kctune udp_largest_anon_port=65500


3. Check required software and patches:
For HP-UX 11i V3 (11.31):
  • PHCO_43503 11.31 diskowner(1M) cumulative patch
  • PHCO_41479 11.31 Disk Owner Patch
  • PHKL_38038 VM patch - hot patching/Core file creation directory
  • PHKL_38938 11.31 SCSI cumulative I/O patch
  • PHKL_40941 Scheduler patch: post wait hang
  • PHSS_36354 11.31 assembler patch
  • PHSS_37042 11.31 hppac (packed decimal)
  • PHSS_37959 Libcl patch for alternate stack issue fix (QXCR1000818011)
  • PHSS_39094 11.31 linker + fdp cumulative patch
  • PHSS_39100 11.31 Math Library Cumulative Patch
  • PHSS_39102 11.31 Integrity Unwind Library
  • PHSS_38141 11.31 aC++ Runtime
  • PHSS_39824 - 11.31 HP C/aC++ Compiler (A.06.23) patch
4. Check the hardware:
Recommended: 2 GB of RAM
# /usr/contrib/bin/machinfo  | grep -i Memory

Swap should be at least 8GB or more

Disk space for /tmp should be 2GB or more
# bdf
/dev/vg00/lvol3    1048576  370832  672496   36% /
/dev/vg00/lvol1    1835008  181160 1641016   10% /stand
/dev/vg00/lvol8    10485760 1492760 8927560   14% /var
/dev/vg00/lvol7    6356992 3909264 2428664   62% /usr
/dev/vg00/lvol4    2097152  714904 1372064   34% /tmp
/dev/vg00/lvol6    10485760 4980992 5462688   48% /opt
/dev/vg00/lvol5    20971520 10491088 10398584   50% /home
/dev/vg00/gemem    41943040 17127198 23265062   42% /GEMEM
If you are using vxfs, then you can span your logical volumn for larger size. Example, my /tmp was 512MB and I want to span up to 2GB, I exec 2 commands below:

lvextend -L 2048 /dev/vg00/lvol4
#  fsadm -b 2097152 /tmp

/dev/vg00/lvol4 is logical volumn of /tmp
2097152 = 2GB*1024*1024

For more information, see here

5. Set Oracle user system variable
Login to oracle user created as above, add those line at the end
$ vi .profile
ORACLE_BASE=/home/oracle/product
ORACLE_HOME=$ORACLE_BASE/11.2
ORACLE_SID=orcl
LD_LIBRARY_PATH=$ORACLE_HOME/lib
PATH=$PATH:$ORACLE_HOME/bin

export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH
export PATH=/usr/sbin:$PATH

6. Install CDE for X-Windows if you are installing remotely. However I have issue with CDE, so I install vncserver on the server and use vncclient to connect. This is very important because if you don't install oracle with GUI then it's hard to success. Search on the internet how to install vncserver on HP-UX, this is not difficult.

7. Reboot

Download & Install
Download Oracle 11g2 on Oracle website, there are 2 files of them
hpia64_11gR2_database_1of2.zip
hpia64_11gR2_database_2of2.zip

You better unzip it on client then use SCP for copying file to server (that will install Oracle) because unzip on HP-UX is quite complicated for me.

For example, you copy Oracle to /home/oracle/database. Make sure to run this command after copying
$ mkdir -p /home/oracle/product$ mkdir -p /home/oracle/oraInventory
$ chown -R oracle:dba 
/home/oracle/product$ chown -R oracle:oinstall /home/oracle/oraInventory
$ chmod -R 755 /home/oracle/database
$ cd 
/home/oracle/database
$ ./runInstaller

Post-Instalation Tasks

Auto startup Oracle, edit file /etc/oratab to make sure
SID:ORACLE_HOME:{Y|N|W}

Create script name oracle in /sbin/init.d
# vi /sbin/init.d/oracle
#! /bin/sh  -x
#
# Change the value of ORACLE_HOME to specify the correct Oracle home
# directory for your installation.

ORACLE_HOME=/home/oracle/product/11_2
#
# Change the value of ORACLE to the login name of the
# oracle owner at your site.
#
ORACLE=oracle

PATH=${PATH}:$ORACLE_HOME/bin
HOST=`hostname`
PLATFORM=`uname`
export ORACLE_HOME PATH
#
if [ ! "$2" = "ORA_DB" ] ; then
   if [ "$PLATFORM" = "HP-UX" ] ; then
      remsh $HOST -l $ORACLE -n "$0 $1 ORA_DB"
      exit
   else
      rsh $HOST -l $ORACLE  $0 $1 ORA_DB
      exit
   fi
fi
#
case $1 in
'start')
        if [ "$PLATFORM" = "Linux" ] ; then
          touch /var/lock/subsys/dbora
        fi
        $ORACLE_HOME/bin/dbstart $ORACLE_HOME &
        ;;
'stop')
        $ORACLE_HOME/bin/dbshut $ORACLE_HOME &
        ;;
*)

echo "usage: $0 {start|stop}"
        exit
        ;;
esac
#
exit

# ln -s /sbin/init.d/oracle /sbin/rc3.d/S990oracle
# ln -s /sbin/init.d/oracle /sbin/rc0.d/K001oracle

Common Installation Errors
Error in invoking target ‘mkldflags ntcontab.o nnfgt.o’ of makefile /home/oracle/product/11.2/dbhome_1/network/lib/ins_net_client.mk’. See ‘//home/oracle/oraInventory/logs/installActions2013-05-02_10-13-34AM.log ‘ for details

I tail the last 30 line of log file above and recognize the real error is 'Internal Error: Corrupted codeword in file /opt/aCC/newconfig/aCC.cwd'. You must fix it before continue installation.

Resolution: simple go to this link then go to here to obtain the key and add it to /opt/aCC/newconfig/aCC.cwd file. Then click retry to continue installation.

No comments:

Post a Comment