<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Install Oracle 8.1.7</title><meta name="generator" content="DocBook XSL Stylesheets V1.58.1"><link rel="home" href="index.html" title="OpenACS Documentation"><link rel="up" href="unix-install.html" title="Chapter�4.�Installing on Unix/Linux"><link rel="previous" href="linux-installation.html" title="Install Linux and supporting software"><link rel="next" href="postgres.html" title="Install PostGreSQL"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"><a accesskey="p" href="linux-installation.html">Prev</a> </td><th width="60%" align="center">Chapter�4.�Installing on Unix/Linux</th><td width="20%" align="right"> <a accesskey="n" href="postgres.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="oracle"></a>Install Oracle 8.1.7</h2></div></div><div class="authorblurb"><p>
	by <a href="mailto:vinod@kurup.com" target="_top">Vinod Kurup</a><br>
          OpenACS docs are written by the named authors, and may be edited
          by OpenACS documentation staff.
        </p></div><p>

	Skip this page if you're not interested in Oracle.

  </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>

	  OpenACS 4.7.0d does not yet work with Oracle 9i

	</p><p>

	  This document assumes that you'll be installing Oracle on the same
	  box as AOLServer. For more details on a remote Oracle installation,
	  see Daryl Biberdorf's <a href="http://openacs.org/new-file-storage/one-file?file_id=273" target="_top">document</a>.
  
	</p></div><div class="sect2" lang="en"><div class="titlepage"><div><h3 class="title"><a name="install-oracle-getit"></a>Acquire Oracle 8.1.7 Enterprise Edition</h3></div></div><p>

	  You can obtain the software through a variety of methods (You'll need
	  to become a member of <a href="http://technet.oracle.com" target="_top">technet.oracle.com</a>, which is
	  free):

	</p><div class="orderedlist"><ol type="1"><li><p>

          Order a CD from the <a href="http://oraclestore.oracle.com" target="_top">Oracle
            Store</a>.  The cost is currently $39.95 for a 30-day
            evaluation copy with delivery estimated between 3-4 business
            days.  

        </p></li><li><p> 

          Download the software from the <a href="http://otn.oracle.com/software/content.html" target="_top">
          Oracle Downloads</a> page. 

        </p><div class="itemizedlist"><ul type="disc"><li><p> 

              Oracle 8.1.7 now comes with a Java RunTime
              Environment built-in to the distribution, so you no longer
              have to download and install it separately.

            </p></li><li><p>

              See <a href="http://openacs.org/forums/message-view?message_id=33004" target="_top">these
              instructions</a> to download the 8.1.7.4 patchset. Note
              that you can't back out of an Oracle patchset once it's
              installed. You have to reinstall the whole thing from scratch.

            </p></li><li><p> 

              After the download is complete, untar the file
              to a convenient location.  To do this, you will need to login
              and cd to the directory where the archive is. 

            </p><pre class="programlisting">
$ cd /directory/where/oracle/is
$ tar xvf oracle81701.tar</pre></li></ul></div></li><li><p> 

          It used to be possible to get a free CD by mail, but
          I can no longer find the link for that option.

        </p></li></ol></div></div><div class="sect2" lang="en"><div class="titlepage"><div><h3 class="title"><a name="install-oracle-keepinmind"></a>Things to Keep in Mind</h3></div></div><p>

      Throughout these instructions, we will refer to a number of
      configurable settings and advise certain defaults. With the exception
      of passwords, we advise you to follow these defaults unless you know
      what you are doing.  Subsequent documents will expect that you used
      the defaults, so a change made here will necessitate further changes
      later. For a guide to the defaults, please see <a href="oracle.html#install-oracle-defaults" title="Defaults">the section called &#8220;Defaults&#8221;</a>.

    </p><p>

      For additional resources/documentation, please see this <a href="http://openacs.org/bboard/q-and-a-fetch-msg.tcl?msg_id=0003o2&amp;topic_id=11&amp;topic=OpenACS" target="_top">thread</a>
      and <a href="http://openacs.org/forums/message-view?message_id=67108" target="_top">Andrew
      Piskorski's mini-guide</a>..

    </p></div><div class="sect2" lang="en"><div class="titlepage"><div><h3 class="title"><a name="install-oracle-preinstall"></a>Pre-Installation Tasks</h3></div></div><p>

      Though Oracle 8.1.7 has an automated installer, we still need to
      perform several manual, administrative tasks before we can launch
      it. You must perform all of these steps as the
      <tt>root</tt> user. We recommend entering the
      X window system as a normal user and then doing a <tt>su
      -</tt>. This command gives you full root access.

    </p><div class="itemizedlist"><ul type="disc"><li><p>

          Login as a non-root user and start X by typing
          <tt>startx</tt>
          
          </p><pre class="programlisting">
joeuser:~$ startx</pre><p>

        </p></li><li><p>

          Open a terminal window type and login as root 

          </p><pre class="programlisting">
joeuser:~$ su -
Password: ***********
root:~#</pre><p>

        </p></li><li><p>

          Create and setup the <tt>oracle</tt>
          group and <tt>oracle</tt> account

        </p><p>

          We need to create a user <tt>oracle</tt>,
          which is used to install the product, as well as starting and
          stopping the database.

        </p><pre class="programlisting">
root:~# groupadd dba
root:~# groupadd oinstall
root:~# groupadd oracle
root:~# useradd -g dba -G oinstall,oracle -m oracle
root:~# passwd oracle</pre><p>

          You will be prompted for the New Password and Confirmation of
          that password.

        </p></li><li><p> 

          Setup the installation location for Oracle. While Oracle can
          reside in a variety of places in the file system, OpenACS has
          adopted <tt>/ora8</tt> as the base
          directory.

        </p><p>

          <span class="strong">Note:</span> the Oracle install needs
          about 1 GB free on <tt>/ora8</tt> to
          install successfully.

        </p><pre class="programlisting">
root:~# mkdir /ora8
root:/ora8# cd /ora8
root:/ora8# mkdir -p m01 m02 m03/oradata/ora8
root:/ora8# chown -R oracle.dba /ora8
root:/ora8# exit</pre></li><li><p>

          Set up the <tt>oracle</tt> user's
          environment

        </p><div class="itemizedlist"><ul type="circle"><li><p> 

              Log in as the user
              <tt>oracle</tt> by typing the
              following:

            </p><pre class="programlisting">
joeuser:~$ su - oracle
Password: ********</pre></li><li><p>

              Use a text editor to edit the
              <tt>.bash_profile</tt> file in the
              <tt>oracle</tt> account home
              directory. 

            </p><pre class="programlisting">
oracle:~$ emacs .bash_profile</pre><p>

              You may get this error trying to start emacs: 

            </p><pre class="programlisting">
Xlib: connection to &quot;:0.0&quot; refused by server
Xlib: Client is not authorized to connect to Server
emacs: Cannot connect to X server :0.
Check the DISPLAY environment variable or use `-d'.
Also use the `xhost' program to verify that it is set to permit
connections from your machine.</pre><p>

              If so, open a new terminal window and do the following:

            </p><pre class="programlisting">
joeuser:~$ xhost +localhost</pre><p>

              Now, back in the oracle terminal:

            </p><pre class="programlisting">
oracle:~$ export DISPLAY=localhost:0.0
oracle:~$ emacs .bash_profile</pre><p>            

              Try this procedure anytime you get an Xlib connection refused
              error.

            </p></li><li><p> 

              Add the following lines (substituting your
              Oracle version number as needed) to
              <tt>.bash_profile</tt>:

            </p><pre class="programlisting">
export ORACLE_BASE=/ora8/m01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/8.1.7
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export ORACLE_SID=ora8
export ORACLE_TERM=vt100
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data

umask 022</pre><p>

              Save the file by typing <tt>CTRL-X
                CTRL-S</tt> and then exit by typing
                <tt>CTRL-X
                CTRL-C</tt>. Alternatively, use the menus.

            </p></li></ul></div><p>

          Make sure that you do <span class="strong">not</span> add
          any lines like the following

        </p><pre class="programlisting">
# NLS_LANG=american
# export NLS_LANG</pre><p>

          These lines will change the Oracle date settings and will break
          OpenACS since OpenACS depends on the ANSI date format, YYYY-MM-DD
          dates.

        </p></li><li><p>

          Log out as oracle

        </p><pre class="programlisting">
oracle:~$ exit</pre></li><li><p> 

          Log back in as <tt>oracle</tt> and double
          check that your environment variables are as intended. The
          <tt>env</tt> command lists all of the
          variables that are set in your environment, and
          <tt>grep</tt> shows you just the lines
          you want (those with ORA in it).

        </p><pre class="programlisting">
joeuser:~$ su - oracle
oracle:~$ env | grep ORA</pre><p>

          If it worked, you should see: 

        </p><pre class="programlisting">
ORACLE_SID=ora8
ORACLE_BASE=/ora8/m01/app/oracle
ORACLE_TERM=vt100
ORACLE_HOME=/ora8/m01/app/oracle/product/8.1.7
ORA_NLS33=/ora8/m01/app/oracle/product/8.1.7/ocommon/nls/admin/data</pre><p>

          If not, try adding the files to
          <tt>~/.bashrc</tt> instead of
          <tt>.bash_profile</tt>. Then logout and
          log back in again. Also, be certain you are doing
          <tt>su - oracle</tt> and not just
          <tt>su oracle</tt>. The
          <tt>-</tt> means that
          <tt>.bashrc</tt> and
          <tt>.bash_profile</tt> will be
          evaluated.

        </p><p>

          Make sure that <tt>/bin</tt>,
          <tt>/usr/bin</tt>, and
          <tt>/usr/local/bin</tt> are in your path
          by typing:

        </p><pre class="programlisting">
oracle:~$ echo $PATH
/bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/home/oracle/bin:/ora8/m01/app/oracle/product/8.1.7/bin</pre><p>

          If they are not, then add them to the
          <tt>.bash_profile</tt> by changing the
          PATH statement above to
          <tt>PATH=$PATH:/usr/local/bin:$ORACLE_HOME/bin</tt>

        </p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><h3 class="title"><a name="install-oracle-install"></a>Installing Oracle 8.1.7 Server</h3></div></div><div class="itemizedlist"><ul type="disc"><li><p>
          Log in as <tt>oracle</tt> and
          start X if not already running. Start a new terminal:
        </p><pre class="programlisting">
joeuser:~$ xhost +localhost
joeuser:~$ su - oracle
Password: **********
oracle:~$ export DISPLAY=localhost:0.0</pre></li><li><p>

          Find the <tt>runInstaller</tt> script

        </p><div class="itemizedlist"><ul type="circle"><li><p>

              If you are installing Oracle from a CD-ROM, it is located in
              the <tt>install/linux</tt> path from
              the cd-rom mount point

            </p><pre class="programlisting">
oracle:~$ su - root
root:~# mount -t iso9660 /dev/cdrom /mnt/cdrom
root:~# exit
oracle:~$ cd /mnt/cdrom</pre></li><li><p>

              If you are installing from the tarball, the install script is
              located in the <tt>Oracle8iR2</tt>
              directory that was created when you expanded the archive.

            </p><pre class="programlisting">
oracle:~$ cd /where/oracle/Disk1</pre></li></ul></div><p>

          Check to make sure the file is there. 

        </p><pre class="programlisting">
oracle:/where/oracle/Disk1$ ls
doc  index.htm  install  runInstaller  stage  starterdb</pre><p>

          If you don't see
          <tt>runInstaller</tt>, you are in the
          wrong directory.

        </p></li><li><p>

          Run the installer

        </p><pre class="programlisting">
oracle:/where/oracle/Disk1$ ./runInstaller</pre><p>

          A window will open that welcomes you to the 'Oracle Universal
          Installer' (OUI). Click on
          &quot;<tt>Next</tt>&quot;

        </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
            Some people have had trouble with this step on RedHat 7.3 and 8.0. If
            so, try the following steps before calling
            <b>./runInstaller</b>:

          </p><div class="orderedlist"><ol type="1"><li><p>

                Execute the following command:
                <b>/usr/i386-glib21-linux/bin/i386-glibc21-linux-env.sh</b>

              </p></li><li><p>

                Type <b>export LD_ASSUME_KERNEL=2.2.5</b>

              </p></li></ol></div></div></li><li><p>

          The &quot;File Locations&quot; screen in the OUI: 

        </p><div class="itemizedlist"><ul type="circle"><li><p> 

              &quot;Source&quot; path should have been
              prefilled with &quot;(wherever you mounted the
              CDROM)<tt>/stage/products.jar</tt>&quot;

            </p></li><li><p> 

              &quot;destination&quot; path says
              &quot;<tt>/ora8/m01/app/oracle/product/8.1.7</tt>&quot;

            </p><p>

              If the destination is not correct it is because your
              environment variables are not set properly. Make sure you
              logged on as <tt>oracle</tt> using
              <tt>su - oracle</tt>. If so, edit the
              <tt>~/.bash_profile</tt> as you
              did in <a href="oracle.html#install-oracle-preinstall" title="Pre-Installation Tasks">the section called &#8220;Pre-Installation Tasks&#8221;</a>

            </p></li><li><p>

              Click &quot;Next&quot; (a pop up window will display Loading
              Product information).

            </p></li></ul></div></li><li><p>

          The &quot;Unix Group Name&quot; screen in the OUI:
          
        </p><div class="itemizedlist"><div class="itemizedlist"><ul type="disc"><li><p>
              
              Debian users need to link
              <tt>/bin/awk</tt> to
              <tt>/usr/bin/awk</tt> before
              running the script below
              
            </p><pre class="programlisting">
joueser:~$ su -
root:~# ln -s /usr/bin/awk /bin/awk</pre></li></ul></div><ul type="circle"><li><p> 
              
              The Unix Group name needs to be set to
              '<tt>oinstall</tt>' ( we made
              this Unix group earlier ).
              
            </p></li><li><p>
              
              Click &quot;Next&quot;
              
            </p></li><li><p> 
              
              A popup window appears instantly, requesting you
              to run a script as root:
              
            </p></li><li><p>
          
          Open a new terminal window, then type:
          
        </p><pre class="programlisting">
joeuser:~$ su -
root:~# cd /ora8/m01/app/oracle/product/8.1.7
root:~# ./orainstRoot.sh  
; You should see:
Creating Oracle Inventory pointer file (/etc/oraInst.loc)
Changing groupname of /ora8/m01/app/oracle/oraInventory to oinstall.
root:~# mkdir -p /usr/local/java
root:~# exit
joeuser:~$ exit</pre></li><li><p>
          
          Click &quot;Retry&quot;
          
        </p></li></ul></div></li><li><p>
        
        The &quot;Available Products&quot; screen in the OUI:
        
      </p><div class="itemizedlist"><ul type="circle"><li><p>
            
            Select &quot;Oracle 8i Enterprise Edition 8.1.7.1.0&quot;
            
          </p></li><li><p>

            Click &quot;Next&quot;
            
          </p></li></ul></div></li><li><p>
        
        The &quot;Installation Types&quot; screen
        
      </p><div class="itemizedlist"><ul type="circle"><li><p>
            
            Select the &quot;Custom&quot; installation type.
            
          </p></li><li><p>
            
            Click &quot;Next&quot;
            
          </p></li></ul></div></li><li><p>
        
        The &quot;Available Product Components&quot; screen
        
      </p><div class="itemizedlist"><ul type="circle"><li><p>
            
            In addition to the defaults, make sure that &quot;Oracle SQLJ
            8.1.7.0,&quot; &quot;Oracle Protocol Support 8.1.7.0.0,&quot; and
            &quot;Linux Documentation 8.1.7.0.0&quot; are also checked.
            
          </p></li><li><p>
            
            Click &quot;Next&quot;
            
          </p></li><li><p>
            
            A progress bar will appear for about 1 minute.
            
          </p></li></ul></div></li><li><p>
        
        The &quot;Component Locations&quot; screen in the OUI
        
      </p><div class="itemizedlist"><ul type="circle"><li><p> 
            
            Click on the &quot;Java Runtime Environment 1.1.8&quot; It
            should have the path
            &quot;<tt>/ora8/m01/app/oracle/jre/1.1.8</tt>&quot;
            
          </p></li><li><p>
            
            Click &quot;Next&quot;
            
          </p></li><li><p>
            
            A progress bar will appear for about 1 minute.
            
          </p></li></ul></div></li><li><p>
        
        The &quot;Privileged Operation System Groups&quot; screen in the
        OUI
        
      </p><div class="itemizedlist"><ul type="circle"><li><p>
            
            Enter &quot;dba&quot; for &quot;Database Administrator
            (OSDBA) Group&quot;
            
          </p></li><li><p>              

            Enter &quot;dba&quot; for the &quot;Database Operator
            (OSOPER) Group&quot;

          </p></li><li><p>

            Click &quot;Next&quot;

          </p></li><li><p>

            A progress bar will appear for about 1 minute.

          </p></li></ul></div></li><li><p>

        The &quot;Authentication Methods&quot; screen
        
      </p><div class="itemizedlist"><ul type="circle"><li><p>

            Click &quot;Next&quot;

          </p></li></ul></div></li><li><p>

        The next screen is &quot;Choose JDK home directory&quot;

      </p><div class="itemizedlist"><ul type="circle"><li><p>

              Keep the default path: <tt>/usr/local/java</tt>

          </p></li><li><p>

            Click &quot;Next&quot;

          </p></li></ul></div></li><li><p>

        The &quot;Create a Database&quot; screen in the OUI
        
      </p><div class="itemizedlist"><ul type="circle"><li><p>

            Select &quot;No&quot; as we will do this later, after some
            important configuration changes.
            
          </p></li><li><p>

            Click &quot;Next&quot;
            
          </p></li></ul></div></li><li><p>

        The next screen is &quot;Oracle Product Support&quot;

      </p><div class="itemizedlist"><ul type="circle"><li><p>

            TCP should be checked with &quot;Status&quot; listed as
            Required

          </p></li><li><p>

            Click &quot;Next&quot;

          </p></li></ul></div></li><li><p>

        The &quot;Summary&quot; screen in the OUI

      </p><div class="itemizedlist"><ul type="circle"><li><p>

            Check the &quot;Space Requirements&quot; section to verify
            you have enough disk space for the install.

          </p></li><li><p>
              Check that &quot;(144 products)&quot; is in the &quot;New
              Installations&quot; section title.
            </p></li><li><p>
              Click &quot;Install&quot;
            </p></li><li><p>
              A progress bar will appear for about 20 - 30 minutes. Now is a
              good time to take a break.
            </p></li><li><p>
              A &quot;Setup Privileges&quot; window will popup towards the
              end of the installation asking you to run a script as
              <tt>root</tt>
            </p></li><li><p> 
            Run the script. Switch to the oracle user first
            to set the environment appropriately and then do
            <b>su</b> to get root privileges, while keeping
            the oracle user's enviroment.
            </p><pre class="programlisting">
joeuser:~$ su - oracle
Password: *********
oracle:~$ su
Password: *********
root:~# /ora8/m01/app/oracle/product/8.1.7/root.sh
; You should see the following.   

Creating Oracle Inventory pointer file (/etc/oraInst.loc)
Changing groupname of /ora8/m01/app/oracle/oraInventory to oinstall.
# /ora8/m01/app/oracle/product/8.1.7/root.sh
Running Oracle8 root.sh script...
The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /ora8/m01/app/oracle/product/8.1.7
    ORACLE_SID=   ora8

Enter the full pathname of the local bin directory: [/usr/local/bin]: 

<tt>Press ENTER here to accept default of /usr/local/bin</tt>
      

Creating /etc/oratab file...
Entry will be added to the /etc/oratab file by
Database Configuration Assistants 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.</pre></li><li><p> 
              Do not follow the instructions on deleting trace
              and log files, it is not necessary.
            </p></li></ul></div><pre class="programlisting">
root:~# exit
joeuser:~$ exit</pre></li><li><p>
          Go back to the pop-up window and click &quot;OK&quot;
        </p></li><li><p>
          The &quot;Configuration Tools&quot; screen in the OUI
        </p><div class="itemizedlist"><ul type="circle"><li><p>
              This window displays the config tools that will automatically
              be launched.
            </p></li></ul></div></li><li><p>
          The &quot;Welcome&quot; screen in the &quot;net 8 Configuration
          Assistant&quot;
        </p><div class="itemizedlist"><ul type="circle"><li><p>
              Make sure the &quot;Perform Typical installation&quot; is
              <span class="strong">not</span> selected.
            </p></li><li><p>
              Click &quot;Next&quot;
            </p></li><li><p> 
              The &quot;Directory Service Access&quot; screen in the
              &quot;Net 8 Configuration Assistant&quot;
            </p></li><li><p>
              Select &quot;No&quot;
            </p></li><li><p>
              Click &quot;Next&quot;
            </p></li></ul></div></li><li><p>
          The &quot;Listener Configuration, Listener Name&quot; screen in
          the &quot;Net 8 Configuration Assistant&quot;
        </p><div class="itemizedlist"><ul type="circle"><li><p>
              Accept the default listener name of &quot;LISTENER&quot;
            </p></li><li><p>
              Click &quot;Next&quot;
            </p></li></ul></div></li><li><p> 
          The &quot;Listener Configuration, Select
          Protocols&quot; screen in the &quot;Net 8 Configuration
          Assistant&quot;
        </p><div class="itemizedlist"><ul type="circle"><li><p>
              The only choice in &quot;Select protocols:&quot; should be
              &quot;TCP/IP&quot;
            </p></li><li><p>
              Click &quot;Next&quot;
            </p></li></ul></div></li><li><p>
          The &quot;Listener Configuration TCP/IP Protocol&quot; screen in
          the &quot;Net 8 Configuration Assistant&quot;
        </p><div class="itemizedlist"><ul type="circle"><li><p>
              Default Port should be 1521 and selected.
            </p></li><li><p>
              Click &quot;Next&quot;
            </p></li></ul></div></li><li><p> 
          The &quot;Listener Configuration, More Listeners&quot; screen in
          the &quot;Net 8 Configuration Assistant&quot;
        </p><div class="itemizedlist"><ul type="circle"><li><p>
              Select &quot;No&quot;
            </p></li><li><p>
              Click &quot;Next&quot;
            </p></li></ul></div></li><li><p>
          The &quot;Listener Configuration Done&quot; screen in the
          &quot;Net 8 Configuration Assistant&quot;
        </p><div class="itemizedlist"><ul type="circle"><li><p>
              Click &quot;Next&quot;
            </p></li></ul></div></li><li><p> 
          The &quot;Naming Methods Configuration&quot; screen
          in the &quot;Net 8 Configuration Assistant&quot;
        </p><div class="itemizedlist"><ul type="circle"><li><p>
              Select &quot;No&quot;
            </p></li><li><p>
              Click &quot;Next&quot;
            </p></li></ul></div></li><li><p>
          The &quot;Done&quot; screen in the &quot;Net 8 Configuration
          Assistant&quot;
        </p><div class="itemizedlist"><ul type="circle"><li><p>
              Click &quot;Finish&quot;
            </p></li></ul></div></li><li><p>
          The &quot;End of Installation&quot; screen in the OUI
        </p><div class="itemizedlist"><ul type="circle"><li><p>
              Click &quot;Exit&quot;
            </p></li><li><p>
              Click &quot;Yes&quot; on the confirmation pop up window.
            </p></li><li><p>
              The Oracle Universal Installer window should have disappeared!
            </p></li></ul></div></li></ul></div><p>
      Congratulations, you have just installed Oracle 8.1.7 Server!
      However, you still need to create a database which can take about an
      hour of non-interactive time, so don't quit yet.
    </p></div><div class="sect2" lang="en"><div class="titlepage"><div><h3 class="title"><a name="install-oracle-create"></a>Creating the First Database</h3></div></div><p>
      This step will take you through the steps of creating a customized
      database. Be warned that this process takes about an hour on a
      Pentium II with 128 MB of RAM.
    </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>RedHat 7.3 and 8.0 users: Before running <b>dbassist</b>, do the following.</p><div class="orderedlist"><ol type="1"><li><p>
            Download the <a href="http://otn.oracle.com/software/products/oracle8i/htdocs/linuxsoft.html" target="_top">glibc
            patch</a> from Oracle Technet into <tt>/tmp</tt>.
          </p></li><li><p>
            cd $ORACLE_HOME
            </p></li><li><p>
            tar xzf /tmp/glibc2.1.3-stubs.tgz
            </p></li><li><p>
            ./setup_stubs
            </p></li></ol></div></div><div class="itemizedlist"><ul type="disc"><li><p> 
          Make sure you are running X. Open up a terminal and
          <tt>su</tt> to oracle and then run the
          <tt>dbassist</tt> program.
        </p><pre class="programlisting">
joeuser:~$ xhost +localhost
joeuser:~$ su - oracle
Password: *********
oracle:~$ export DISPLAY=localhost:0.0
oracle:~$ dbassist</pre></li><li><p>
          The &quot;Welcome&quot; screen in the Oracle Database
          Configuration Agent (ODCA)
        </p><div class="itemizedlist"><ul type="circle"><li><p>
              Select &quot;Create a database&quot;
            </p></li><li><p>
              Click &quot;Next&quot;
            </p></li></ul></div></li><li><p>
          The &quot;Select database type&quot; screen in the ODCA 
        </p><div class="itemizedlist"><ul type="circle"><li><p>
              Select &quot;Custom&quot;
            </p></li><li><p>
              Click &quot;Next&quot;
            </p></li></ul></div></li><li><p>
          The &quot;Primary Database Type&quot; window in ODCA 
        </p><div class="itemizedlist"><ul type="circle"><li><p>
              Select &quot;Multipurpose&quot;
            </p></li><li><p>
              Click &quot;Next&quot;
            </p></li></ul></div></li><li><p>
          The &quot;concurrent users&quot; screen of the ODCA 
        </p><div class="itemizedlist"><ul type="circle"><li><p>
              Select &quot;60&quot; concurrent users. 
            </p></li><li><p>
              Click &quot;Next&quot;
            </p></li></ul></div></li><li><p>
          Select &quot;<tt>Dedicated Server
            Mode</tt>&quot;, click
          &quot;<tt>Next</tt>&quot;
        </p></li><li><p>
          Accept all of the options, and click
          <tt>Next</tt> Oracle Visual
          Information Retrieval may be grayed out. If so, you can ignore
          it; just make sure that everything else is checked.
        </p></li><li><p>
          For &quot;Global Database Name&quot;, enter
          &quot;<tt>ora8</tt>&quot;; for
          &quot;SID&quot;, also enter
          &quot;<tt>ora8</tt>&quot; (it should do
          this automatically).  Click <tt>&quot;Change
          Character Set</tt> and select
          <tt>UTF8</tt>. Click
          &quot;<tt>Next</tt>&quot;.
        </p></li><li><p>
          Accept the defaults for the next screen (control file
          location). Click
          &quot;<tt>Next</tt>&quot;
        </p></li><li><p>
          Go to the &quot;temporary&quot; and
          &quot;rollback&quot; tabs, and change the Size
          (upper-right text box) to
          <tt>150</tt>MB. Click
          &quot;<tt>Next</tt>&quot;
        </p></li><li><p>
          Increase the redo log sizes to
          <tt>10000K</tt> each. Click
          &quot;<tt>Next</tt>&quot;
        </p></li><li><p>
          Use the default checkpoint interval &amp; timeout. Click
          &quot;<tt>Next</tt>&quot;
        </p></li><li><p>        
          Increase &quot;<tt>Processes</tt>&quot;
          to <tt>100</tt>;
          &quot;<tt>Block Size</tt>&quot; to
          <tt>4096</tt> (better for small Linux
          boxes; use 8192 for a big Solaris machine).
        </p></li><li><p>
          Accept the defaults for the Trace File Directory. Click
          &quot;<tt>Next</tt>&quot;
        </p></li><li><p>
          Finally, select &quot;<tt>Save information to a shell
            script</tt>&quot; and click
          &quot;<tt>Finish</tt>&quot; (We're
          going to examine the contents of this file before creating our
          database.)
        </p></li><li><p>
          Click the &quot;<tt>Save</tt>&quot;
          button. Oracle will automatically save it to the correct
          directory and with the correct file name. This will likely be
          <tt>/ora8/m01/app/oracle/product/8.1.7/assistants/dbca/jlib/sqlora8.sh</tt>
        </p></li><li><p> 
          It will alert you that the script has been saved
          successfully.
        </p></li><li><p> 
          Now we need to customize the database configuration a bit. While
          still logged on as <tt>oracle</tt>, edit
          the database initialization script (run when the db loads). The
          scripts are kept in
          <tt>$ORACLE_HOME/dbs</tt> and the name of
          the script is usually
          <tt>init</tt><span class="emphasis"><em>SID</em></span><tt>.ora</tt>
          where <span class="emphasis"><em>SID</em></span> is the SID of your
          database. Assuming your
          <tt>$ORACLE_HOME</tt> matches our default
          of
          <tt>/ora8/m01/app/oracle/product/8.1.7</tt>,
          the following will open the file for editing.
        </p><pre class="programlisting">
oracle:~$ emacs /ora8/m01/app/oracle/product/8.1.7/dbs/initora8.ora</pre></li><li><p>
          Add the following line to the end:
        </p><pre class="programlisting">
nls_date_format = &quot;YYYY-MM-DD&quot;</pre></li><li><p>
          Now find the <tt>open_cursors</tt> line
          in the file. If you're using
          <tt>emacs</tt> scroll up to the top of
          the buffer and do <tt>CTRL-S</tt> and
          type <tt>open_cursors</tt> to find the
          line. The default is <tt>100</tt>. Change
          it to <tt>500</tt>.
        </p><pre class="programlisting">
open_cursors = 500</pre></li><li><p>
          Save the file. In emacs, do <tt>CTRL-X
            CTRL-S</tt> to save followed by
          <tt>CTRL-X CTRL-C</tt> to exit or use
          the menu.
        </p></li><li><p>
          At this point, you are ready to initiate database creation. We
          recommend shutting down X to free up some RAM unless you have 256
          MB of RAM or more.  You can do this quickly by doing a
          <tt>CRTL-ALT-BACKSPACE</tt>, but make
          sure you have saved any files you were editing. You should now be
          returned to a text shell prompt. If you get sent to a graphical
          login screen instead, switch to a virtual console by doing
          <tt>CRTL-ALT-F1</tt>. Then login as
          <tt>oracle</tt>.
        </p></li><li><p>        
          Change to the directory where the database creation script is and
          run it:
        </p><pre class="programlisting">
oracle:~$ cd /ora8/m01/app/oracle/product/8.1.7/assistants/dbca/jlib
oracle:/ora8/m01/app/oracle/product/8.1.7/assistants/dbca/jlib$ ./sqlora8.sh</pre><p>
          In some instances, Oracle will save the file to
          <tt>/ora8/m01/app/oracle/product/8.1.7/assistants/dbca</tt>
          Try running the script there if your first attempt does not
          succeed.
        </p></li><li><p>
          Your database will now be built. It will take &gt; 1 hour - no
          fooling.  You will see lots of errors scroll by (like:
          &quot;ORA-01432: public synonym to be dropped does not
          exist&quot;) Fear not, this is normal.
        </p><p>
          Eventually, you'll be returned to your shell prompt. In the
          meantime, relax, you've earned it.
        </p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><h3 class="title"><a name="istall-oracle-test"></a>Acceptance Test</h3></div></div><p>
      For this step, open up a terminal and
      <tt>su</tt> to
      <tt>oracle</tt> as usual. You should be
      running X and Netscape (or other web browser) for this phase.
    </p><div class="itemizedlist"><ul type="disc"><li><p>
          You need to download the &quot;Oracle Acceptance Test&quot; file.
          It's available <a href="files/acceptance-sql.txt" target="_top">here</a> and at <a href="http://philip.greenspun.com/wtr/oracle/acceptance-sql.txt" target="_top">http://philip.greenspun.com/wtr/oracle/acceptance-sql.txt</a>.
          Save the file to <tt>/tmp</tt>
        </p></li><li><p>
          In the oracle shell, copy the file.
        </p><pre class="programlisting">
oracle:~$ cp /tmp/acceptance-sql.txt /tmp/acceptance.sql</pre></li><li><p>        
          Once you've got the acceptance test file all set, stay in
          your term and type the following:
        </p><pre class="programlisting">
oracle:~$ sqlplus system/manager</pre><p>
          SQL*Plus should startup. If you get an <tt>ORA-01034:
            Oracle not Available</tt> error, it is because your
          Oracle instance is not running.  You can manually start it as
          the <tt>oracle</tt> user.</p><pre class="programlisting">
oracle:~$ svrmgrl
SVRMGR&gt; connect internal
SVRMGR&gt; startup</pre></li><li><p>
          Now that you're into SQL*Plus, change the default passwords
          for system, sys, and ctxsys to &quot;alexisahunk&quot; (or to
          something you'll remember):
        </p><pre class="programlisting">
SQL&gt; alter user system identified by alexisahunk;
SQL&gt; alter user sys identified by alexisahunk;
SQL&gt; alter user ctxsys identified by alexisahunk;</pre></li><li><p>
          Verify that your date settings are correct. 
        </p><pre class="programlisting">
SQL&gt; select sysdate from dual;</pre><p>
          If you don't see a date that fits the format
          <tt>YYYY-MM-DD</tt>, please read <a href="oracle.html#install-oracle-troubleshooting" title="Troubleshooting Oracle Dates">the section called &#8220;Troubleshooting Oracle Dates&#8221;</a>.
        </p></li><li><p>
          At this point we are going to hammer your database with an
          intense acceptance test. This usually takes around 30 minutes.
        </p><pre class="programlisting">
SQL&gt; @ /tmp/acceptance.sql

; A bunch of lines will scroll by.  You'll know if the test worked if
; you see this at the end:

SYSDATE
----------
2000-06-10

SQL&gt;</pre><p>
          Many people encounter an error regarding <tt>maximum
            key length</tt>:
        </p><pre class="programlisting">
ERROR at line 1:
ORA-01450: maximum key length (758) exceeded</pre><p>
          This error occurs if your database block size is wrong and is
          usually suffered by people trying to load OpenACS into a
          pre-existing database.  Unfortunately, the only solution is to
          create a new database with a block size of at least
          <tt>4096</tt>. For instructions on how to
          do this, see <a href="oracle.html#install-oracle-create" title="Creating the First Database">the section called &#8220;Creating the First Database&#8221;</a> above. You
          can set the parameter using the
          <tt>dbassist</tt> program or by setting
          the <tt>DB_BLOCK_SIZE</tt> parameter in
          your database's creation script.
        </p><p>
          If there were no errors, then consider yourself fortunate. Your
          Oracle installation is working.
        </p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><h3 class="title"><a name="install-oracle-automating"></a>Automating Startup &amp; Shutdown</h3></div></div><p>
      You will want to automate the database startup and shutdown process.
      It's probably best to have Oracle spring to life when you boot up
      your machine.
    </p><div class="itemizedlist"><ul type="disc"><li><p> 
          Oracle includes a script called
          <tt>dbstart</tt> that can be used to
          automatically start the database. Unfortunately, the script
          shipped in the Linux distribution does not work out of the
          box. The fix is simple. Follow these directions to apply
          it. First, save <a href="files/dbstart.txt" target="_top">dbstart</a> to
          <tt>/tmp</tt>. Then, as 
          <tt>oracle</tt>, do the following:
        </p><pre class="programlisting">
oracle:~$ cp /tmp/dbstart.txt /ora8/m01/app/oracle/product/8.1.7/bin/dbstart 
oracle:~$ chmod 755 /ora8/m01/app/oracle/product/8.1.7/bin/dbstart</pre></li><li><p>

          While you're logged in as
          <tt>oracle</tt>, you should configure the
          <tt>oratab</tt> file to load your
          database at start.  Edit the file
          <tt>/etc/oratab</tt>: 
        </p><div class="itemizedlist"><ul type="circle"><li><p>You will see this line. </p><pre class="programlisting">
ora8:/ora8/m01/app/oracle/product/8.1.7:N</pre><p>
              By the way, if you changed the service name or have multiple
              databases, the format of this file is:
            </p><p>
              <span class="emphasis"><em><tt>service_name:$ORACLE_HOME:Y || N
                  (for autoload)</tt></em></span>
            </p></li><li><p>
              Change the last letter from &quot;N&quot; to
              &quot;Y&quot;. This tells Oracle that you want the database
              to start when the machine boots. It should look like this.
            </p><pre class="programlisting">
ora8:/ora8/m01/app/oracle/product/8.1.7:Y</pre></li><li><p>
              Save the file &amp; quit the terminal.
            </p></li></ul></div></li><li><p> 
          You need a script to automate startup and shutdown. Save <a href="files/oracle8i.txt" target="_top">oracle8i.txt</a> in
          <tt>/tmp</tt>. Then login as
          <tt>root</tt> and install the
          script. (Debian users: substitute
          <tt>/etc/init.d</tt> for
          <tt>/etc/rc.d/init.d</tt> throughout 
          this section)
        </p><pre class="programlisting">
oracle:~$ su -
root:~# cp /tmp/oracle8i.txt /etc/rc.d/init.d/oracle8i
root:~# chown root.root /etc/rc.d/init.d/oracle8i
root:~# chmod 755 /etc/rc.d/init.d/oracle8i</pre></li><li><p> 
          Test the script by typing the following commands and checking the
          output. (Debian Users: as root, do <tt>mkdir
          /var/lock/subsys</tt> first)
        </p><pre class="programlisting">
root:~# /etc/rc.d/init.d/oracle8i stop
Oracle 8i auto start/stop
Shutting Oracle8i:
Oracle Server Manager Release 3.1.7.0.0 - Production

Copyright (c) 1997, 1999, Oracle Corporation.  All
Rights Reserved.

Oracle8i Enterprise Edition Release 8.1.7.0.1 -
Production
With the Partitioning option
JServer Release 8.1.7.0.1 - Production

SVRMGR&gt; Connected.
SVRMGR&gt; Database closed.
Database dismounted.
ORACLE instance shut down.
SVRMGR&gt;
Server Manager complete.
Database &quot;ora8&quot; shut down.
      
root:~# /etc/rc.d/init.d/oracle8i start
Oracle 8i auto start/stop
Starting Oracle8i: 
SQL*Plus: Release 8.1.7.0.0 - Production on Wed Mar 6 17:56:02 2002

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

SQL&gt; Connected to an idle instance.
SQL&gt; ORACLE instance started.

Total System Global Area   84713632 bytes
Fixed Size                    73888 bytes
Variable Size              76079104 bytes
Database Buffers            8388608 bytes
Redo Buffers                 172032 bytes
Database mounted.
Database opened.
SQL&gt; Disconnected

Database &quot;ora8&quot; warm started.

Database &quot;ora8&quot; warm started.</pre></li><li><p>        
          If it worked, then run these commands to make the startup and
          shutdown automatic. 
        </p><div class="itemizedlist"><ul type="circle"><li><p>Red Hat users:</p><pre class="programlisting">
root:~# cd /etc/rc.d/init.d/                      
root:~# chkconfig --add oracle8i
root:~# chkconfig --list oracle8i
; You should see:
oracle8i        0:off   1:off   2:off   3:on    4:on    5:on    6:off</pre></li><li><p>Debian users:</p><pre class="programlisting">
root:~# update-rc.d oracle8i defaults
 Adding system startup for /etc/init.d/oracle8i ...
   /etc/rc0.d/K20oracle8i -&gt; ../init.d/oracle8i
   /etc/rc1.d/K20oracle8i -&gt; ../init.d/oracle8i
   /etc/rc6.d/K20oracle8i -&gt; ../init.d/oracle8i
   /etc/rc2.d/S20oracle8i -&gt; ../init.d/oracle8i
   /etc/rc3.d/S20oracle8i -&gt; ../init.d/oracle8i
   /etc/rc4.d/S20oracle8i -&gt; ../init.d/oracle8i
   /etc/rc5.d/S20oracle8i -&gt; ../init.d/oracle8i</pre></li><li><p>SuSE users:</p><pre class="programlisting">
root:~# cd /etc/rc.d/init.d
root:/etc/rc.d/init.d# ln -s /etc/rc.d/init.d/oracle8i K20oracle8i
root:/etc/rc.d/init.d# ln -s /etc/rc.d/init.d/oracle8i S20oracle8i
root:/etc/rc.d/init.d# cp K20oracle8i rc0.d
root:/etc/rc.d/init.d# cp S20oracle8i rc0.d
root:/etc/rc.d/init.d# cp K20oracle8i rc1.d
root:/etc/rc.d/init.d# cp S20oracle8i rc1.d 
root:/etc/rc.d/init.d# cp K20oracle8i rc6.d
root:/etc/rc.d/init.d# cp S20oracle8i rc6.d
root:/etc/rc.d/init.d# cp K20oracle8i rc2.d
root:/etc/rc.d/init.d# cp S20oracle8i rc2.d
root:/etc/rc.d/init.d# cp K20oracle8i rc3.d
root:/etc/rc.d/init.d# cp S20oracle8i rc3.d 
root:/etc/rc.d/init.d# cp K20oracle8i rc4.d  
root:/etc/rc.d/init.d# cp S20oracle8i rc4.d  
root:/etc/rc.d/init.d# cp K20oracle8i rc5.d
root:/etc/rc.d/init.d# cp S20oracle8i rc5.d
root:/etc/rc.d/init.d# rm K20oracle8i
root:/etc/rc.d/init.d# rm S20oracle8i
root:/etc/rc.d/init.d# cd
root:~# SuSEconfig
Started the SuSE-Configuration Tool.
Running in full featured mode.
Reading /etc/rc.config and updating the system...
Executing /sbin/conf.d/SuSEconfig.gdm...   
Executing /sbin/conf.d/SuSEconfig.gnprint...
Executing /sbin/conf.d/SuSEconfig.groff...   
Executing /sbin/conf.d/SuSEconfig.java...    
Executing /sbin/conf.d/SuSEconfig.kdm...   
Executing /sbin/conf.d/SuSEconfig.pcmcia...
Executing /sbin/conf.d/SuSEconfig.perl...
Executing /sbin/conf.d/SuSEconfig.postfix...
Executing /sbin/conf.d/SuSEconfig.sendmail...
Executing /sbin/conf.d/SuSEconfig.susehilf...
Executing /sbin/conf.d/SuSEconfig.susehilf.add...
Executing /sbin/conf.d/SuSEconfig.susewm...
Executing /sbin/conf.d/SuSEconfig.tetex...
Executing /sbin/conf.d/SuSEconfig.ypclient...
Processing index files of all manpages...
Finished.</pre></li></ul></div></li><li><p>
          You also need some scripts to automate startup and shutdown of
          the Oracle8i listener. The listener is a name server that allows
          your Oracle programs to talk to local and remote databases using
          a standard naming convention. It is required for Intermedia Text
          and full site search.
        </p><p>
          Download these three scripts into
          <tt>/tmp</tt>
        </p><div class="itemizedlist"><ul type="circle"><li><p>
              <a href="files/startlsnr.txt" target="_top">startlsnr.txt</a>
            </p></li><li><p>
              <a href="files/stoplsnr.txt" target="_top">stoplsnr.txt</a>
            </p></li><li><p>
              <a href="files/listener8i.txt" target="_top">listener8i.txt</a>
            </p></li></ul></div><p>
          Now issue the following commands (still as
          <tt>root</tt>).
        </p><pre class="programlisting">
root:~# su - oracle
oracle:~$ cp /tmp/startlsnr.txt /ora8/m01/app/oracle/product/8.1.7/bin/startlsnr
oracle:~$ cp /tmp/stoplsnr.txt /ora8/m01/app/oracle/product/8.1.7/bin/stoplsnr    
oracle:~$ chmod 755 /ora8/m01/app/oracle/product/8.1.7/bin/startlsnr
oracle:~$ chmod 755 /ora8/m01/app/oracle/product/8.1.7/bin/stoplsnr
oracle:~$ exit
root:~# cp /tmp/listener8i.txt /etc/rc.d/init.d/listener8i
root:~# cd /etc/rc.d/init.d
root:/etc/rc.d/init.d# chmod 755 listener8i</pre><p>
          Test the listener automation by running the following commands
          and checking the output.
        </p><pre class="programlisting">
root:/etc/rc.d/init.d# ./listener8i stop
Oracle 8i listener start/stop
Shutting down Listener for 8i: 
LSNRCTL for Linux: Version 8.1.7.0.0 - Production on 06-MAR-2002 18:28:49

(c) Copyright 1998, Oracle Corporation.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521)))
The command completed successfully

    
root:/etc/rc.d/init.d# ./listener8i start
Oracle 8i listener start/stop
Starting the Listener for 8i: 
LSNRCTL for Linux: Version 8.1.7.0.0 - Production on 06-MAR-2002 18:28:52

(c) Copyright 1998, Oracle Corporation.  All rights reserved.

Starting /ora8/m01/app/oracle/product/8.1.7/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 8.1.7.0.0 - Production
System parameter file is /ora8/m01/app/oracle/product/8.1.7/network/admin/listener.ora
Log messages written to /ora8/m01/app/oracle/product/8.1.7/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 8.1.7.0.0 - Production
Start Date                06-MAR-2002 18:28:53
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  OFF
SNMP                      OFF
Listener Parameter File   /ora8/m01/app/oracle/product/8.1.7/network/admin/listener.ora
Listener Log File         /ora8/m01/app/oracle/product/8.1.7/network/log/listener.log
Services Summary...
  PLSExtProc        has 1 service handler(s)
  ora8      has 1 service handler(s)
The command completed successfully</pre><p>
          This test will verify that the listener is operating
          normally. Login into the database using the listener naming
          convention.
        </p><p>
          <tt>sqlplus</tt>
          <span class="emphasis"><em><tt>username/password/@SID</tt></em></span>
        </p><pre class="programlisting">
root:~# su - oracle
oracle:~$ sqlplus system/alexisahunk@ora8

SQL&gt; select sysdate from dual;

SYSDATE
----------
2002-02-22

SQL&gt; exit
oracle:~$ exit
root:~#</pre><div class="itemizedlist"><ul type="circle"><li><p>RedHat users:</p><p>
              Now run <tt>chkconfig</tt> on the
              <tt>listener8i</tt> script.
            </p><pre class="programlisting">
root:~# cd /etc/rc.d/init.d/
root:/etc/rc.d/init.d# chkconfig --add listener8i
root:/etc/rc.d/init.d# chkconfig --list listener8i
listener8i      0:off   1:off   2:off   3:on    4:on    5:on    6:off</pre></li><li><p>Debian users:</p><p>
              Now run <tt>update-rc.d</tt> on the 
              <tt>listener8i</tt> script.
            </p><pre class="programlisting">
root:~# update-rc.d listener8i defaults 21 19
 Adding system startup for /etc/init.d/listener8i ...
   /etc/rc0.d/K19listener8i -&gt; ../init.d/listener8i
   /etc/rc1.d/K19listener8i -&gt; ../init.d/listener8i
   /etc/rc6.d/K19listener8i -&gt; ../init.d/listener8i
   /etc/rc2.d/S21listener8i -&gt; ../init.d/listener8i
   /etc/rc3.d/S21listener8i -&gt; ../init.d/listener8i
   /etc/rc4.d/S21listener8i -&gt; ../init.d/listener8i
   /etc/rc5.d/S21listener8i -&gt; ../init.d/listener8i</pre></li></ul></div></li><li><p>
          Test the automation
        </p><p>
          As a final test, reboot your computer and make sure Oracle comes
          up. You can do this by typing
        </p><pre class="programlisting">
root:~# /sbin/shutdown -r -t 0 now</pre><p>
          Log back in and ensure that Oracle started automatically. 
        </p><pre class="programlisting">
joeuser:~$ su - oracle
oracle:~$ sqlplus system/alexisahunk@ora8

SQL&gt; exit</pre></li></ul></div><p>
      Congratulations, your installation of Oracle 8.1.7 is
      complete.
    </p></div><div class="sect2" lang="en"><div class="titlepage"><div><h3 class="title"><a name="install-oracle-troubleshooting"></a>Troubleshooting Oracle Dates</h3></div></div><p>
      Oracle has an internal representation for storing the data based on
      the number of seconds elapsed since some date. However, for the
      purposes of inputing dates into Oracle and getting them back out,
      Oracle needs to be told to use a specific date format. By default, it
      uses an Oracle-specific format which isn't copacetic. You want
      Oracle to use the ANSI-compliant date format which is of form
      <tt>'YYYY-MM-DD'</tt>.
    </p><p>
      To fix this, you should include the following line in
      <tt>$ORACLE_HOME/dbs/init</tt><span class="emphasis"><em>SID</em></span><tt>.ora</tt>
      or for the default case,
      <tt>$ORACLE_HOME/dbs/initora8.ora</tt>
    </p><pre class="programlisting">
nls_date_format = &quot;YYYY-MM-DD&quot;</pre><p>
      You test whether this solved the problem by firing up
      <tt>sqlplus</tt> and typing: 
    </p><pre class="programlisting">
SQL&gt; select sysdate from dual;</pre><p>
      You should see back a date like
      <tt>2000-06-02</tt>. If some of the date is
      chopped off, i.e. like <tt>2000-06-0</tt>,
      everything is still fine. The problem here is that
      <tt>sqlplus</tt> is simply truncating the
      output. You can fix this by typing:
    </p><pre class="programlisting">
SQL&gt; column sysdate format a15
SQL&gt; select sysdate from dual;</pre><p>
      If the date does not conform to this format, double-check that you
      included the necessary line in the init scripts. If it still
      isn't working, make sure that you have restarted the database
      since adding the line:
    </p><pre class="programlisting">
joeuser:~$ svrmgrl
SVRMGR&gt; connect internal
Connected.
SVRMGR&gt; shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.
SVRMGR&gt; startup
ORACLE instance started.</pre><p>
      If you're sure that you have restarted the database since adding
      the line, check your initialization scripts. Make sure that the
      following line is not included:
    </p><pre class="programlisting">
export nls_lang = american</pre><p>
      Setting this environment variable will override the date
      setting. Either delete this line and login again or add the following
      entry to your login scripts <span class="emphasis"><em>after</em></span> the
      <tt>nls_lang</tt> line:
    </p><pre class="programlisting">
export nls_date_format = 'YYYY-MM-DD'</pre><p>
      Log back in again. If adding the
      <tt>nls_date_format</tt> line doesn't
      help, you can ask for advice in our <a href="http://www.openacs.org/bboard/" target="_top">OpenACS forum</a>.
    </p></div><div class="sect2" lang="en"><div class="titlepage"><div><h3 class="title"><a name="install-oracle-procs"></a>Useful Procedures</h3></div></div><div class="itemizedlist"><ul type="disc"><li><p>
          Dropping a tablespace
        </p><div class="itemizedlist"><ul type="circle"><li><p>
              Run sqlplus as the dba: 
            </p><pre class="programlisting">
oracle:~$ sqlplus system/changeme</pre></li><li><p>            
              To drop a user and all of the tables and data owned by that
              user: 
            </p><pre class="programlisting">
SQL&gt; drop user <span class="emphasis"><em>oracle_user_name</em></span> cascade;</pre></li><li><p>
              To drop the tablespace: This will delete everything in the
              tablespace overriding any referential integrity
              constraints. Run this command only if you want to clean out
              your database entirely.
            </p><pre class="programlisting">
SQL&gt; drop tablespace <span class="emphasis"><em>table_space_name</em></span> including contents cascade constraints;</pre></li></ul></div></li></ul></div><p>
      For more information on Oracle, please consult the <a href="http://oradoc.photo.net/" target="_top">documentation</a>.
    </p></div><div class="sect2" lang="en"><div class="titlepage"><div><h3 class="title"><a name="install-oracle-defaults"></a>Defaults</h3></div></div><p>We used the following defaults while installing Oracle.</p><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Variable</th><th>Value</th><th>Reason</th></tr></thead><tbody><tr><td>ORACLE_HOME</td><td>/ora8/m01/app/oracle/product/8.1.7</td><td>This is the default Oracle installation directory.</td></tr><tr><td>ORACLE_SERVICE</td><td>ora8</td><td>The service name is a domain-qualified identifier for
              your Oracle server.</td></tr><tr><td>ORACLE_SID</td><td>ora8</td><td>This is an identifier for your Oracle server.</td></tr><tr><td>ORACLE_OWNER</td><td>oracle</td><td>The user who owns all of the oracle files.</td></tr><tr><td>ORACLE_GROUP</td><td>dba</td><td>The special oracle group. Users in the dba group are
              authorized to do a <tt>connect
              internal</tt> within
              <tt>svrmgrl</tt> to gain full system
              access to the Oracle system.</td></tr></tbody></table></div></div><div class="cvstag">($Id: oracle.html,v 1.11 2003/06/28 05:07:02 joela Exp $)</div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="linux-installation.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="postgres.html">Next</a></td></tr><tr><td width="40%" align="left">Install Linux and supporting software </td><td width="20%" align="center"><a accesskey="u" href="unix-install.html">Up</a></td><td width="40%" align="right"> Install PostGreSQL</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/oracle.html#comments">View comments on this page at openacs.org</a></center></body></html>