
Installgen
Features and Benefits
Installgen
Demo Available for download...

#!/bin/sh
# script: 5_sol_901_prep_copyoracle_cds_1.sh
# Features: This shell script requests for each of the Oracle 9.0.1EE (32bit)
# install CDs to be inserted into the CD ROM drive,
# then copies the contents to the hard drive of the server.
# NFS mount points are then created so that the data can then
# be copied thru the network to build the OEM server.
#
# Script Sequence#: 5
# Used By: run manually by DBA as root UNIX user
# Copyright 2002 by .com Solutions Inc.
#
# ---------------------- Revision History ---------------
# Date By Changes
# 9-27-2001 dsimpson Initial Release
# 9-30-2001 dsimpson Added use of environment variables for paths
# 5-02-2002 dsimpson Added 64bit installation changes.
# 11-02-2002 dsimpson Added support for Oracle 9.2.0 32/64bit CDs.
# This output file was created by Installgen version 1.38 on Sun Nov 10 14:51:56 2002. By .com Solutions Inc. www.dotcomsolutionsinc.net
# define globally used paths/variables
#ORACLE_OWNER=oracle
ORACLE_OWNER_PATH=/export/oracle
ORACLE_GROUP=dba
#ORACLE_HOME=/u01/v901
#ORACLE_SID=prod1
cd1_directory=$ORACLE_OWNER_PATH/901_cd1
cd2_directory=$ORACLE_OWNER_PATH/901_cd2
cd3_directory=$ORACLE_OWNER_PATH/901_cd3
oracle_cd_name1=orcl901_1
oracle_cd_name2=orcl901_2
oracle_cd_name3=orcl901_3
cd1_nfs_directory=$ORACLE_OWNER_PATH/901_cd1_nfs
cd2_nfs_directory=$ORACLE_OWNER_PATH/901_cd2_nfs
cd3_nfs_directory=$ORACLE_OWNER_PATH/901_cd3_nfs
# make sure the root user is running this script
if [ ! $LOGNAME = "root" ]
then
# the user running this script is not root - exit
echo "You must be logged in as the root user to run this script, exiting...."
# exit immediately!
exit
fi
echo "Please insert Oracle 9.0.1 (32bit) CD #1 of 3 - then press the Return key."
read answer
echo "This task takes about 8 minutes with a fast CD ROM drive."
# create directories for the contents of the CDs
mkdir $cd1_directory
chown -R $ORACLE_OWNER:$ORACLE_GROUP $cd1_directory
mkdir $cd2_directory
chown -R $ORACLE_OWNER:$ORACLE_GROUP $cd2_directory
mkdir $cd3_directory
chown -R $ORACLE_OWNER:$ORACLE_GROUP $cd3_directory
# copy CD contents with tar to preserve permissions
cd /cdrom/$oracle_cd_name1; tar cf - . | (cd $cd1_directory ; tar xfp -)
cd $ORACLE_OWNER_PATH
eject cdrom
echo "Please insert Oracle 9.0.1 (32bit) CD #2 of 3 - then press the Return key."
read answer
echo "This task takes about 4 minutes with a fast CD ROM drive."
# copy CD contents with tar to preserve permissions
cd /cdrom/$oracle_cd_name2; tar cf - . | (cd $cd2_directory ; tar xfp -)
cd $ORACLE_OWNER_PATH
eject cdrom
echo "Please insert Oracle 9.0.1 (32bit) CD #3 of 3 - then press the Return key."
read answer
echo "This task takes about 2 minutes with a fast CD ROM drive."
# copy CD contents with tar to preserve permissions
cd /cdrom/$oracle_cd_name3; tar cf - . | (cd $cd3_directory ; tar xfp -)
cd $ORACLE_OWNER_PATH
eject cdrom
# make a backup copy the /etc/dfs/dfstab file
cp /etc/dfs/dfstab /etc/dfs/orig-dfstab
chown root:sys /etc/dfs/orig-dfstab
chmod 644 /etc/dfs/orig-dfstab
# append the following commands to the dfstab file so nfs server will start
echo "share -F nfs -o ro=ale $cd1_directory" >> /etc/dfs/dfstab
echo "share -F nfs -o ro=ale $cd2_directory" >> /etc/dfs/dfstab
echo "share -F nfs -o ro=ale $cd3_directory" >> /etc/dfs/dfstab
# start up nfs server
/etc/rc3.d/S15nfs.server start
# check to make sure that the data is shared
echo "The following NFS shares have been created:"
dfshares
# give the user permission to display the Oracle java installer window
xhost + localhost

