install oracle8i on linux

 http://www.computerengineering.ca/support/howto.php

 

 

C:/oinstalltools-1.0>dir
 驱动器 C 中的卷是 system
 卷的序列号是 14D9-EE58

 C:/oinstalltools-1.0 的目录

2008-12-13  16:35    <DIR>          .
2008-12-13  16:35    <DIR>          ..
2000-10-06  06:10             6,746 dbstart
2000-11-16  08:19             5,719 initdev.ora
2000-10-06  06:10             1,129 listener8i
2000-11-16  23:31             2,373 oinstallstage1.sh
2000-11-16  23:33             1,081 oinstallstage2.sh
2000-11-16  23:26            25,099 ORACLE-8.1.6.1-HOWTO
2000-10-06  06:10             1,342 oracle8i
2000-11-16  08:13               402 oraenv
2000-10-06  06:10               210 oratab.ed
               9 个文件         44,101 字节
               2 个目录  4,289,011,712 可用字节

C:/oinstalltools-1.0>

 

 

【dbstart】:

:
#
# $Header: dbstart.sh.pp 09-dec-99.09:51:46 mdenney Exp $ dbstart.sh.pp Copyr (c) 1991 Oracle
#

###################################
#
# usage: dbstart
#
# This script is used to start ORACLE from /etc/rc(.local).
# It should ONLY be executed as part of the system boot procedure.
#
#####################################

ORATAB=/etc/oratab

trap 'exit' 1 2 3
case $ORACLE_TRACE in
    T)  set -x ;;
esac

# Set path if path not set (if called from /etc/rc)
case $PATH in
    "") PATH=/bin:/usr/bin:/etc
        export PATH ;;
esac

#
# Loop for every entry in oratab file and and try to start
# that ORACLE
#

cat $ORATAB | while read LINE
do
    case $LINE in
        /#*)            ;;      #comment-line in oratab
        *)
#       Proceed only if third field is 'Y'.
        if [ "`echo $LINE | awk -F: '{print $3}' -`" = "Y" ] ; then
            ORACLE_SID=`echo $LINE | awk -F: '{print $1}' -`
            if [ "$ORACLE_SID" = '*' ] ; then
                ORACLE_SID=""
            fi
#           Called programs use same database ID
            export ORACLE_SID
            ORACLE_HOME=`echo $LINE | awk -F: '{print $2}' -`
#           Called scripts use same home directory
            export ORACLE_HOME
#           Put $ORACLE_HOME/bin into PATH and export.
            PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/etc ; export PATH
#           add for bug # 652997
            LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${ORACLE_HOME}/lib ; export LD_LIBRARY_PATH

            PFILE=${ORACLE_HOME}/dbs/init${ORACLE_SID}.ora

#       Figure out if this is a V5, V6, or V7 database. Do we really need V5?
            if [ -f $ORACLE_HOME/bin/sqldba ] ; then
                VERSION=`$ORACLE_HOME/bin/sqldba command=exit | awk '
                        /SQL/*DBA: (Release|Version)/ {split($3, V, ".") ;
                        print V[1]}'`

            else
                if test -f $ORACLE_HOME/bin/svrmgrl; then
# 2000/06/19 Blair Lowe change change $3 to $5 and look at the first
#                       as per oratechnet tip. Also use a different search
#                       string since PL/SQL is no longer in the name.
                    VERSION=`$ORACLE_HOME/bin/svrmgrl command=exit | awk '
                        /Oracle8i/ {substr($5,1,3) ;
                        print substr($5,1,3)}'`
                else
                        VERSION="8.2"
                fi
            fi

            STATUS=1
            if [ "$VERSION" = "8.1" ]
                then
                pmon=`ps -ef | egrep pmon_$ORACLE_SID  | grep -v grep`
                if [ "$pmon" != "" ];
                then
                  STATUS="-1"
                  echo "Database /"${ORACLE_SID}/" already started."
                fi
            else
                if test -f $ORACLE_HOME/dbs/sgadef${ORACLE_SID}.dbf -o /
                     -f $ORACLE_HOME/dbs/sgadef${ORACLE_SID}.ora
              then
                  STATUS="-1"
              else
                  STATUS=1
              fi
            fi

            case $STATUS in
                1)  if [ -f $PFILE ] ; then
                        case $VERSION in
                            6)  sqldba command=startup
                                ;;

                            7)  sqldba <<EOF
connect internal
startup
EOF
                                ;;

                           7.3) svrmgrl <<EOF
connect internal
startup
EOF
                                ;;
                           8.0) svrmgrl <<EOF
connect internal
startup
EOF
                                ;;
                           8.1) sqlplus /nolog <<EOF
connect internal
startup
EOF
                                ;;
                        esac

                        if test $? -eq 0 ; then
                            echo ""
                            echo "Database /"${ORACLE_SID}/" warm started."
                        else
                            echo ""
                            echo "Database /"${ORACLE_SID}/" NOT started."
                        fi
                    else
                        echo ""
                        echo "Can't find init file for Database /"${ORACLE_SID}/"."
                        echo "Database /"${ORACLE_SID}/" NOT started."
                    fi
                    ;;

                -1) echo ""
                    echo "Database /"${ORACLE_SID}/" possibly left running when system went down (system crash?)."
                    echo "Notify Database Administrator."
                    case $VERSION in
                        6)  sqldba "command=shutdown abort"
                            ;;

                        7)  sqldba <<EOF
connect internal
shutdown abort
EOF
                            ;;

                      7.3)  svrmgrl <<EOF
connect internal
shutdown abort
EOF
                            ;;
                      8.0) svrmgrl <<EOF
connect internal
shutdown abort
EOF
                            ;;
                      8.1) sqlplus /nolog <<EOF
connect internal
shutdown abort
EOF
                            ;;

                    esac

                    if test $? -eq 0 ; then
                        if [ -f $PFILE ] ; then
                            case $VERSION in
                                6)  sqldba command=startup
                                    ;;

                                7)  sqldba <<EOF
connect internal
startup
EOF
                                    ;;
                              7.3)  svrmgrl <<EOF
connect internal
startup
EOF
                                    ;;
                              7.3)  svrmgrl <<EOF
connect internal
startup
EOF
                                    ;;
                              8.0) svrmgrl <<EOF
connect internal
startup
EOF
                                    ;;
                              8.1) sqlplus /nolog <<EOF
connect internal
startup
EOF
                                    ;;

                            esac
                            if test $? -eq 0 ; then
                                echo ""
                                echo "Database /"${ORACLE_SID}/" warm started."
                            else
                                echo ""
                                echo "Database /"${ORACLE_SID}/" NOT started."
                            fi
                        else
                            echo ""
                            echo "Can't find init file for Database /"${ORACLE_SID}/"."
                            echo "Database /"${ORACLE_SID}/" NOT started."
                        fi
                    else
                        echo "Database /"${ORACLE_SID}/" NOT started."
                    fi
                    ;;
            esac
        fi
        ;;
    esac
done

 

【initdev.ora】:

 

#
# Copyright (c) 1991, 1998 by Oracle Corporation
#
##############################################################################
# Example INIT.ORA file
#
# This file is provided by Oracle Corporation to help you customize
# your RDBMS installation for your site.  Important system parameters
# are discussed, and example settings given.
#
# Some parameter settings are generic to any size installation.
# For parameters that require different values in different size
# installations, three scenarios have been provided: SMALL, MEDIUM
# and LARGE.  Any parameter that needs to be tuned according to
# installation size will have three settings, each one commented
# according to installation size.
#
# Use the following table to approximate the SGA size needed for the
# three scenarious provided in this file:
#
#                     -------Installation/Database Size------
#                      SMALL           MEDIUM           LARGE
#  Block         2K    4500K            6800K           17000K
#  Size          4K    5500K            8800K           21000K
#
# To set up a database that multiple instances will be using, place
# all instance-specific parameters in one file, and then have all
# of these files point to a master file using the IFILE command.
# This way, when you change a public
# parameter, it will automatically change on all instances.  This is
# necessary, since all instances must run with the same value for many
# parameters. For example, if you choose to use private rollback' segments,
# these must be specified in different files, but since all gc_*
# parameters must be the same on all instances, they should be in one file.
#
# INSTRUCTIONS: Edit this file and the other INIT files it calls for
# your site, either by using the values provided here or by providing
# your own.  Then place an IFILE= line into each instance-specific
# INIT file that points at this file.
#
# NOTE: Parameter values suggested in this file are based on conservative
# estimates for computer memory availability. You should adjust values upward
# for modern machines.
#
###############################################################################

db_name = "prod"
instance_name = prod

service_names = prod


control_files = ("/u01/app/oracle/oradata/prod/control01.ctl", "/u01/app/oracle/oradata/prod/control02.ctl", "/u01/app/oracle/oradata/prod/control03.ctl")

# 2000/06/22  Adelaide Yip  Oracle8i EE (8.1.6)
# Copyright; Computer Engineering Inc. 2000
# changes: open_cursors value originally set to 100; change made as per
#         
http://dev.arsdigita.com/ad-training/acs-install/oracle.html

open_cursors = 500
max_enabled_roles = 30
db_block_buffers = 2048

shared_pool_size = 52428800

large_pool_size = 614400
java_pool_size = 20971520

log_checkpoint_interval = 10000
log_checkpoint_timeout = 1800

processes = 100

log_buffer = 163840

# audit_trail = false  # if you want auditing
# timed_statistics = false  # if you want timed statistics
# max_dump_file_size = 10000  # limit trace file size to 5M each

# Uncommenting the lines below will cause automatic archiving if archiving has
# been enabled using ALTER DATABASE ARCHIVELOG.
# log_archive_start = true
# log_archive_dest_1 = "location=/u01/app/oracle/admin/prod/arch"
# log_archive_format = arch_%t_%s.arc


#DBCA uses the default database value (30) for max_rollback_segments
#100 rollback segments (or more) may be required in the future
#Uncomment the following entry when additional rollback segments are created and made online
#max_rollback_segments = 31
# If using private rollback segments, place lines of the following
# form in each of your instance-specific init.ora files:
#rollback_segments = ( RBS0, RBS1, RBS2, RBS3, RBS4, RBS5, RBS6, RBS7, RBS8, RBS9, RBS10, RBS11, RBS12, RBS13, RBS14, RBS15, RBS16, RBS17, RBS18, RBS19, RBS20, RBS21, RBS22, RBS23, RBS24, RBS25, RBS26, RBS27, RBS28 )

# Global Naming -- enforce that a dblink has same name as the db it connects to
# global_names = false

# Uncomment the following line if you wish to enable the Oracle Trace product
# to trace server activity.  This enables scheduling of server collections
# from the Oracle Enterprise Manager Console.
# Also, if the oracle_trace_collection_name parameter is non-null,
# every session will write to the named collection, as well as enabling you
# to schedule future collections from the console.
# oracle_trace_enable = true

# define directories to store trace and alert files
background_dump_dest = /u01/app/oracle/admin/prod/bdump
core_dump_dest = /u01/app/oracle/admin/prod/cdump
#Uncomment this parameter to enable resource management for your database.
#The SYSTEM_PLAN is provided by default with the database.
#Change the plan name if you have created your own resource plan.# resource_manager_plan = system_plan
user_dump_dest = /u01/app/oracle/admin/prod/udump

db_block_size = 4096

remote_login_passwordfile = exclusive

os_authent_prefix = ""

# The following parameters are needed for the Advanced Replication Option
job_queue_processes = 4
job_queue_interval = 60
distributed_transactions = 10
open_links = 4

mts_dispatchers = "(PROTOCOL=TCP)(PRE=oracle.aurora.server.SGiopServer)"
# Uncomment the following line when your listener is configured for SSL
# (listener.ora and sqlnet.ora)
# mts_dispatchers = "(PROTOCOL=TCPS)(PRE=oracle.aurora.server.SGiopServer)"

compatible = "8.1.0"
sort_area_size = 65536
sort_area_retained_size = 65536

# 2000/06/22  Adelaide Yip  Oracle8i EE (8.1.6)
# Copyright; Computer Engineering Inc. 2000
# changes: added following line, as per
http://dev.arsdigita.com/ad-training/
#          acs-install/oracle.html, to define nls_date_format

nls_date_format = "YYYY-MM-DD"

 

【listener8i】:

 

 

#!/bin/sh
# 2000/04/02 Blair Lowe create
# 2000/06/27  Adelaide Yip  change for 8.1.6
#
# Copyright (C) 2000 Computer Engineering Inc. ALL RIGHTS RESERVED.
#
# chkconfig: 345 51 49
# description: startup and shutdown the Oracle 8i listener
#
echo "Oracle 8i listener start/stop"

ORA_OWNER=oracle
# 2000/06/27  Adelaide Yip  Oracle8i EE (8.1.6) listener
# Copyright (c) Computer Engineering Inc. 2000.  All rights reserved.
#
# changes: ORA_HOME originally /ora8/m01/app/oracle/product/8.1.6
ORA_HOME=/u01/app/oracle/product/8.1.6

case "$1" in
   'start')
       # Start the listener
        echo -n "Starting the Listener for 8i: "
        su - $ORA_OWNER -c $ORA_HOME/bin/startlsnr
        echo
        ;;
   'stop')

        # Stop the listener
        echo -n "Shutting down Listener for 8i: "
        su - $ORA_OWNER -c $ORA_HOME/bin/stoplsnr
        echo
        ;;

   'restart')
        # Restart the Oracle databases:
        echo -n "Restarting Listener for 8i: "
        $0 stop
        $0 start
        echo
        ;;

   *)
        echo "Usage: listener8i [ start | stop | restart }"
        exit 1
   esac
exit 0

 

【oinstallstage1.sh】:

 

#!/bin/sh
# 2000/10/04 Blair Lowe create
# 2000/11/14 Blair Lowe split into two scripts
#
# Copyright (C) 2000 Computer Engineering Inc. All Rights Reserved
#
# DESCRIPTION: sets up the environment, and runs the installation
# script for LINUX.
#
# CALLING TECHNIQUE: oinstallstage1.sh [remote IP address]

# Set the remote ip to the second parameter passed in (or null) unless
# the value of REMOTEIP is set in the environment's shell.
# The remote ip should be the ip address of the remote machine
# that you are running x windows on (unless the machine is the
# one you are wooking on in which case no value is required.
REMOTEIP=${REMOTEIP="$1"}

# A CD install is assumed, otherwise, set the env variable OINSTALLMEDIA
# to "TARBALL" and export it. Value is saved in a file to allow
# access from other user shells below.
echo "$OINSTALLMEDIA" > /tmp/oinstall-media

# Value is saved in a file to allow access from other user shells below.
echo $REMOTEIP > /tmp/oinstall-remoteip

export DISPLAY=`cat /tmp/oinstall-remoteip 2> /dev/null`:0

if [ "`cat /tmp/oinstall-media 2> /dev/null`" != "TARBALL" ]; then
   if [ "`mount | grep cdrom`" = "" ]; then
      mount /mnt/cdrom
   fi
else
   #
   if [ ! -f /home/oracle/oracle8161.tar.gz ]; then
      echo "ERROR: copy the download file /"oracle8161.tar.gz/" to /home/oracle and start again"
      exit 1
   fi
   chown oracle /home/oracle/oracle8161.tar.gz
   chgrp dba /home/oracle/oracle8161.tar.gz
fi
kterm -title "Use this terminal when the OUI prompts for the root.sh script" &
if [ -f /etc/oratab ]; then
   mv /etc/oratab /etc/oratab.bak
fi
if [ ! -e /u01 ]; then
   ln -s /home/oracle/u01 /u01
fi
if [ ! -e /u02 ]; then
   ln -s /home/oracle/u02 /u02
fi
if [ ! -e /u03 ]; then
   ln -s /home/oracle/u03 /u03
fi
if [ ! -e /u04 ]; then
   ln -s /home/oracle/u04 /u04
fi
su - oracle > /home/oracle/stage1.out 2>&1 <<!EOF
export DISPLAY=`cat /tmp/oinstall-remoteip`:0
umask 022
. /etc/oraenv
if [ ! -d /home/oracle/u01 ]; then
   mkdir /home/oracle/u01
fi
if [ ! -d /home/oracle/u02 ]; then
   mkdir /home/oracle/u02
fi
if [ ! -d /home/oracle/u03 ]; then
   mkdir /home/oracle/u03
fi
if [ ! -d /home/oracle/u04 ]; then
   mkdir /home/oracle/u04
fi
if [ "`cat oinstall-media 2> /dev/null`" != "TARBALL" ]; then
/mnt/cdrom/install/linux/runInstaller
else
/home/oracle/Oracle8iR2/install/linux/runInstaller
fi
!EOF

 

【oinstallstage2.sh】:

 

#!/bin/sh
# 2000/10/04 Blair Lowe create
#
# Copyright (C) 2000 Computer Engineering Inc. All Rights Reserved
#
# DESCRIPTION: sets up the environment, and runs the dbassist
# program for LINUX. RUN oinstallstage1.sh first (and check processes
# to make sure everything is ok too).
#
# CALLING TECHNIQUE: oinstallstage2.sh

su - oracle /home/oracle/stage2.out 2>&1 <<!EOF
export DISPLAY=`cat /tmp/oinstall-remoteip`:0
umask 022
/u01/app/oracle/product/8.1.6/bin/dbassist
!EOF
echo -n press return when dbassist has completed:
read ANSWER2
su - oracle <<!EOF
export DISPLAY=`cat /tmp/oinstall-remoteip 2> /dev/null`:0
Version=1.0
umask 022
cp -f /usr/local/src/SOURCES/oinstalltools-/$Version/initdev.ora /u01/app/oracle/admin//$ORACLE_SID/pfile/initdev.ora
ed /etc/oratab < /usr/local/src/SOURCES/oinstalltools-/$Version/oratab.ed
cp -f /usr/local/src/SOURCES/oinstalltools-/$Version/dbstart /u01/app/oracle/product/8.1.6/bin/dbstart
cd /u01/app/oracle/product/8.1.6/assistants/dbca/jlib
/u01/app/oracle/product/8.1.6/assistants/dbca/sqldev.sh > /home/oracle/sqldev.out 2>&1
!EOF

 

【oracle8i】:

 

#!/bin/sh
# 2000/04/02 Blair Lowe create
#
# Computer Engineering Inc. (C) 2000 ALL RIGHTS RESERVED.
#
# chkconfig: - 84 50
# description: startup and shutdown the Oracle 8i listener
# help: Set ORA_HOME to be equivalent to the ORACLE_HOME from which you wish to execute dbstart and dbshut set ORA_OWNER to the user id of the owner of the Oracle database in ORA_HOME
#
# set ORA_OWNER to the user id of the owner of the Oracle database in ORA_HOME

ORA_HOME=/u01/app/oracle/product/8.1.6
ORA_OWNER=oracle

if [ ! -f $ORA_HOME/bin/dbstart ]
then
   echo "Oracle startup: cannot start"
   exit
fi

case "$1" in
'start')
   # Start the Oracle databases:
   # The following command assumes that the oracle login will not prompt the
   # user for any values
   echo -n "Starting Oracle8i: "
   su - $ORA_OWNER -c $ORA_HOME/bin/dbstart &
   touch /var/lock/subsys/oracle8i
   echo
;;
'stop')
   # Stop the Oracle databases:
   # The following command assumes that the oracle login will not prompt the
   # user for any values
   echo -n "Shutting down Oracle8i: "
   su - $ORA_OWNER -c $ORA_HOME/bin/dbshut
   rm -f /var/lock/subsys/oracle8i
   echo
;;
'restart')
   # Restart the Oracle databases:
   echo -n "Retarting Oracle8i: "
   $0 stop
   $0 start
   echo
;;
*)
   echo "Usage: oracle8i { start | stop | restart }"
   exit 1
;;
esac
exit 0

 

【ORACLE-8.1.6.1-HOWTO】:

 

HOWTO: Oracle 8i EE Release 2 (8.1.6) Installation for Linux
2000/08/08 Adelaide Yip create
2000/10/03 Blair Lowe change
2000/11/14 Blair Lowe change

Copyright (c) 2000 Computer Engineering Inc.  All rights reserved.

I. Purpose

This HOWTO will help guide you through Oracle8i (8.1.6) complex installation.
This installation is very long and tricky.  The selections stated in the
procedures were specifically made to avoid the Oracle installation bugs.
This document can be used by all Oracle users as it is written in an
step-by-step manner.

Everything was developed and tested on an Ix86 Red Hat (6.2) platform, but
there is no reason why it could not be tried on other linux platforms, or
other Red Hat versions. If you do get it to work with something else, please
send us your modifications or your OK on that platform.

If you have any questions, comments or suggestions, email us at
mailto:howto@compeng.net.


II. Pre-Installation

Familiarise yourself with the bash shell. You will not be able to install
ORACLE 8.1.6.1 without using a shell, so ORACLE's decision to provide a gui
(Graphical User Interface) is really sort of a waste of time, and effort but
looks quite slick none the less.

First, check that your machine has enough memory and disk space to install
Oracle8i.  The installation will use up to a maximum of 1000 MB of disk space
and about 256 MB of memory (RAM).

In a shell/ console (as root) type:
   df -k
, or
   df -m

These commands will describe the amount of disk space on your machine and is
beyond the scope of this document. Type "man df" to learn more.

To view memory information, at the same shell/console, type:
cat /proc/meminfo

The important number is the SwapTotal. This number should be > 250 Mb.

To ensure a good install, we must prepare the environment by adding the
required users, groups, directories and links. 

In a shell as root user:
   groupadd dba
   groupadd oinstall
   groupadd oracle
   useradd -g dba -G oinstall oracle
   passwd oracle                    #create "oracle" user's password
   mkdir /usr/local/jre116_v5
   ln -s /usr/local/jre116_v5 /usr/local/jre

Check that "gmake" command is available:
   cd /usr/bin
   ls -al gmake

If "gmake" command does not exist, then create a link form "make" to "gmake":
   ls -s /usr/bin/make /usr/bin/gmake
   exit

Obtain Oracle 8i Enterprise Edition Release 2, version 8.1.6 download (>250 MB)
from either the net or from a CD:

The net:
 http://technet.oracle.com/software/products/oracle8i/software_index.htm
 ftp://ftp.oracle.com/pub/www.otn/linux/oracle8i/oracle8161_tar.gz.

Save as "/home/oracle/oracle8161.tar.gz".

The CD: just put it in your CD tray.

Unlike version 8.1.5, in this latest version of Oracle8i (8.1.6), it is
unnecessary to download JRE (Java Runtime Environment) as it is already
shipped within the download.

get our tarball of tools:
http://www.compeng.net/downloads/oratarball-{version}.tar.gz

type the following:

mkdir -p /usr/local/src/SOURCES
cd /usr/local/src/SOURCES
tar -zxvf <path to the tarball you just got>/oratarball-{version}.tar.gz
cd oinstalltools-{version}
#Create the required Oracle8i environment variables:
cp oraenv /etc
<end typing>

**Note: Do NOT define NLS_LANG environment variable as it causes the
installation to fail and alters Oracle's date settings.

Set the newly created environment variables:
   . /etc/oraenv

Test that the environment variables are set properly:
   echo $ENVIRONMENT_VARIABLE #eg. echo $ORACLE_HOME
   env           #displays machine's list of environment variables

Add the following lines to /home/oracle/.bash_profile file:

   if [ -f /etc/oraenv ]; then
      . /etc/oraenv
   fi

  You may want to check to see what processes are runnning (ps -ef),
  and what ipcs values are there.


III. Installation

**Installation CANNOT be performed in text mode.

X-Windows the defacto UNIX graphical user interface, and is started by
the operating system, or manually by logging on as root, and typing "init 5".
The text mode (*what you don't want*) can be initiated by:
 
 (a) typing "linux 3" at the LILO prompt OR
 (b) "[ctrl]+[alt]+[F1]", logging in as root then typing "init 3"

The graphic mode, or "init 5" can be accessed by:
 
 (a) typing "linux 5" at the LILO prompt OR
 (b) logging in as root then typing "init 5"
 (c) you have already set up your workstation to boot up in graphical mode
     as a default.

The text mode is just text, no fancy icons or windows.  Thus all commands
must be executed through the keyboard, not the mouse.  For now, we do NOT
want the text mode.  We need the fancy icons and windows to run the Oracle
installation.

Continuing...

log on as root (if you have not done so already) within the graphical login
screen at startup, or after the init 5 / linux 5 command.

Open up a terminal window from the console.

look over and change the initdev.ora file if necessary

FINALLY! the good bits! 

if you don't know how to edit files in UNIX, then learn how before you muck
around with this stuff.

cd /usr/local/src/SOURCES/cd oinstalltools-{version}/

Set the environment variable OINSTALLMEDIA to "TARBALL" if you have
downloaded the distribution from technet (do no such assignment if
you have the CD).

if you are running the installer through a virtual private network, or through
a LAN running XWindows, then you will have to allow the oracle XWindows based
programs to connect to your machine by typing:

xhost +<ip address>

where the <ip address> is the address of the machine that you will be
installing ORACLE onto. DO NOT LEAVE A SPACE BETWEEN THE + AND THE
IP ADDRESS, or your friends and enemies will boot XWindows programs on
YOUR screen from accross the LAN.

I like to nuke the oracle application directory before I start, BUT BE
CAREFULL! If your favourite DBA has set up another instance, or another
version of ORACLE on the machine that you are installing from, then
you may delete some old data, which just might be your coprorate
database. So don't rm -rf anything without pondering whether you will
lose your job AND get sued by the company you are doing work for.

The last thing to do before you start is to get a good idea what proccesses,
and interprocess comminications (ipcs) are running out there. Here is an
example of what you may see.  Do not be concerned with anything other
than those processes and Inter-process Communications (ipcs) owned by oracle.
At the start there should be NO processes or ipcs owned by ORACLE before
you start.

# ps -ef
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 Sep06 ?        00:00:08 init
root         2     1  0 Sep06 ?        00:00:42 [kflushd]
root         3     1  0 Sep06 ?        00:01:04 [kupdate]
root         4     1  0 Sep06 ?        00:00:00 [kpiod]
root         5     1  0 Sep06 ?        00:00:48 [kswapd]
root         6     1  0 Sep06 ?        00:00:00 [mdrecoveryd]
root       339     1  0 Sep06 ?        00:00:45 syslogd -m 0
root       348     1  0 Sep06 ?        00:00:03 klogd
nobody     362     1  0 Sep06 ?        00:00:00 [identd]
root       380     1  0 Sep06 ?        00:00:00 crond
root       492     1  0 Sep06 ?        00:00:13 gpm -t ps/2
xfs        678     1  0 Sep06 ?        00:03:12 xfs -droppriv -daemon -port -1
root       696     1  0 Sep06 tty2     00:00:00 [mingetty]
root       697     1  0 Sep06 tty3     00:00:00 [mingetty]
root       698     1  0 Sep06 tty4     00:00:00 [mingetty]
root       699     1  0 Sep06 tty5     00:00:00 [mingetty]
root       700     1  0 Sep06 tty6     00:00:00 [mingetty]
root      1054     1  0 Sep06 ?        00:00:00 [lockd]
root      1055  1054  0 Sep06 ?        00:00:00 [rpciod]
root      1071     1  0 Sep06 ?        00:00:00 [rpc.statd]
root      2027     1  0 Sep06 ?        00:00:11 httpd
root     29465     1  0 Sep11 tty1     00:00:00 [mingetty]
root     27170     1  0 Sep28 ?        00:00:02 /usr/bin/kdm -nodaemon
root     10522 27170  0 Oct02 ?        00:16:25 /etc/X11/X -auth /usr/X11R6/lib/
root      2982     1  0 Oct30 ?        00:00:01 inetd
nobody   18592  2027  0 Nov12 ?        00:00:00 httpd
nobody   18593  2027  0 Nov12 ?        00:00:00 httpd
nobody   18594  2027  0 Nov12 ?        00:00:00 [httpd]
nobody   18595  2027  0 Nov12 ?        00:00:00 httpd
nobody   18596  2027  0 Nov12 ?        00:00:00 httpd
nobody   18597  2027  0 Nov12 ?        00:00:00 httpd
nobody   18598  2027  0 Nov12 ?        00:00:00 httpd
nobody   18599  2027  0 Nov12 ?        00:00:00 httpd
root      1454  1425  0 Nov14 pts/0    00:00:00 [su]
root      1458  1454  0 Nov14 pts/0    00:00:00 -bash
root      1493 24375  0 Nov14 ?        00:00:01 /usr/sbin/sshd
root      1498  1493  0 Nov14 pts/1    00:00:00 -bash
root      4545 27170  0 Nov15 ?        00:00:02 -:0
root      5049  5047  0 Nov15 pts/3    00:00:00 -bash
root     10491 10489  0 06:42 pts/5    00:00:00 -bash

# ipcs

------ Shared Memory Segments --------
key       shmid     owner     perms     bytes     nattch    status     
0x00000000 2688      nobody    600       46084     9         dest       

------ Semaphore Arrays --------
key       semid     owner     perms     nsems     status     

------ Message Queues --------
key       msqid     owner     perms     used-bytes  messages   

 

run our script:
oinstallstage1.sh [ip address of the machine your keyboard is attached to]

Once the script is running, dialogs will appear and you will be prompted
to select and answer the appropriate questions.

Window One: Oracle8i EE Release 2: Oracle Universal Installer

 "Welcome" screen

 "File Locations" screen
   Source: /home/oracle/Oracle8iR2/stage/products.jar (or cd location)
   Destination: /u01/app/oracle/product/8.1.6
   - It should display "Loading Product Information"

 "Available Products" screen
   - Select "Oracle8i Enterprise Edition 8.1.6.1.0"

 "Installation Types" screen
   - Select "Custom"

 "UNIX Group Name" screen
   - This screen only seems to apear the first time that the installation
     script is run.
   - Type dba

 "Dialog OrainstRoot.sh"
   - This screen also only seems to apear the first time that the installation
     script is run.
   - do as the dialog says in a separate window as the root user.

 "Available Product Components" screen
   - As Oracle's default setting, all products are selected except for
     Oracle Protocol Support, Oracle SQLJ and Linux Documentation. 
     Select "Oracle Protocol Support" and "Linux Documentation".  Also,
     verify that all components are a "new install".
   - Click on the Java Runtime Environment 1.1.8 text.
 
 "Component Locations" screen
   Java Runtime Environment
   Destination Location of JRE 1.1.8: /u01/app/oracle/jre/1.1.8
   - Oracle8i should be in the /home partition

 "Priviledged Operating System Groups" screen
   Database Administrator (OSDBA) Group: dba
   Database Operator (OSOPER) Group: dba

 Select "No" for "Upgrading or Migrating an Existing Database".

 Select "No" to Create Database.

 "Summary" screen
   - Click "install" to begin OUI installation.
   - Go get your favourite available beverage, as this takes a while.

 "Setup Privileges" window will popup, prompting you to run "root.sh"
   script as root.
   - In a new shell or our pop up script window (as root):
      /u01/app/oracle/product/8.1.6/root.sh

   The following output should appear in the shell:
  
   Creating Oracle Inventory pointer file (/etc/OraInst.loc)
   Changing group name of  /u01/app/oracle/oraInventory to oinstall.
   Running Oracle8 root.sh script...
   The following environment variables are set as:
    ORACLE_OWNER=oracle
    ORACLE_HOME=/u01/app/oracle/product/8.1.6
    ORACLE_SID=dev
 
   Enter the full pathname of the local bin directory: [/usr/local/bin]:

   Type /usr/local/bin.

   Creating /etc/oratab file ...
   Entry will be added to the /etc/oratab file by Database Configuration
   Assistant (dbassist) when a database is created.  Finished running
   generic part of root.sh script.  Now product-specific root actions
   will be performed. 

   IMPORTANT NOTE: Please delete any log and trace files previously created
   by the Oracle Enterprise Manager Intelligent Agent.  These files may be
   found in the directories you use for storing other Net8 log and trace
   files.  If such files exist, the OEM IA may not restart.

   - "IMPORTANT NOTE" can be ignored, deleting the log and trace files
   is unnecessary.

   - Click "OK" on the "Setup Privileges" dialog window.

Window Two: Configuration Tools: Net 8 Configuration Assistant

 "Welcome to Net8 Configuration Assistant" screen

 Do NOT select "Perform Typical Installation".

 "Directory Service Access" screen
   - Select "No" to defer directory service access configuration to
     another time.

 "Listener Configuration: Listener Name" screen
   Default listener name: LISTENER

 "Listener Configuration: TCP/IP Protocol" screen
   Default port: 1521

 "Listener Configuration: More Listeners" screen
   - Select "No"

 "Listener Configuration: Done" screen

 "Naming Methods Configuration" screen
   - Select "No"

 "Done" screen
   - Click "Finish" to complete net8 Configuration Assistant.

 "End of Installation" screen in OUI
   - Click "Exit" and select "Yes" to confirm exiting OUI. 
   - OUI window should not be present now.

*If you encounter a NLS_LANG environment error, it means that the
NLS_LANG environment variable is set somewhere.  Unset this variable
and do a fresh install by running "./oracletest" script as root again.
 
   unset NLS_LANG; export NLS_LANG
   su - oracle
   oracle_password
   echo $NLS_LANG                       #verifying that NLS_LANG is unset

  Also check that NLS_LANG is commented (#) out in ".bashrc" file

  Check to see what processes are runnning, and what
  ipcs values are there (you did this at the start as well).
  The oracle processes should be the same, except for one additional
  "listener" process. These are hard to see but it will look something
  like :

oracle    7848     1  0 Nov15 ?        00:00:00 /u01/app/oracle/product/8.1.6/bi

 

Now execute the second stage script (as root still):

oinstallstage2.sh

This will run the dbassist script:

Window Three: Oracle database Configuration Assistant (ODCA)

 "Welcome" screen
   - Select "Create a database"

 "Select Database Type" screen
   - Select "Custom"

 "Primary Database Type" screen
   - Select "Multipurpose"

 "Concurrent Users" screen
   - Increase the number of concurrent users at one time from 15 to 60.

 Select "Dedicated Server Mode".

 Check that all options are selected (excluding Oracle Visual Information
   Retrieval), then click "Next".

 Enter "dev" for "Global Database Name".  This should automatically set
   "SID" to the same value (dev) too.

 "Control File Location" screen
   - Accept all default settings for control file locations.

 On the next screen, change the following values on the specified tabs:
   "Temporary" tab: value for "Size" should be set to 150 Mb
   "Rollback" tab: value for "Size" should be set to 150 Mb
    - click "NEXT"

 Change the "Redo Size Log" for file 1, 2 and 3 to 10000KB.
    - click "NEXT"

 Accept the default "Checkpoint Interval" and "Timeout".
    - click "NEXT"

 Edit the following values:
   "Processes" set to 100
   "Block Size" set to 4096
    - click "NEXT"

 Accept defaults for "Trace File Directory".
    - click "NEXT"

 Select "Save information to a shell script", and click "Finish".

 "Save" path should be
   /u01/app/oracle/product/8.1.6/assistants/dbca/sqldev.sh.
   - There should be confirmation of the save.

 "oinstallstage2.sh" script will run all operations needed to complete
 the installation.

 THE SECOND STAGE OF THE INSTALLATION WILL TAKE ABOUT ONE HOUR AND TEN
 MINUTES ON A 500 MHz Machine with 256 Meg of RAM.  So get another beverage
 or do something else productive like sleep, or something.

 After you have finished, the processes and ipcs can be checked as we have
 done in the following example. Again do not be concerned with anything other
 than those processes and Inter-process Communications (ipcs) owned by oracle.

# ps -ef
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 Sep06 ?        00:00:08 init
root         2     1  0 Sep06 ?        00:00:42 [kflushd]
root         3     1  0 Sep06 ?        00:01:04 [kupdate]
root         4     1  0 Sep06 ?        00:00:00 [kpiod]
root         5     1  0 Sep06 ?        00:00:48 [kswapd]
root         6     1  0 Sep06 ?        00:00:00 [mdrecoveryd]
root       339     1  0 Sep06 ?        00:00:45 syslogd -m 0
root       348     1  0 Sep06 ?        00:00:03 klogd
nobody     362     1  0 Sep06 ?        00:00:00 [identd]
root       380     1  0 Sep06 ?        00:00:00 crond
root       492     1  0 Sep06 ?        00:00:13 gpm -t ps/2
xfs        678     1  0 Sep06 ?        00:03:12 xfs -droppriv -daemon -port -1
root       696     1  0 Sep06 tty2     00:00:00 [mingetty]
root       697     1  0 Sep06 tty3     00:00:00 [mingetty]
root       698     1  0 Sep06 tty4     00:00:00 [mingetty]
root       699     1  0 Sep06 tty5     00:00:00 [mingetty]
root       700     1  0 Sep06 tty6     00:00:00 [mingetty]
root      1054     1  0 Sep06 ?        00:00:00 [lockd]
root      1055  1054  0 Sep06 ?        00:00:00 [rpciod]
root      1071     1  0 Sep06 ?        00:00:00 [rpc.statd]
root      2027     1  0 Sep06 ?        00:00:11 httpd
root     29465     1  0 Sep11 tty1     00:00:00 [mingetty]
root     27170     1  0 Sep28 ?        00:00:02 /usr/bin/kdm -nodaemon
root     10522 27170  0 Oct02 ?        00:16:25 /etc/X11/X -auth /usr/X11R6/lib/
root      2982     1  0 Oct30 ?        00:00:01 inetd
nobody   18592  2027  0 Nov12 ?        00:00:00 httpd
nobody   18593  2027  0 Nov12 ?        00:00:00 httpd
nobody   18594  2027  0 Nov12 ?        00:00:00 [httpd]
nobody   18595  2027  0 Nov12 ?        00:00:00 httpd
nobody   18596  2027  0 Nov12 ?        00:00:00 httpd
nobody   18597  2027  0 Nov12 ?        00:00:00 httpd
nobody   18598  2027  0 Nov12 ?        00:00:00 httpd
nobody   18599  2027  0 Nov12 ?        00:00:00 httpd
root      1454  1425  0 Nov14 pts/0    00:00:00 [su]
root      1458  1454  0 Nov14 pts/0    00:00:00 -bash
root      1493 24375  0 Nov14 ?        00:00:01 /usr/sbin/sshd
root      1498  1493  0 Nov14 pts/1    00:00:00 -bash
root      4545 27170  0 Nov15 ?        00:00:02 -:0                  
root      5049  5047  0 Nov15 pts/3    00:00:00 -bash
root      5505     1  0 Nov15 pts/3    00:00:00 kterm -title Use this terminal w
root      5557  5505  0 Nov15 pts/4    00:00:00 [bash]
oracle    7848     1  0 Nov15 ?        00:00:00 /u01/app/oracle/product/8.1.6/bi
oracle   10461     1  0 06:40 ?        00:00:00 ora_pmon_prod
oracle   10463     1  1 06:40 ?        00:01:04 ora_dbw0_prod
oracle   10465     1  1 06:40 ?        00:00:54 ora_lgwr_prod
oracle   10467     1  0 06:40 ?        00:00:03 ora_ckpt_prod
oracle   10469     1  0 06:40 ?        00:00:02 ora_smon_prod
oracle   10471     1  0 06:40 ?        00:00:00 ora_reco_prod
oracle   10473     1  0 06:40 ?        00:00:00 ora_s000_prod
oracle   10475     1  0 06:40 ?        00:00:00 ora_d000_prod
root     10491 10489  0 06:42 pts/5    00:00:00 -bash

# ipcs

------ Shared Memory Segments --------
key       shmid     owner     perms     bytes     nattch    status     
0x00000000 2688      nobody    600       46084     9         dest       
0x00000000 48769     oracle    640       69632     8                    
0x00000000 48770     oracle    640       28311552  8                    
0x00000000 48771     oracle    640       27262976  8                    
0xcfc9f330 48772     oracle    640       29544448  8                    

------ Semaphore Arrays --------
key       semid     owner     perms     nsems     status     
0x0a376f06 896       oracle    640       104      

------ Message Queues --------
key       msqid     owner     perms     used-bytes  messages


IV. ORA-Errors

WARNING: you may need to install again. We installed about 15 times on the
first attempt (thus this document).

You may check for errors in the /home/oracle/sqldev.out output. The
most major error is when that file does not even exist.

Other less important errors are those in /home/oracle/stage1.out, and
/home/oracle/stage2.out. there may be some complaints about ioctl in those
which are there because we are su'ing to oracle through an inbound
stream other than stdin.

These are a sample of the types of errors that will be displayed when
Oracle installs its Database Assistant.  All of these errors can be
ignored as some of the processes, tables or roles do not exist yet,
but will be created later.

   ORA-01919: role ??? does not exist
   ORA-01432: public synonym to be dropped does not exist
   ORA-04043: object ??? does not exist
   ORA-00942: table or view does not exist
   ORA-02289: sequence does not exist
   ORA-01434: private synonym does not exist
  
Hopefully you will not encounter these errors.  They mean trouble! 
Either you do not have enough memory to install Oracle or you did
not configure things correctly. 

   ORA-01921: role name '???' conflicts with another user or role name
   ORA-03114: not connected to ORACLE
   VM: killing process ORACLE

V. Testing the Installation

Once the installation is complete, we must test for errors.  The
"Oracle Acceptance Test" is available at http://photo.net/wtr/oracle
Hold down the right click on "acceptance-sql.txt" and drag to
"Save link as...".  Modify the "Save as" path to /tmp/acceptance-sql.txt.

In a shell as oracle user:
   cp /tmp/acceptance-sql.txt /tmp/acceptance.sql
   sqlplus

The following output should be displayed:
SQL*Plus: Release 8.1.6.0.0 - Production on Wed Aug 2 13:45:49 2000

(c) Copyright 1999 Oracle Corporation.  All rights reserved.

Enter user-name: system
Enter password: manager

Connected to:
Oracle8i Enterprise Edition Release 8.1.6.1.0 - Production with the
Partitioning option
JServer release 8.1.6.0.0 - Production

Then, at the prompt type "exit":
SQL> exit

Disconnected from Oracle8i Enterprise Edition Release 8.1.6.1.0 -
Production With the Partitioning option
JServer Release 8.1.6.0.0 - Production

In another shell, logged on as oracle user:
   svrmgrl

This display should follow:
Oracle Server Manager Release 3.1.6.0.0 - Production

Copyright (c) 1997, 1999, Oracle Corporation.  All rights reserved.

Oracle8i Enterprise Edition Release 8.1.6.1.0 - Production With the
Partitioning option
JServer Release 8.1.6.0.0 - Production

At the Server Manager prompt:
SVRMGR> connect internal
Connected.
SVRMGR> startup

If there is this error: 
ORA-01081: cannot start already-running ORACLE - shut it down first

Then login to a different shell as root, use "ps -ef" command and kill
all oracle process that are running.

   su -
   root_password
   ps -ef

The oracle processes that are running are similar to these:
ora_pmon_dev
[oracle]
ora_lgwr_dev
ora_ckpt_dev
ora_smon_dev
ora_reco_dev

Else, continue with:
SVRMGRL> select sysdate form dual;
SVRMGRL> @ /tmp/acceptance.sql

When you see the system date in this format, then you've successfully
passed the first hurdle.  So far your installation is error free.

SYSDATE
2000-06-10
SQL>

While the acceptance test is running, it will output all errors found. 
If no errors were found, then CONGRATS on a successful Oracle8i install. 
However, if you have errors, begin by going through the installation guide
to verify that all the procedures were completed, check that all files
directories in "/home/oracle" are owned by owner oracle and group dba. 
Then run the "oracletest" script again.  The script automatically removes
any trace of previous Oracle installations, making a fresh install.


VI. References

(1) ORACLE site
         http://www.oracle.com
         http://technet.oracle.com
      Oracle8i Release 2 (8.1.6) for Linux Intel Installation Guide
         http://technet.oracle.com/doc/oracle8i_816/linux_816/unixdoc
      Postings
         http://technet.oracle.com/support/bboard/discussions.htm
 
(2) *8.1.6 Installation Guide
   <http://www.arsdigita.com/ad-training/acs-install/oracle>
 
(3) Linux Doc Oracle8 HOWTO
   <http://www.linuxdoc.org/HOWTO/Oracle-8-HOWTO-3.html>
 
(4) *Oracle8i on RH <http://homepage.tig.com.au/~jmsalvo/linux/oracle8i.html>
 
(5) Support/ Postings
      *http://www.photo.net/bboard/q-and-a.tcl?topic=web/db
 
(6) Oracle Acceptance Test <http://photo.net/wtr/oracle/acceptance-sql.txt>
 
(7) Oracle Server Utilities: SQL*Loader
      Ctrl File <http://www.infoboard.com/packagedoc/oradoc/DOC/Server/doc>
         (for SQL*Loader --> SUT73; for SVRMGRL --> SVRMGR)
      Concepts <http://wpi.wpi.edu/server.815/a67792/ch03.htm>
      *Guide <http://www.aber.ac.uk/~ccuwww/docs/c/c1.html>    


VII. Thanks

A big THANKS to all who helped (in alphabetical order):

Ryan Campbell
Computer Engineering Inc. (for fronting the expenses)
John Keiser
Blair Lowe
Juergen Lueters
Jesus (John) Salvo
Adelaide Yip

 

【oraenv】:

 

# 2000/10/03 Blair Lowe
# oracle startup environment defaults file
#
ORACLE_SID=prod
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/8.1.6
export ORACLE_SID ORACLE_BASE ORACLE_HOME
ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export ORA_NLS33
ORACLE_TERM=vt100
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
PATH=$PATH:$ORACLE_HOME/bin:$HOME/bin:.
export ORACLE_TERM LD_LIBRARY_PATH PATH

 

【oratab.ed】:

 

# 2000/06/23  Blair Lowe, Adelaide Yip  Oracle8i EE (8.1.6)
# Copyright: Computer Engineering Inc. 2000
#
# description: Automatically changes /etc/oratab from N to Y, so dbshut may run.
#
g/:N/s/:N/:Y/g
w
q
.

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值