Friday June 02, 2006 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:
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