Installing Oracle from Custom Jumpstart on Solaris

Here is a quick example of a Solaris Custom Jumpstart finish script that installs Oracle from a repository on your install server. This was tested on a recent build of Solaris Express with Oracle 10g R2

First a sample rules file:

# Simple installation then install oracle from staging area on server
hostname        host  -       profile.oracle  install_oracle.sh

You need sufficient space in /u01/app (or other location that you choose) for the Oracle installation. Here's a sample profile that would allocate this space:

install_type    initial_install
system_type     standalone
partitioning    explicit
cluster         SUNWCXall
filesys         c1t0d0s0 5120 /
filesys         c1t0d0s1 2048 swap
filesys         c1t0d0s5 free /u01/app

The script below assumes the following:

  • The existence of an Oracle staging area on your jumpstart server. The location of this is determined by the ORACLE_LOCATION environment variable.
  • A customised responsefile at $ORACLE_LOCATION/response/jumpstart.rsp. I copied the enterprise.rsp sample file supplied by Oracle and modified the following:

    UNIX_GROUP_NAME=dba
    ORACLE_HOME=/u01/app/oracle/product/10.2.0/OHOME1
    ORACLE_HOME_NAME=OHOME1
    RESTART_SYSTEM=false
    s_nameForDBAGrp=dba
    s_nameForOPERGrp=oper
    n_configurationOption=3
    

    For more information on Oracle installation pls check the Oracle documentation

#!/usr/bin/sh

# Oracle installation script for jumpstart

# Create an rc script to install Oracle after reboot 
cat > /a/etc/rc3.d/S99install_oracle <<<<EOM
umask 022
ORACLE_BASE=/u01/app/oracle
ORACLE_VERSION=10.2.0
ORACLE_SID=MYSID

DBA_GID=1000
OINSTALL_GID=1001
OPER_GID=1002
ORACLE_UID=1003

ORACLE_HOME=\\$ORACLE_BASE/product/\\$ORACLE_VERSION/OHOME1
ORACLE_PATH=\\$ORACLE_HOME/bin:.
TNS_ADMIN=\\$ORACLE_HOME/network/admin

# Location of oracle repository on install server
ORACLE_LOCATION=/net/machine/export/software/ora10g/sparc/stage

# Add Oracle user and groups
groupadd -g \\$DBA_GID dba
groupadd -g \\$OINSTALL_GID oinstall
groupadd -g \\$OPER_GID oper

useradd -u \\$ORACLE_UID -g oinstall -G dba,oper -d \\$ORACLE_BASE -s /usr/bin/sh -c "Oracle Default User" oracle

# Configure default Oracle project
projadd -c "Oracle Default Project" group.dba
projmod -sK "project.max-shm-memory=(privileged,2G,deny)" group.dba


mkdir -p \\$ORACLE_BASE
mkdir -p \\$ORACLE_HOME
chown -R oracle:dba \\$ORACLE_BASE

su - oracle -c "cd \\$ORACLE_LOCATION; ./runInstaller -silent -ignoreSysPrereqs -responseFile \\$ORACLE_LOCATION/response/jumpstart.rsp"

# Wait until oracle installation completes
while ps -ef | grep oracle.install | grep -v grep >/dev/null 2>&1
do
        sleep 10
done

\\$ORACLE_BASE/oraInventory/orainstRoot.sh
\\$ORACLE_HOME/root.sh

rm /etc/rc3.d/S99install_oracle
EOM

chmod a+x /a/etc/rc3.d/S99install_oracle


You can find more examples at Sean, Fintan and Eoin's blogs

Comments:

Post a Comment:
Comments are closed for this entry.
About

reniers

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today