Date: Tue, 28 Mar 2000 20:51:19 GMT From: Murray Stokely <murray@dolemite.cdrom.com> To: FreeBSD-gnats-submit@freebsd.org Subject: docs/17638: Added section Handbook/LinuxEmu/Oracle Message-ID: <200003282051.UAA10596@dolemite.cdrom.com>
index | next in thread | raw e-mail
>Number: 17638
>Category: docs
>Synopsis: Added section on installing Oracle for Linux
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-doc
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Tue Mar 28 05:00:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator: Murray Stokely
>Release: FreeBSD 5.0-CURRENT i386
>Organization:
BSDi
>Environment:
>Description:
Date: Fri, 03 Mar 2000 09:34:14 -0800
From: Marcel Moolenaar <marcel@cup.hp.com>
To: Murray Stokely <murray@cdrom.com>
Subject: Re: Linux/Oracle howto -> handbook
Murray Stokely wrote:
> Can I import your Linux / Oracle howto into the FreeBSD handbook?
> The section on Linux emulation is really out of date but I'm working
> on rewriting a good deal of this chapter and it would really help out
> to import your Oracle howto.
You can import the howto, but I think it needs some updates. It seems
that Oracle doesn't work with linux_{base|devtools}-6.1 and that
linux_{base|devtools}-5.2 must be used. I have to verify it, but don't
really have the time right now.
What I'm saying is that the HOWTO itself is a bit out of date. This
doesn't mean that you can't import it, but it's good to know :-)
--
Marcel Moolenaar
mail: marcel@cup.hp.com / marcel@FreeBSD.org
tel: (408) 447-4222
>How-To-Repeat:
I added a note that he talks about above and formatted his docunment in SGML.
>Fix:
Index: chapter.sgml
===================================================================
RCS file: /host/ares/usr/home/ncvs/doc/en_US.ISO_8859-1/books/handbook/linuxemu/chapter.sgml,v
retrieving revision 1.28
diff -u -r1.28 chapter.sgml
--- chapter.sgml 2000/03/23 01:32:00 1.28
+++ chapter.sgml 2000/03/28 20:40:47
@@ -394,6 +394,223 @@
</sect2>
</sect1>
+ <sect1 id="oracle">
+ <title>Installing Oracle</title>
+
+ <para><emphasis>Contributed by Marcel Moolenaar
+ <email>marcel@cup.hp.com</email></emphasis></para>
+
+ <sect2>
+ <title>Preface</title>
+ <para>This document describes the process of installing Oracle
+ 8.0.5 and Oracle 8.0.5.1 Enterprise Edition for Linux onto a
+ FreeBSD machine</para>
+ </sect2>
+
+ <sect2>
+ <title>Installing the Linux environment</title>
+ <para>Make sure you have both linux_base and linux_devtools from
+ the ports collection installed. These ports are added to the
+ collection after the release of FreeBSD 3.2. If you are using
+ FreeBSD 3.2 or an older version for that matter, update your
+ ports collection. You may want to consider updating your FreeBSD
+ version too. If you run into difficulties with linux_base-6.1 or
+ linux_devtools-6.1 you may have to use version 5.2 of these
+ packages.</para>
+
+ <para>If you want to run the intelligent agent, you'll
+ also need to install the Red Hat tcl package:
+ <filename>tcl-8.0.3-20.i386.rpm</filename>. The general command
+ for installing packages with the official RPM port is :</para>
+
+ <screen>&prompt.root; <userinput>rpm -i --ignoreos --root /compat/linux --dbpath /var/lib/rpm <replaceable>package</replaceable></userinput></screen>
+
+ <para>Installation of the package should not generate any
+ errors.</para>
+ </sect2>
+
+ <sect2>
+ <title>Creating the Oracle environment</title>
+ <para>Before you can install Oracle, you need to set up a proper
+ environment. This document only describes what to do
+ *specially* to run Oracle for Linux on FreeBSD, not what has
+ been described in the Oracle installation guide.</para>
+
+ <sect3 id="kernel-tuning">
+ <title>Kernel Tuning</title>
+ <para>As described in the Oracle installation guide, you need
+ to set the maximum size of shared memory. Don't use SHMMAX
+ under FreeBSD. SHMMAX is merely calculated out of SHMMAXPGS
+ and PGSIZE. Therefore define SHMMAXPGS. All other options can
+ be used as described in the guide. For example:</para>
+
+<LITERALLAYOUT>
+<emphasis>options SHMMAXPGS=10000</emphasis>
+<emphasis>options SHMMNI=100</emphasis>
+<emphasis>options SHMSEG=10</emphasis>
+<emphasis>options SEMMNS=200</emphasis>
+<emphasis>options SEMMNI=70</emphasis>
+<emphasis>options SEMMSL=61</emphasis>
+</LITERALLAYOUT>
+ <para>Set these options to suit your intended use of
+ Oracle.</para>
+
+ <para>Also, make sure you have the following options in your
+ kernel config-file:</para>
+
+<LITERALLAYOUT>
+<emphasis>options SYSVSHM #SysV shared memory</emphasis>
+<emphasis>options SYSVSEM #SysV semaphores</emphasis>
+<emphasis>options SYSVMSG #SysV interprocess communication</emphasis>
+</LITERALLAYOUT>
+ </sect3>
+
+ <sect3 id="oracle-account">
+ <title>Oracle account</title> <para>Create an Oracle account
+ just as you would create any other account. The Oracle account
+ is special only that you need to give it a Linux shell. Add
+ <filename>/compat/linux/bin/bash</filename> to
+ <filename>/etc/shells</filename> and set the shell for the
+ Oracle account to
+ <filename>/compat/linux/bin/bash</filename>.</para>
+
+ </sect3>
+
+ <sect3 id="environment">
+ <title>Environment</title>
+ <para>Besides the normal Oracle variables, such as ORACLE_HOME
+ and ORACLE_SID you must set the following environment
+ variables:</para>
+
+<LITERALLAYOUT>
+<emphasis>LD_LIBRARY_PATH=$ORACLE_HOME/lib
+CLASSPATH=$ORACLE_HOME/jdbc/lib/classes111.zip
+PATH=/compat/linux/bin:/compat/linux/sbin:/compat/linux/usr/bin:/compat/linux/usr/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:$ORACLE_HOME/bin</emphasis>
+</LITERALLAYOUT>
+
+ <para>It is advised to set all the environment variables in
+ <filename>.profile</filename>. A complete example is:</para>
+
+<programlisting>ORACLE_BASE=/oracle; export ORACLE_BASE
+ORACLE_HOME=/oracle; export ORACLE_HOME
+LD_LIBRARY_PATH=$ORACLE_HOME/lib
+export LD_LIBRARY_PATH
+ORACLE_SID=ORCL; export ORACLE_SID
+ORACLE_TERM=386x; export ORACLE_TERM
+CLASSPATH=$ORACLE_HOME/jdbc/lib/classes111.zip
+export CLASSPATH
+PATH=/compat/linux/bin:/compat/linux/sbin:/compat/linux/usr/bin:/compat/linux/usr/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:$ORACLE_HOME/bin
+export PATH</programlisting>
+ </sect3>
+
+ </sect2>
+
+ <sect2>
+ <title>Installing Oracle</title>
+
+ <para>Due to a slight inconsistency in the Linux emulator, you
+ need to create a directory named <filename>.oracle</filename> in
+ <filename>/var/tmp</filename> before you start the
+ installer. Either make it world writable or let it be owner by
+ the oracle user. You should be able to install Oracle without
+ any problems. If you have problems, check your Oracle
+ distribution and/or configuration first! After you have
+ installed Oracle, apply the patches described in the next two
+ subsections.</para>
+
+ <para>A frequent problem is that the TCP protocol
+ adapter is not installed right. As a consequence, you cannot
+ start any TCP listeners. The following actions help solve this
+ problem:</para>
+
+ <screen>
+ &prompt.root; <userinput>cd $ORACLE_HOME/network/lib</userinput>
+ &prompt.root; <userinput>make -f ins_network.mk ntcontab.o</userinput>
+ &prompt.root; <userinput>cd $ORACLE_HOME/lib</userinput>
+ &prompt.root; <userinput>ar r libnetwork.a ntcontab.o</userinput>
+ &prompt.root; <userinput>cd $ORACLE_HOME/network/lib</userinput>
+ &prompt.root; <userinput>make -f ins_network.mk install</userinput>
+ </screen>
+
+ <para>Don't forget to run <filename>root.sh</filename>
+ again!</para>
+
+ <sect3 id="patch-root">
+ <title>Patching root.sh</title>
+
+ <para>When installing Oracle, some actions, which need to be
+performed as root, are recorded in a shell script called
+root.sh. root.sh is written in the orainst directory. Apply the
+following patch to root.sh, to have it use to proper location of chown
+or alternatively run the script under a Linux native shell.</para>
+
+<programlisting>
+*** orainst/root.sh.orig Tue Oct 6 21:57:33 1998
+--- orainst/root.sh Mon Dec 28 15:58:53 1998
+***************
+*** 31,37 ****
+# This is the default value for CHOWN
+# It will redefined later in this script for those ports
+# which have it conditionally defined in ss_install.h
+! CHOWN=/bin/chown
+#
+# Define variables to be used in this script
+--- 31,37 ----
+# This is the default value for CHOWN
+# It will redefined later in this script for those ports
+# which have it conditionally defined in ss_install.h
+! CHOWN=/usr/sbin/chown
+#
+# Define variables to be used in this script
+</programlisting>
+
+ <para>When you don't install Oracle from CD, you can path the
+ source for <filename>root.sh</filename>. It is called rthd.sh and
+ is located in the orainst directory in the source tree.</para>
+
+ </sect3>
+
+ <sect3 id="patch-tcl">
+ <title>Patching genclntsh</title>
+
+ <para>The script genclntsh is used to create a single shared
+client library. It is used when building the demos. Apply the
+following patch to comment out the definition of PATH:</para>
+
+
+<programlisting>
+*** bin/genclntsh.orig Wed Sep 30 07:37:19 1998
+--- bin/genclntsh Tue Dec 22 15:36:49 1998
+***************
+*** 32,38 ****
+#
+# Explicit path to ensure that we're using the correct commands
+#PATH=/usr/bin:/usr/ccs/bin export PATH
+! PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin export PATH
+#
+# each product MUST provide a $PRODUCT/admin/shrept.lst
+--- 32,38 ----
+#
+# Explicit path to ensure that we're using the correct commands
+#PATH=/usr/bin:/usr/ccs/bin export PATH
+! #PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin export PATH
+#
+# each product MUST provide a $PRODUCT/admin/shrept.lst
+</programlisting>
+
+ </sect3>
+ </sect2>
+ <sect2>
+ <title>Running Oracle</title>
+
+ <para>When you have followed the instructions, you should be
+able to run Oracle as if it was run on Linux itself. Wether that is
+good or bad, depends on how you value Linux :-) Until we have a native
+FreeBSD version of Oracle supported by Oracle, I think Oracle for
+Linux is a good alternative.</para>
+ </sect2>
+ </sect1>
+
<sect1>
<title>Advanced Topics</title>
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003282051.UAA10596>
