<!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 “Defaults”</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&topic_id=11&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 ":0.0" 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 "<tt>Next</tt>" </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 "File Locations" screen in the OUI: </p><div class="itemizedlist"><ul type="circle"><li><p> "Source" path should have been prefilled with "(wherever you mounted the CDROM)<tt>/stage/products.jar</tt>" </p></li><li><p> "destination" path says "<tt>/ora8/m01/app/oracle/product/8.1.7</tt>" </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 “Pre-Installation Tasks”</a> </p></li><li><p> Click "Next" (a pop up window will display Loading Product information). </p></li></ul></div></li><li><p> The "Unix Group Name" 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 "Next" </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 "Retry" </p></li></ul></div></li><li><p> The "Available Products" screen in the OUI: </p><div class="itemizedlist"><ul type="circle"><li><p> Select "Oracle 8i Enterprise Edition 8.1.7.1.0" </p></li><li><p> Click "Next" </p></li></ul></div></li><li><p> The "Installation Types" screen </p><div class="itemizedlist"><ul type="circle"><li><p> Select the "Custom" installation type. </p></li><li><p> Click "Next" </p></li></ul></div></li><li><p> The "Available Product Components" screen </p><div class="itemizedlist"><ul type="circle"><li><p> In addition to the defaults, make sure that "Oracle SQLJ 8.1.7.0," "Oracle Protocol Support 8.1.7.0.0," and "Linux Documentation 8.1.7.0.0" are also checked. </p></li><li><p> Click "Next" </p></li><li><p> A progress bar will appear for about 1 minute. </p></li></ul></div></li><li><p> The "Component Locations" screen in the OUI </p><div class="itemizedlist"><ul type="circle"><li><p> Click on the "Java Runtime Environment 1.1.8" It should have the path "<tt>/ora8/m01/app/oracle/jre/1.1.8</tt>" </p></li><li><p> Click "Next" </p></li><li><p> A progress bar will appear for about 1 minute. </p></li></ul></div></li><li><p> The "Privileged Operation System Groups" screen in the OUI </p><div class="itemizedlist"><ul type="circle"><li><p> Enter "dba" for "Database Administrator (OSDBA) Group" </p></li><li><p> Enter "dba" for the "Database Operator (OSOPER) Group" </p></li><li><p> Click "Next" </p></li><li><p> A progress bar will appear for about 1 minute. </p></li></ul></div></li><li><p> The "Authentication Methods" screen </p><div class="itemizedlist"><ul type="circle"><li><p> Click "Next" </p></li></ul></div></li><li><p> The next screen is "Choose JDK home directory" </p><div class="itemizedlist"><ul type="circle"><li><p> Keep the default path: <tt>/usr/local/java</tt> </p></li><li><p> Click "Next" </p></li></ul></div></li><li><p> The "Create a Database" screen in the OUI </p><div class="itemizedlist"><ul type="circle"><li><p> Select "No" as we will do this later, after some important configuration changes. </p></li><li><p> Click "Next" </p></li></ul></div></li><li><p> The next screen is "Oracle Product Support" </p><div class="itemizedlist"><ul type="circle"><li><p> TCP should be checked with "Status" listed as Required </p></li><li><p> Click "Next" </p></li></ul></div></li><li><p> The "Summary" screen in the OUI </p><div class="itemizedlist"><ul type="circle"><li><p> Check the "Space Requirements" section to verify you have enough disk space for the install. </p></li><li><p> Check that "(144 products)" is in the "New Installations" section title. </p></li><li><p> Click "Install" </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 "Setup Privileges" 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 "OK" </p></li><li><p> The "Configuration Tools" 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 "Welcome" screen in the "net 8 Configuration Assistant" </p><div class="itemizedlist"><ul type="circle"><li><p> Make sure the "Perform Typical installation" is <span class="strong">not</span> selected. </p></li><li><p> Click "Next" </p></li><li><p> The "Directory Service Access" screen in the "Net 8 Configuration Assistant" </p></li><li><p> Select "No" </p></li><li><p> Click "Next" </p></li></ul></div></li><li><p> The "Listener Configuration, Listener Name" screen in the "Net 8 Configuration Assistant" </p><div class="itemizedlist"><ul type="circle"><li><p> Accept the default listener name of "LISTENER" </p></li><li><p> Click "Next" </p></li></ul></div></li><li><p> The "Listener Configuration, Select Protocols" screen in the "Net 8 Configuration Assistant" </p><div class="itemizedlist"><ul type="circle"><li><p> The only choice in "Select protocols:" should be "TCP/IP" </p></li><li><p> Click "Next" </p></li></ul></div></li><li><p> The "Listener Configuration TCP/IP Protocol" screen in the "Net 8 Configuration Assistant" </p><div class="itemizedlist"><ul type="circle"><li><p> Default Port should be 1521 and selected. </p></li><li><p> Click "Next" </p></li></ul></div></li><li><p> The "Listener Configuration, More Listeners" screen in the "Net 8 Configuration Assistant" </p><div class="itemizedlist"><ul type="circle"><li><p> Select "No" </p></li><li><p> Click "Next" </p></li></ul></div></li><li><p> The "Listener Configuration Done" screen in the "Net 8 Configuration Assistant" </p><div class="itemizedlist"><ul type="circle"><li><p> Click "Next" </p></li></ul></div></li><li><p> The "Naming Methods Configuration" screen in the "Net 8 Configuration Assistant" </p><div class="itemizedlist"><ul type="circle"><li><p> Select "No" </p></li><li><p> Click "Next" </p></li></ul></div></li><li><p> The "Done" screen in the "Net 8 Configuration Assistant" </p><div class="itemizedlist"><ul type="circle"><li><p> Click "Finish" </p></li></ul></div></li><li><p> The "End of Installation" screen in the OUI </p><div class="itemizedlist"><ul type="circle"><li><p> Click "Exit" </p></li><li><p> Click "Yes" 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 "Welcome" screen in the Oracle Database Configuration Agent (ODCA) </p><div class="itemizedlist"><ul type="circle"><li><p> Select "Create a database" </p></li><li><p> Click "Next" </p></li></ul></div></li><li><p> The "Select database type" screen in the ODCA </p><div class="itemizedlist"><ul type="circle"><li><p> Select "Custom" </p></li><li><p> Click "Next" </p></li></ul></div></li><li><p> The "Primary Database Type" window in ODCA </p><div class="itemizedlist"><ul type="circle"><li><p> Select "Multipurpose" </p></li><li><p> Click "Next" </p></li></ul></div></li><li><p> The "concurrent users" screen of the ODCA </p><div class="itemizedlist"><ul type="circle"><li><p> Select "60" concurrent users. </p></li><li><p> Click "Next" </p></li></ul></div></li><li><p> Select "<tt>Dedicated Server Mode</tt>", click "<tt>Next</tt>" </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 "Global Database Name", enter "<tt>ora8</tt>"; for "SID", also enter "<tt>ora8</tt>" (it should do this automatically). Click <tt>"Change Character Set</tt> and select <tt>UTF8</tt>. Click "<tt>Next</tt>". </p></li><li><p> Accept the defaults for the next screen (control file location). Click "<tt>Next</tt>" </p></li><li><p> Go to the "temporary" and "rollback" tabs, and change the Size (upper-right text box) to <tt>150</tt>MB. Click "<tt>Next</tt>" </p></li><li><p> Increase the redo log sizes to <tt>10000K</tt> each. Click "<tt>Next</tt>" </p></li><li><p> Use the default checkpoint interval & timeout. Click "<tt>Next</tt>" </p></li><li><p> Increase "<tt>Processes</tt>" to <tt>100</tt>; "<tt>Block Size</tt>" 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 "<tt>Next</tt>" </p></li><li><p> Finally, select "<tt>Save information to a shell script</tt>" and click "<tt>Finish</tt>" (We're going to examine the contents of this file before creating our database.) </p></li><li><p> Click the "<tt>Save</tt>" 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 = "YYYY-MM-DD"</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 > 1 hour - no fooling. You will see lots of errors scroll by (like: "ORA-01432: public synonym to be dropped does not exist") 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 "Oracle Acceptance Test" 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> connect internal SVRMGR> startup</pre></li><li><p> Now that you're into SQL*Plus, change the default passwords for system, sys, and ctxsys to "alexisahunk" (or to something you'll remember): </p><pre class="programlisting"> SQL> alter user system identified by alexisahunk; SQL> alter user sys identified by alexisahunk; SQL> alter user ctxsys identified by alexisahunk;</pre></li><li><p> Verify that your date settings are correct. </p><pre class="programlisting"> SQL> 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 “Troubleshooting Oracle Dates”</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> @ /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></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 “Creating the First Database”</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 & 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 "N" to "Y". 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 & 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> Connected. SVRMGR> Database closed. Database dismounted. ORACLE instance shut down. SVRMGR> Server Manager complete. Database "ora8" 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> Connected to an idle instance. SQL> 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> Disconnected Database "ora8" warm started. Database "ora8" 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 -> ../init.d/oracle8i /etc/rc1.d/K20oracle8i -> ../init.d/oracle8i /etc/rc6.d/K20oracle8i -> ../init.d/oracle8i /etc/rc2.d/S20oracle8i -> ../init.d/oracle8i /etc/rc3.d/S20oracle8i -> ../init.d/oracle8i /etc/rc4.d/S20oracle8i -> ../init.d/oracle8i /etc/rc5.d/S20oracle8i -> ../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> select sysdate from dual; SYSDATE ---------- 2002-02-22 SQL> 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 -> ../init.d/listener8i /etc/rc1.d/K19listener8i -> ../init.d/listener8i /etc/rc6.d/K19listener8i -> ../init.d/listener8i /etc/rc2.d/S21listener8i -> ../init.d/listener8i /etc/rc3.d/S21listener8i -> ../init.d/listener8i /etc/rc4.d/S21listener8i -> ../init.d/listener8i /etc/rc5.d/S21listener8i -> ../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> 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 = "YYYY-MM-DD"</pre><p> You test whether this solved the problem by firing up <tt>sqlplus</tt> and typing: </p><pre class="programlisting"> SQL> 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> column sysdate format a15 SQL> 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> connect internal Connected. SVRMGR> shutdown Database closed. Database dismounted. ORACLE instance shut down. SVRMGR> 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> 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> 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>