<revremark>For inclusion in TLDP: Completed XML article structure with articleinfo, section IDs for cross-referencing; technical, language, grammar and spelling review.</revremark>
<para>This tutorial describes how to install Oracle 9i on Fedora Core 3 or greater.</para>
</abstract>
</articleinfo>
<sect1id="sect_01">
<title>1. Introduction</title>
<sect2id="sect_01_01"><title>What you need to know</title>
<para>This tutorial was written due to my frustration on installing Oracle 9i on FC3. Basically 9i installation on RAS 1,2,3 RH 9, FC1, FC2 is documented fairly well but it is hard to find anything worthwhile on FC3; some people even suggested that installing Oracle 9i on FC3 is not possible. This HOWTO attempts to condense all my experience and findings with any such info peculiar to FC3, which was before scattered all over the web, into one concise but useful document.</para>
<para>I hope you will find this short tutorial useful.</para>
<para>If you need to install Oracle 9i on FC3, you should be aware of the following facts:</para>
<orderedlist>
<listitem>
<para>Fedora is not *Officially Supported* by Oracle Corp.</para>
</listitem>
<listitem>
<para>Oracle 9i installation is difficult but possible on FC3.</para>
</listitem>
<listitem>
<para>Oracle 9i CANNOT be linked with the libraries used by gcc 3.4. On FC3 you need to use the FC2 GCC compat libraries.</para>
</listitem>
<listitem>
<para>The Oracle 10 G installation method does NOT WORKS with 9i.</para>
</listitem>
<listitem>
<para>This HOWTO deals with RedHat products >= FC3 or higher or gcc version greater than 2.9. If you are installing any other RedHat product you might want to have a look at other excellent tutorials, for instance <ulinkurl="http://www.puschitz.com/OracleOnLinux.shtml">http://www.puschitz.com/OracleOnLinux.shtml</ulink> and <ulinkurl="http://oracle-base.com/">http://oracle-base.com/</ulink>.</para>
</listitem>
</orderedlist>
<para>Also keep in mind: </para>
<orderedlist>
<listitem>
<para>This HOWTO aims only to assist you. This is not an OFFICIAL Oracle document.</para>
</listitem>
<listitem>
<para>I am not a DBA. Please do not contact me for matters other than the content of this document. I will not help you to set up your database. If you need help with that, check the Oracle forums.</para>
</listitem>
<listitem>
<para>The next step for me is probably to write some Bash or Perl
scripts to fully automate this tedious and boring, frustrating,
manual process but that depends on spare time I get. Your ideas are welcome.</para>
<para>I would like to thank Jean François for helping me out with the most
tricky parts.</para>
</sect2>
<sect2id="sect_01_03"><title>Availability and Feedback</title>
<para>The latest version can be found at <ulinkurl="http://www.pagux.com/oracle9ionfedora3.html"/>.</para>
<para>I rely on you, the reader, to make this HOWTO useful. If you have
any suggestions, corrections or comments, please send them to me and I will try to incorporate them in the next revision.</para>
</sect2>
<sect2id="sect_01_04"><title>Licensing Information and Liability</title>
<para>Copyright 2005 Gaurav Prasad</para>
<para>This HOWTO is free documentation; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version. A copy of the license is available at <ulinkurl="http://www.gnu.org/copyleft/fdl.html"/>.</para>
<para>This document is distributed in the hope that it will be useful,
but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. No liability for the contents of this document can be accepted.
Use the concepts, examples and information at your own risk.
There may be errors and inaccuracies, that could be damaging to
your system. Proceed with caution, and although accidents are highly
unlikely, the author(s) do not take any responsibility.
</para>
<para>Linux is a registered trademark of Linus Torvalds.</para>
<para>
All copyrights are held by their by their respective owners,
unless specifically noted otherwise. Use of a term in this
document should not be regarded as affecting the validity of any
trademark or service mark. Naming of particular products or
<para>Edit <filename>.bash_profile</filename> in <emphasis>oracle</emphasis>'s home directory and add the following, for instance using <command>vim</command>:</para>
<para>Make sure that you keep your existing GCC installation, or a large part of your software will not work or can not be compiled any more. In case these packages are already installed on your system with newer version numbers, use <command>rpm <option>-i --force</option></command> to install the older ones next to the newer ones.</para>
</caution>
<para>From the Fedora Core THREE subtree, get the <application>compat-db</application> package.</para>
<para>If you don't install GCC compat libraries as above you get
<para>You can now connect to your desktop or optionally run the installation remotely, for instance using <application>VNC</application>.for instance running the installer from your Windows desktop
</para>
</sect2>
<sect2id="sect_07_03"><title>Start the Installation</title>
<para>Start the graphical installation application:</para>
<sect1id="sect_08"><title>Create a Startup Script</title>
<para>In order for the Oracle server to start automatically at system boot time, create the file <filename>/etc/init.d/oracle</filename> like this:</para>
<screen>
#!/bin/bash
#
# Run-level Startup script for the Oracle Instance and Listener
#
# chkconfig: 345 91 19
# description: Startup/Shutdown Oracle listener and instance
ORA_HOME="/u01/app/oracle/product/9.2.0.1.0"
ORA_OWNR="oracle"
# if the executables do not exist -- display error
if [ ! -f $ORA_HOME/bin/dbstart -o ! -d $ORA_HOME ]
then
echo "Oracle startup: cannot start"
exit 1
fi
# depending on parameter -- startup, shutdown, restart
# of the instance and listener or usage display
case "$1" in
start)
# Oracle listener and instance startup
echo -n "Starting Oracle: "
su - $ORA_OWNR -c "$ORA_HOME/bin/lsnrctl start"
su - $ORA_OWNR -c $ORA_HOME/bin/dbstart
touch /var/lock/subsys/oracle
echo "OK"
;;
stop)
# Oracle listener and instance shutdown
echo -n "Shutdown Oracle: "
su - $ORA_OWNR -c "$ORA_HOME/bin/lsnrctl stop"
su - $ORA_OWNR -c $ORA_HOME/bin/dbshut
rm -f /var/lock/subsys/oracle
echo "OK"
;;
reload|restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 start|stop|restart|reload"
exit 1
esac
exit 0
</screen>
<para>Now run <command>chkconfig <filename>oracle</filename></command> for updating the run level information.</para>
<para>Try <command>service <parameter>oracle start|stop|restart</parameter></command> to check that everything works as expected now.</para>
<para>If you reached this step without errors: congratulations. Else, check <xreflinkend="sect_09"/> for troubleshooting suggestions.</para>
<para>This error happens when you reboot and try to login. You will get lots of errors when the database instance is not mounted/started automatically.</para>
<para>Solution:</para>
<orderedlist>
<listitem><para>Check <filename>/etc/oratab</filename> and make sure that <option>*:/opt/oracle/OraHome1</option> and <option>ordb:/opt/oracle/OraHome1</option> are set to <quote>Y</quote> (YES).</para></listitem>
<listitem><para>Try to initialize the database: <command>$ORACLE_HOME/bin/dbstart</command>.</para></listitem>
</orderedlist>
<para>ERROR:</para>
<screen>
No start entry for SID * at /opt/oracle/OraHome1 in /etc/oratab
</screen>
<para>This might be caused by a bug in the dbstart script which searches for the sid file in the wrong place.</para>