.com Solutions Inc. - logo  
Products - Header Buttons
.
Repgen bullet item 7b Installgen bullet item 7b FmPro Migratorbullet item 7b CGIScripter
.
.
.

.
.

Installgen - win901 - Title Graphic

Installgen Features and Benefits

Installgen Demo Available for download...

Bookmark This Page

email a friend

.

#!/bin/bash
# script: 4_macosx_920_prepinstall_1.sh
# Features: This shell script installs the perl Mail::Sendmail module
# creates and installs the Oracle directory within the
# /System/Library/StartupItems directory, installs the
# Oracle startup/shutdown script, oratab file, sets
# permissions/ownership of the mount point directories,
# installs a new /etc/profile file, creates/installs /Volumes/u01/server_scripts
# and rotateoraclefiles.sh files script for rotating/removing
# log files, and updates /etc/hostconfig.
#
# Requirements: Top-level mount point directories must already exist under /Volumes
# prior to running this script. Mount point directories must not contain
# spaces and are created as the volume or disk name entered into the Disk Utility
# when erasing or partitioning disks.
#
# Script Sequence#: 4
# Used By: run manually as root UNIX user
# Copyright 2002 by .com Solutions Inc.
#
# ---------------------- Revision History ---------------
# Date By Changes
# 10-10-2002 dsimpson Initial Release

# This output file was created by Installgen version 1.38 on Sat Nov 23 07:13:32 2002. By .com Solutions Inc. www.dotcomsolutionsinc.net

# define globally used paths/variables
ORACLE_OWNER=oracle
ORACLE_OWNER_PATH=/Users/oracle
ORACLE_GROUP=dba
ORACLE_HOME=/Users/oracle/v920
ORACLE_SID=prod1

ORA_BACKUP_DIR=/Volumes/backup
ORA_ARCHIVE_DIR=/Volumes/archive
ORA_BDUMP_DIR=/Volumes/u01/bdump
ORA_CDUMP_DIR=/Volumes/u01/cdump
ORA_UDUMP_DIR=/Volumes/u01/udump
PATH=/bin:/sbin:/usr/bin:/usr/sbin:$ORACLE_HOME/bin
export PATH

perl_sendmail_filename1=Mail-Sendmail-0.78.tar.gz
perl_sendmail_filename2=Mail-Sendmail-0.78.tar
perl_sendmail_filename3=Mail-Sendmail-0.78

# 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

# Ask whether Mail::Sendmail should be installed.
echo "Install Mail::Sendmail perl module (this module is required for email notifications from within perl programs)?(y/n)"
read answer
if [ "$answer" = "y" ]
then
# install Mail::Sendmail
echo "Installing Mail::Sendmail."
gunzip /Users/oracle/$perl_sendmail_filename1
tar xvf /Users/oracle/$perl_sendmail_filename2
cd /Users/oracle/$perl_sendmail_filename3
perl /Users/oracle/$perl_sendmail_filename3/Makefile.PL
make
make install
echo ""
echo "Please edit the Sendmail.pm file (in the install location listed above) with the correct SMTP server info."
echo ""
echo "Press return key to continue"
read answer

fi

# Ask whether new /etc/profile file should be installed.
echo "Replace existing /etc/profile file?(y/n)"
echo "** This should generally be done to insure **"
echo "** that the correct environment variables are used. **"
read answer
if [ "$answer" = "y" ]
then
# replace /etc/profile with new version
echo "Installing new /etc/profile (backing up old version as /etc/orig-profile)."
mv /etc/profile /etc/orig-profile
cp /Users/oracle/10_macosx_etc_profile_1.sh /etc/profile
chown root:sys /etc/profile
chmod 644 /etc/profile
fi

# Ask whether new /Users/oracle/.bashrc and .bash_profile files should be installed.
echo "Replace existing /Users/oracle/.bashrc and .bash_profile files?(y/n)"
echo "** This should generally be done to insure **"
echo "** that the correct ulimit settings are used. **"
read answer
if [ "$answer" = "y" ]
then
# replace /Users/oracle/.bashrc with new version
echo "Installing new /Users/oracle/.bashrc (backing up old version as /Users/oracle/orig-bashrc)."
echo "Installing new /Users/oracle/.bash_profile (backing up old version as /Users/oracle/orig-bash_profile)."
mv /Users/oracle/.bashrc /Users/oracle/orig-bashrc
mv /Users/oracle/.bash_profile /Users/oracle/orig-bash_profile
cp /Users/oracle/91_macosx_bashrc_1.txt /Users/oracle/.bashrc
cp /Users/oracle/92_macosx_bash_profile_1.txt /Users/oracle/.bash_profile
chown oracle:dba /Users/oracle/.bashrc
chown oracle:dba /Users/oracle/.bash_profile

fi

echo ""
echo "---- Hostnames Currently in NetInfo Directory Service ----"
nicl . -list /machines
echo ""
echo "---- Hostnames to Add to NetInfo Directory Service ----"
echo "Hostname IP Address"
echo ""
echo "g4 10.1.0.20"
echo "ale 10.1.0.13"
echo ""

# Ask whether new hostname entries should be entered into NetInfo.
echo "Add new hostnames to NetInfo Directory Service?(y/n)"
read answer
if [ "$answer" = "y" ]
then
# add new server hostnames to NetInfo
nicl . -create /machines/g4 ip_address 10.1.0.20
nicl . -create /machines/ale ip_address 10.1.0.13
fi

# install non-OEM version of Oracle startup/shutdown script
echo "Installing Oracle startup/shutdown script for Mac OS X as /Library/StartupItems/Oracle/Oracle."
# it may be necessary to create the base StartupItems directory - if it is a new Mac OS X installation
mkdir /Library/StartupItems
# create new startup items directory for Oracle - add Oracle startup script for Mac OS X
mkdir /Library/StartupItems/Oracle
cp /Users/oracle/11_macosx_920_dbora_1.sh /Library/StartupItems/Oracle/Oracle
cp /Users/oracle/90_macosx_StartupParameters_1.plist /Library/StartupItems/Oracle/StartupParameters.plist
chmod 711 /Library/StartupItems/Oracle/Oracle
chown -R root:wheel /Library/StartupItems/Oracle

# create /Volumes/u01/server_scripts directory - add script to rotate log files
mkdir /Volumes/u01/server_scripts
cp /Users/oracle/13_macosx_rotateoraclefiles_1.sh /Volumes/u01/server_scripts/rotateoraclefiles.sh
chown -R $ORACLE_OWNER:$ORACLE_GROUP /Volumes/u01/server_scripts
chmod +x /Volumes/u01/server_scripts/rotateoraclefiles.sh

# Prompt user to add CRON job
echo "Enter the following CRON job entry:"
echo "# ******** Rotate Oracle Server logs nightly at 11:55PM ********"
echo "55 23 * * 0-6 /Volumes/u01/server_scripts/rotateoraclefiles.sh"
echo "-- Press the return key to continue. --"
read answer

# make each mount point owned by oracle:dba
chown -R $ORACLE_OWNER:$ORACLE_GROUP /Volumes/u01
# Check to see if there is a prod1 subdirectory under each mount point
if [ ! -d "/Volumes/u01/prod1" ]
then
echo "Create /Volumes/u01/prod1 directory(y/n)"
read answer
if [ "$answer" = "y" ]
then
mkdir /Volumes/u01/prod1
chown -R $ORACLE_OWNER:$ORACLE_GROUP /Volumes/u01/prod1
fi
fi


# create /Volumes/u02/prod1 directory
if [ ! -d "/Volumes/u02/prod1" ]
then
# directory does not exist - prompt to create /Volumes/u02/prod1 directory
echo ""
echo "Create /Volumes/u02/prod1 directory?(y/n)"
echo ""
read answer
if [ $answer = "y" ]
then
# create /Volumes/u02/prod1 directory
mkdir /Volumes/u02/prod1
chown -R $ORACLE_OWNER:$ORACLE_GROUP /Volumes/u02/prod1
fi
fi

# create /Volumes/u02/prod1 directory
if [ ! -d "/Volumes/u02/prod1" ]
then
# directory does not exist - prompt to create /Volumes/u02/prod1 directory
echo ""
echo "Create /Volumes/u02/prod1 directory?(y/n)"
echo ""
read answer
if [ $answer = "y" ]
then
# create /Volumes/u02/prod1 directory
mkdir /Volumes/u02/prod1
chown -R $ORACLE_OWNER:$ORACLE_GROUP /Volumes/u02/prod1
fi
fi

# create /Volumes/u02/prod1 directory
if [ ! -d "/Volumes/u02/prod1" ]
then
# directory does not exist - prompt to create /Volumes/u02/prod1 directory
echo ""
echo "Create /Volumes/u02/prod1 directory?(y/n)"
echo ""
read answer
if [ $answer = "y" ]
then
# create /Volumes/u02/prod1 directory
mkdir /Volumes/u02/prod1
chown -R $ORACLE_OWNER:$ORACLE_GROUP /Volumes/u02/prod1
fi
fi

# create /Volumes/u03/prod1 directory
if [ ! -d "/Volumes/u03/prod1" ]
then
# directory does not exist - prompt to create /Volumes/u03/prod1 directory
echo ""
echo "Create /Volumes/u03/prod1 directory?(y/n)"
echo ""
read answer
if [ $answer = "y" ]
then
# create /Volumes/u03/prod1 directory
mkdir /Volumes/u03/prod1
chown -R $ORACLE_OWNER:$ORACLE_GROUP /Volumes/u03/prod1
fi
fi

# create /Volumes/u03/prod1 directory
if [ ! -d "/Volumes/u03/prod1" ]
then
# directory does not exist - prompt to create /Volumes/u03/prod1 directory
echo ""
echo "Create /Volumes/u03/prod1 directory?(y/n)"
echo ""
read answer
if [ $answer = "y" ]
then
# create /Volumes/u03/prod1 directory
mkdir /Volumes/u03/prod1
chown -R $ORACLE_OWNER:$ORACLE_GROUP /Volumes/u03/prod1
fi
fi

# create /Volumes/u03/prod1 directory
if [ ! -d "/Volumes/u03/prod1" ]
then
# directory does not exist - prompt to create /Volumes/u03/prod1 directory
echo ""
echo "Create /Volumes/u03/prod1 directory?(y/n)"
echo ""
read answer
if [ $answer = "y" ]
then
# create /Volumes/u03/prod1 directory
mkdir /Volumes/u03/prod1
chown -R $ORACLE_OWNER:$ORACLE_GROUP /Volumes/u03/prod1
fi
fi

# create /Volumes/u03/prod1 directory
if [ ! -d "/Volumes/u03/prod1" ]
then
# directory does not exist - prompt to create /Volumes/u03/prod1 directory
echo ""
echo "Create /Volumes/u03/prod1 directory?(y/n)"
echo ""
read answer
if [ $answer = "y" ]
then
# create /Volumes/u03/prod1 directory
mkdir /Volumes/u03/prod1
chown -R $ORACLE_OWNER:$ORACLE_GROUP /Volumes/u03/prod1
fi
fi

# create /Volumes/u02/prod1 directory
if [ ! -d "/Volumes/u02/prod1" ]
then
# directory does not exist - prompt to create /Volumes/u02/prod1 directory
echo ""
echo "Create /Volumes/u02/prod1 directory?(y/n)"
echo ""
read answer
if [ $answer = "y" ]
then
# create /Volumes/u02/prod1 directory
mkdir /Volumes/u02/prod1
chown -R $ORACLE_OWNER:$ORACLE_GROUP /Volumes/u02/prod1
fi
fi

# create /Volumes/u03/prod1 directory
if [ ! -d "/Volumes/u03/prod1" ]
then
# directory does not exist - prompt to create /Volumes/u03/prod1 directory
echo ""
echo "Create /Volumes/u03/prod1 directory?(y/n)"
echo ""
read answer
if [ $answer = "y" ]
then
# create /Volumes/u03/prod1 directory
mkdir /Volumes/u03/prod1
chown -R $ORACLE_OWNER:$ORACLE_GROUP /Volumes/u03/prod1
fi
fi

# create /Volumes/u02/prod1 directory
if [ ! -d "/Volumes/u02/prod1" ]
then
# directory does not exist - prompt to create /Volumes/u02/prod1 directory
echo ""
echo "Create /Volumes/u02/prod1 directory?(y/n)"
echo ""
read answer
if [ $answer = "y" ]
then
# create /Volumes/u02/prod1 directory
mkdir /Volumes/u02/prod1
chown -R $ORACLE_OWNER:$ORACLE_GROUP /Volumes/u02/prod1
fi
fi

# create /Volumes/u03/prod1 directory
if [ ! -d "/Volumes/u03/prod1" ]
then
# directory does not exist - prompt to create /Volumes/u03/prod1 directory
echo ""
echo "Create /Volumes/u03/prod1 directory?(y/n)"
echo ""
read answer
if [ $answer = "y" ]
then
# create /Volumes/u03/prod1 directory
mkdir /Volumes/u03/prod1
chown -R $ORACLE_OWNER:$ORACLE_GROUP /Volumes/u03/prod1
fi
fi

# create /Volumes/u03/prod1 directory
if [ ! -d "/Volumes/u03/prod1" ]
then
# directory does not exist - prompt to create /Volumes/u03/prod1 directory
echo ""
echo "Create /Volumes/u03/prod1 directory?(y/n)"
echo ""
read answer
if [ $answer = "y" ]
then
# create /Volumes/u03/prod1 directory
mkdir /Volumes/u03/prod1
chown -R $ORACLE_OWNER:$ORACLE_GROUP /Volumes/u03/prod1
fi
fi

# create /Volumes/u02/prod1 directory
if [ ! -d "/Volumes/u02/prod1" ]
then
# directory does not exist - prompt to create /Volumes/u02/prod1 directory
echo ""
echo "Create /Volumes/u02/prod1 directory?(y/n)"
echo ""
read answer
if [ $answer = "y" ]
then
# create /Volumes/u02/prod1 directory
mkdir /Volumes/u02/prod1
chown -R $ORACLE_OWNER:$ORACLE_GROUP /Volumes/u02/prod1
fi
fi


# create /Volumes/u03/prod1 directory for redo log files multiplexed
if [ ! -d "/Volumes/u03/prod1" ]
then
# directory does not exist - prompt to create /Volumes/u03/prod1/redo01g1f2.log directory
echo ""
echo "Create /Volumes/u03/prod1/redo01g1f2.log directory?(y/n)"
echo ""
read answer
if [ $answer = "y" ]
then
# create /Volumes/u03/prod1/redo01g1f2.log directory
mkdir /Volumes/u03/prod1/redo01g1f2.log
chown -R $ORACLE_OWNER:$ORACLE_GROUP /Volumes/u03/prod1/redo01g1f2.log
fi
fi

# create /Volumes/u01/prod1 directory for redo log files multiplexed
if [ ! -d "/Volumes/u01/prod1" ]
then
# directory does not exist - prompt to create /Volumes/u01/prod1/redo02g2f2.log directory
echo ""
echo "Create /Volumes/u01/prod1/redo02g2f2.log directory?(y/n)"
echo ""
read answer
if [ $answer = "y" ]
then
# create /Volumes/u01/prod1/redo02g2f2.log directory
mkdir /Volumes/u01/prod1/redo02g2f2.log
chown -R $ORACLE_OWNER:$ORACLE_GROUP /Volumes/u01/prod1/redo02g2f2.log
fi
fi

# create /Volumes/u02/prod1 directory for redo log files multiplexed
if [ ! -d "/Volumes/u02/prod1" ]
then
# directory does not exist - prompt to create /Volumes/u02/prod1/redo03g3f2.log directory
echo ""
echo "Create /Volumes/u02/prod1/redo03g3f2.log directory?(y/n)"
echo ""
read answer
if [ $answer = "y" ]
then
# create /Volumes/u02/prod1/redo03g3f2.log directory
mkdir /Volumes/u02/prod1/redo03g3f2.log
chown -R $ORACLE_OWNER:$ORACLE_GROUP /Volumes/u02/prod1/redo03g3f2.log
fi
fi


# create /Volumes/u01/prod1 directory for redo log files
if [ ! -d "/Volumes/u01/prod1" ]
then
# directory does not exist - prompt to create /Volumes/u01/prod1/redo01.log directory
echo ""
echo "Create /Volumes/u01/prod1/redo01.log directory?(y/n)"
echo ""
read answer
if [ $answer = "y" ]
then
# create /Volumes/u01/prod1/redo01.log directory
mkdir /Volumes/u01/prod1/redo01.log
chown -R $ORACLE_OWNER:$ORACLE_GROUP /Volumes/u01/prod1/redo01.log
fi
fi

# create /Volumes/u02/prod1 directory for redo log files
if [ ! -d "/Volumes/u02/prod1" ]
then
# directory does not exist - prompt to create /Volumes/u02/prod1/redo02.log directory
echo ""
echo "Create /Volumes/u02/prod1/redo02.log directory?(y/n)"
echo ""
read answer
if [ $answer = "y" ]
then
# create /Volumes/u02/prod1/redo02.log directory
mkdir /Volumes/u02/prod1/redo02.log
chown -R $ORACLE_OWNER:$ORACLE_GROUP /Volumes/u02/prod1/redo02.log
fi
fi

# create /Volumes/u03/prod1 directory for redo log files
if [ ! -d "/Volumes/u03/prod1" ]
then
# directory does not exist - prompt to create /Volumes/u03/prod1/redo03.log directory
echo ""
echo "Create /Volumes/u03/prod1/redo03.log directory?(y/n)"
echo ""
read answer
if [ $answer = "y" ]
then
# create /Volumes/u03/prod1/redo03.log directory
mkdir /Volumes/u03/prod1/redo03.log
chown -R $ORACLE_OWNER:$ORACLE_GROUP /Volumes/u03/prod1/redo03.log
fi
fi


# create /Volumes/u01/prod1 directory for controlfiles
if [ ! -d "/Volumes/u01/prod1" ]
then
# directory does not exist - prompt to create /Volumes/u01/prod1/control01.ctl directory
echo ""
echo "Create /Volumes/u01/prod1/control01.ctl directory?(y/n)"
echo ""
read answer
if [ $answer = "y" ]
then
# create /Volumes/u01/prod1/control01.ctl directory
mkdir /Volumes/u01/prod1/control01.ctl
chown -R $ORACLE_OWNER:$ORACLE_GROUP /Volumes/u01/prod1/control01.ctl
fi
fi

# create /Volumes/u02/prod1 directory for controlfiles
if [ ! -d "/Volumes/u02/prod1" ]
then
# directory does not exist - prompt to create /Volumes/u02/prod1/control02.ctl directory
echo ""
echo "Create /Volumes/u02/prod1/control02.ctl directory?(y/n)"
echo ""
read answer
if [ $answer = "y" ]
then
# create /Volumes/u02/prod1/control02.ctl directory
mkdir /Volumes/u02/prod1/control02.ctl
chown -R $ORACLE_OWNER:$ORACLE_GROUP /Volumes/u02/prod1/control02.ctl
fi
fi

# create /Volumes/u03/prod1 directory for controlfiles
if [ ! -d "/Volumes/u03/prod1" ]
then
# directory does not exist - prompt to create /Volumes/u03/prod1/control03.ctl directory
echo ""
echo "Create /Volumes/u03/prod1/control03.ctl directory?(y/n)"
echo ""
read answer
if [ $answer = "y" ]
then
# create /Volumes/u03/prod1/control03.ctl directory
mkdir /Volumes/u03/prod1/control03.ctl
chown -R $ORACLE_OWNER:$ORACLE_GROUP /Volumes/u03/prod1/control03.ctl
fi
fi



if [ ! -d "/Volumes/archive" ]
then
echo "Create /Volumes/archive directory(y/n)"
read answer
if [ "$answer" = "y" ]
then
mkdir /Volumes/archive
chown -R $ORACLE_OWNER:$ORACLE_GROUP /Volumes/archive
fi
fi
if [ ! -d "/Volumes/backup" ]
then
echo "Create /Volumes/backup directory(y/n)"
read answer
if [ "$answer" = "y" ]
then
mkdir /Volumes/backup

# create UTL_FILE_DIR within /Volumes/backup directory
mkdir /Volumes/backup/oracle_utl_file_dir
chown -R $ORACLE_OWNER:$ORACLE_GROUP /Volumes/backup

fi
fi

if [ ! -d "/Volumes/u01/bdump" ]
then
echo "Create /Volumes/u01/bdump directory(y/n)"
read answer
if [ "$answer" = "y" ]
then
mkdir /Volumes/u01/bdump
chown -R $ORACLE_OWNER:$ORACLE_GROUP /Volumes/u01/bdump
fi
fi

if [ ! -d "/Volumes/u01/cdump" ]
then
echo "Create /Volumes/u01/cdump directory(y/n)"
read answer
if [ "$answer" = "y" ]
then
mkdir /Volumes/u01/cdump
chown -R $ORACLE_OWNER:$ORACLE_GROUP /Volumes/u01/cdump
fi
fi

if [ ! -d "/Volumes/u01/udump" ]
then
echo "Create /Volumes/u01/udump directory(y/n)"
read answer
if [ "$answer" = "y" ]
then
mkdir /Volumes/u01/udump
chown -R $ORACLE_OWNER:$ORACLE_GROUP /Volumes/u01/udump
fi
fi


if [ ! -d "$ORACLE_HOME" ]
then
echo "Create Oracle Home directory as $ORACLE_HOME(y/n)"
read answer
if [ "$answer" = "y" ]
then
mkdir $ORACLE_HOME
mkdir $ORACLE_HOME/plsql_compiled_code

# create 1000 compiled code subdirectories for Oracle to use
echo "Creating 1000 plsql compiled code subdirectories within the $ORACLE_HOME/plsql_compiled_code directory ..."
loop1=0
while [ $loop1 -lt 1000 ]
do
echo "$ORACLE_HOME/plsql_compiled_code/d$loop1"
mkdir $ORACLE_HOME/plsql_compiled_code/d$loop1
loop1=`expr $loop1 + 1`
done

echo "Setting ownership of $ORACLE_HOME directory to $ORACLE_OWNER:$ORACLE_GROUP ..."
chown -R $ORACLE_OWNER:$ORACLE_GROUP $ORACLE_HOME
fi
fi


# print PORTMAP and RPCSERVER config lines within /etc/hostconfig file
cat /etc/hostconfig | grep PORTMAP
cat /etc/hostconfig | grep RPCSERVER

echo ""
echo "Edit /etc/hostconfig automatically with PORTMAP and RPCSERVER info:?(y/n)"
echo "The PORTMAP and RPCSERVER lines should contain -YES- within the /etc/hostconfig file."
echo "If these lines were found, they will be printed above."
echo ""
read answer

if [ "$answer" = "y" ]
then
# copy existing /etc/hostconfig file as a backup
echo "Backing up /etc/hostconfig as /etc/orig-hostconfig"
cp /etc/hostconfig /etc/orig-hostconfig
chown root:wheel /etc/orig-hostconfig
chmod 611 /etc/orig-hostconfig
# append new info to /etc/hostconfig
echo "Appending new info to /etc/hostconfig file."
echo "PORTMAP=-YES-" >> /etc/hostconfig
echo "RPCSERVER=-YES-" >> /etc/hostconfig
fi

echo ""
echo "Start the 5_macosx_920_prep_copyoracle_cds_1.sh script to copy the Oracle installation files from CD."
echo ""
echo "(If you have any terminal sessions logged in using the "
echo "oracle account, please re-login in order to make"
echo "use of the updated environment variables and ulimit parameters.)"
echo ""
echo "Press the Return key to continue."
echo ""
read answer

# copy new version of oratab file to /etc/oratab
cp /Users/oracle/46_macosx_oratab_1.txt /etc/oratab
chown oracle:dba /etc/oratab

# create installer inventory directory
mkdir /Users/oracle/v920/oraInventory
chown oracle:dba /Users/oracle/v920/oraInventory



.

hline

. .

.

. .
 

Home | Products | Services | Downloads | Order | Support | Contact

Legal Notices

.
.   .
.
Home Products Services Downloads Order Support Contact