Add information about running Oracle for Linux. Based on the PR, but

various changes made to the markup and/or indentation.

PR:             docs/17638
Submitted by:   Murray Stokely <murray>
Written by:     marcel

While I'm here, prepend 'linuxemu-' to the IDs in this file, so they're
consistent with our other usage.
This commit is contained in:
Nik Clayton 2000-04-30 22:33:03 +00:00
parent c3981b8917
commit 2ef07c56c5
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=7126
2 changed files with 498 additions and 16 deletions

View file

@ -1,7 +1,7 @@
<!--
The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/linuxemu/chapter.sgml,v 1.27 2000/03/02 00:00:41 nik Exp $
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/linuxemu/chapter.sgml,v 1.28 2000/03/23 01:32:00 jim Exp $
-->
<chapter id="linuxemu">
@ -46,10 +46,10 @@
calls, such as enabling virtual 8086 mode.</para>
<para>For information on installing the Linux binary compatibility
mode, see the <link linkend="lbc-install">next section</link>.</para>
mode, see the <link linkend="linuxemu-lbc-install">next section</link>.</para>
</sect1>
<sect1 id="lbc-install">
<sect1 id="linuxemu-lbc-install">
<title>Installation</title>
<para>With the advent of 3.0-RELEASE, it is no longer necessary to
@ -96,10 +96,10 @@ Id Refs Address Size Name
<title>Installing Linux Runtime Libraries</title>
<para>This can be done one of two ways, either by using the <link
linkend="libs-port">linux_base</link> port, or by installing them
<link linkend="libs-manually">manually</link>.</para>
linkend="linuxemu-libs-port">linux_base</link> port, or by installing them
<link linkend="linuxemu-libs-manually">manually</link>.</para>
<sect3 id="libs-port">
<sect3 id="linuxemu-libs-port">
<title>Installing using the linux_base port</title>
<para>This is by far the easiest method to use when installing the
@ -116,7 +116,7 @@ Id Refs Address Size Name
a problem.</para>
</sect3>
<sect3 id="libs-manually">
<sect3 id="linuxemu-libs-manually">
<title>Installing libraries manually</title>
<para>If you do not have the &ldquo;ports&rdquo; collection
@ -276,7 +276,7 @@ multi on</programlisting>
</sect2>
</sect1>
<sect1 id="mathematica">
<sect1 id="linuxemu-mathematica">
<title>Installing Mathematica</title>
<para><emphasis>Updated for Mathematica version 4.0 by Murray Stokely
@ -394,6 +394,247 @@ disco.example.com 7115-70839-20412</screen>
</sect2>
</sect1>
<sect1 id="linuxemu-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 <filename>linux_base</filename> and
<filename>linux_devtools</filename> 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
<filename>linux_base-6.1</filename> or
<filename>linux_devtools-6.1</filename> 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
<emphasis>specially</emphasis> to run Oracle for Linux on FreeBSD, not
what has been described in the Oracle installation guide.</para>
<sect3 id="linuxemu-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
<literal>SHMMAX</literal> under FreeBSD. <literal>SHMMAX</literal>
is merely calculated out of <literal>SHMMAXPGS</literal> and
<literal>PGSIZE</literal>. Therefore define
<literal>SHMMAXPGS</literal>. All other options can be used as
described in the guide. For example:</para>
<programlisting>options SHMMAXPGS=10000
options SHMMNI=100
options SHMSEG=10
options SEMMNS=200
options SEMMNI=70
options SEMMSL=61</programlisting>
<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>
<programlisting>options SYSVSHM #SysV shared memory
options SYSVSEM #SysV semaphores
options SYSVMSG #SysV interprocess communication</programlisting>
</sect3>
<sect3 id="linuxemu-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 <literal>/compat/linux/bin/bash</literal> to
<filename>/etc/shells</filename> and set the shell for the Oracle
account to <filename>/compat/linux/bin/bash</filename>.</para>
</sect3>
<sect3 id="linuxemu-environment">
<title>Environment</title>
<para>Besides the normal Oracle variables, such as
<envar>ORACLE_HOME</envar> and <envar>ORACLE_SID</envar> you must
set the following environment variables:</para>
<informaltable frame="none">
<tgroup cols="2">
<thead>
<row>
<entry>Variable</entry>
<entry>Value</entry>
</row>
</thead>
<tbody>
<row>
<entry><envar>LD_LIBRARY_PATH</envar></entry>
<entry><literal>$ORACLE_HOME/lib</literal></entry>
</row>
<row>
<entry><envar>CLASSPATH</envar></entry>
<entry><literal>$ORACLE_HOME/jdbc/lib/classes111.zip</literal></entry>
</row>
<row>
<entry><envar>PATH</envar></entry>
<entry><literal>/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</literal></entry>
</row>
</tbody>
</tgroup>
</informaltable>
<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="linuxemu-patch-root">
<title>Patching root.sh</title>
<para>When installing Oracle, some actions, which need to be performed
as <username>root</username>, are recorded in a shell script called
<filename>root.sh</filename>. <filename>root.sh</filename> is
written in the <filename>orainst</filename> 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
<filename>rthd.sh</filename> and is located in the
<filename>orainst</filename> directory in the source tree.</para>
</sect3>
<sect3 id="linuxemu-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.</para>
</sect2>
</sect1>
<sect1>
<title>Advanced Topics</title>

View file

@ -1,7 +1,7 @@
<!--
The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/linuxemu/chapter.sgml,v 1.27 2000/03/02 00:00:41 nik Exp $
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/linuxemu/chapter.sgml,v 1.28 2000/03/23 01:32:00 jim Exp $
-->
<chapter id="linuxemu">
@ -46,10 +46,10 @@
calls, such as enabling virtual 8086 mode.</para>
<para>For information on installing the Linux binary compatibility
mode, see the <link linkend="lbc-install">next section</link>.</para>
mode, see the <link linkend="linuxemu-lbc-install">next section</link>.</para>
</sect1>
<sect1 id="lbc-install">
<sect1 id="linuxemu-lbc-install">
<title>Installation</title>
<para>With the advent of 3.0-RELEASE, it is no longer necessary to
@ -96,10 +96,10 @@ Id Refs Address Size Name
<title>Installing Linux Runtime Libraries</title>
<para>This can be done one of two ways, either by using the <link
linkend="libs-port">linux_base</link> port, or by installing them
<link linkend="libs-manually">manually</link>.</para>
linkend="linuxemu-libs-port">linux_base</link> port, or by installing them
<link linkend="linuxemu-libs-manually">manually</link>.</para>
<sect3 id="libs-port">
<sect3 id="linuxemu-libs-port">
<title>Installing using the linux_base port</title>
<para>This is by far the easiest method to use when installing the
@ -116,7 +116,7 @@ Id Refs Address Size Name
a problem.</para>
</sect3>
<sect3 id="libs-manually">
<sect3 id="linuxemu-libs-manually">
<title>Installing libraries manually</title>
<para>If you do not have the &ldquo;ports&rdquo; collection
@ -276,7 +276,7 @@ multi on</programlisting>
</sect2>
</sect1>
<sect1 id="mathematica">
<sect1 id="linuxemu-mathematica">
<title>Installing Mathematica</title>
<para><emphasis>Updated for Mathematica version 4.0 by Murray Stokely
@ -394,6 +394,247 @@ disco.example.com 7115-70839-20412</screen>
</sect2>
</sect1>
<sect1 id="linuxemu-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 <filename>linux_base</filename> and
<filename>linux_devtools</filename> 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
<filename>linux_base-6.1</filename> or
<filename>linux_devtools-6.1</filename> 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
<emphasis>specially</emphasis> to run Oracle for Linux on FreeBSD, not
what has been described in the Oracle installation guide.</para>
<sect3 id="linuxemu-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
<literal>SHMMAX</literal> under FreeBSD. <literal>SHMMAX</literal>
is merely calculated out of <literal>SHMMAXPGS</literal> and
<literal>PGSIZE</literal>. Therefore define
<literal>SHMMAXPGS</literal>. All other options can be used as
described in the guide. For example:</para>
<programlisting>options SHMMAXPGS=10000
options SHMMNI=100
options SHMSEG=10
options SEMMNS=200
options SEMMNI=70
options SEMMSL=61</programlisting>
<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>
<programlisting>options SYSVSHM #SysV shared memory
options SYSVSEM #SysV semaphores
options SYSVMSG #SysV interprocess communication</programlisting>
</sect3>
<sect3 id="linuxemu-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 <literal>/compat/linux/bin/bash</literal> to
<filename>/etc/shells</filename> and set the shell for the Oracle
account to <filename>/compat/linux/bin/bash</filename>.</para>
</sect3>
<sect3 id="linuxemu-environment">
<title>Environment</title>
<para>Besides the normal Oracle variables, such as
<envar>ORACLE_HOME</envar> and <envar>ORACLE_SID</envar> you must
set the following environment variables:</para>
<informaltable frame="none">
<tgroup cols="2">
<thead>
<row>
<entry>Variable</entry>
<entry>Value</entry>
</row>
</thead>
<tbody>
<row>
<entry><envar>LD_LIBRARY_PATH</envar></entry>
<entry><literal>$ORACLE_HOME/lib</literal></entry>
</row>
<row>
<entry><envar>CLASSPATH</envar></entry>
<entry><literal>$ORACLE_HOME/jdbc/lib/classes111.zip</literal></entry>
</row>
<row>
<entry><envar>PATH</envar></entry>
<entry><literal>/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</literal></entry>
</row>
</tbody>
</tgroup>
</informaltable>
<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="linuxemu-patch-root">
<title>Patching root.sh</title>
<para>When installing Oracle, some actions, which need to be performed
as <username>root</username>, are recorded in a shell script called
<filename>root.sh</filename>. <filename>root.sh</filename> is
written in the <filename>orainst</filename> 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
<filename>rthd.sh</filename> and is located in the
<filename>orainst</filename> directory in the source tree.</para>
</sect3>
<sect3 id="linuxemu-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.</para>
</sect2>
</sect1>
<sect1>
<title>Advanced Topics</title>