⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 linuxemu-oracle.html

📁 FreeBSD操作系统的详细使用手册
💻 HTML
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta name="generator" content="HTML Tidy, see www.w3.org" /><title>Installing Oracle</title><meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.7" /><link rel="HOME" title="FreeBSD Handbook" href="index.html" /><link rel="UP" title="Linux Binary Compatibility" href="linuxemu.html" /><link rel="PREVIOUS" title="Installing MATLAB" href="linuxemu-matlab.html" /><link rel="NEXT" title="Installing SAP燫/3" href="sapr3.html" /><link rel="STYLESHEET" type="text/css" href="docbook.css" /></head><body class="SECT1" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#840084"alink="#0000FF"><div class="NAVHEADER"><table summary="Header navigation table" width="100%" border="0" cellpadding="0"cellspacing="0"><tr><th colspan="3" align="center">FreeBSD Handbook</th></tr><tr><td width="10%" align="left" valign="bottom"><a href="linuxemu-matlab.html"accesskey="P">Prev</a></td><td width="80%" align="center" valign="bottom">Chapter 10 Linux Binary Compatibility</td><td width="10%" align="right" valign="bottom"><a href="sapr3.html"accesskey="N">Next</a></td></tr></table><hr align="LEFT" width="100%" /></div><div class="SECT1"><h1 class="SECT1"><a id="LINUXEMU-ORACLE" name="LINUXEMU-ORACLE">10.6 Installing <spanclass="TRADEMARK">Oracle</span>&reg;</a></h1><i class="AUTHORGROUP"><span class="CONTRIB">Contributed by</span> Marcel Moolenaar.</i> <div class="SECT2"><h2 class="SECT2"><a id="AEN13618" name="AEN13618">10.6.1 Preface</a></h2><p>This document describes the process of installing <b class="APPLICATION"><spanclass="TRADEMARK">Oracle</span>&reg; 8.0.5</b> and <b class="APPLICATION"><spanclass="TRADEMARK">Oracle</span> 8.0.5.1 Enterprise Edition</b> for Linux onto a FreeBSDmachine.</p></div><div class="SECT2"><h2 class="SECT2"><a id="AEN13625" name="AEN13625">10.6.2 Installing the LinuxEnvironment</a></h2><p>Make sure you have both <ahref="http://www.FreeBSD.org/cgi/url.cgi?ports/emulators/linux_base/pkg-descr"><ttclass="FILENAME">emulators/linux_base</tt></a> and <ahref="http://www.FreeBSD.org/cgi/url.cgi?ports/devel/linux_devtools/pkg-descr"><ttclass="FILENAME">devel/linux_devtools</tt></a> from the ports collection installed. Ifyou run into difficulties with these ports, you may have to use the packages or olderversions available in the ports collection.</p><p>If you want to run the intelligent agent, you will also need to install the Red HatTcl package: <tt class="FILENAME">tcl-8.0.3-20.i386.rpm</tt>. The general command forinstalling packages with the official <b class="APPLICATION">RPM</b> port (<ahref="http://www.FreeBSD.org/cgi/url.cgi?ports/archivers/rpm/pkg-descr"><ttclass="FILENAME">archivers/rpm</tt></a>) is:</p><pre class="SCREEN"><samp class="PROMPT">#</samp> <kbdclass="USERINPUT">rpm -i --ignoreos --root /compat/linux --dbpath /var/lib/rpm <varclass="REPLACEABLE">package</var></kbd></pre><p>Installation of the <var class="REPLACEABLE">package</var> should not generate anyerrors.</p></div><div class="SECT2"><h2 class="SECT2"><a id="AEN13640" name="AEN13640">10.6.3 Creating the <spanclass="TRADEMARK">Oracle</span> Environment</a></h2><p>Before you can install <b class="APPLICATION"><spanclass="TRADEMARK">Oracle</span></b>, you need to set up a proper environment. Thisdocument only describes what to do <span class="emphasis"><iclass="EMPHASIS">specially</i></span> to run <b class="APPLICATION"><spanclass="TRADEMARK">Oracle</span></b> for Linux on FreeBSD, not what has been described inthe <b class="APPLICATION"><span class="TRADEMARK">Oracle</span></b> installationguide.</p><div class="SECT3"><h3 class="SECT3"><a id="LINUXEMU-KERNEL-TUNING" name="LINUXEMU-KERNEL-TUNING">10.6.3.1Kernel Tuning</a></h3><p>As described in the <b class="APPLICATION"><span class="TRADEMARK">Oracle</span></b>installation guide, you need to set the maximum size of shared memory. Do not use <varclass="LITERAL">SHMMAX</var> under FreeBSD. <var class="LITERAL">SHMMAX</var> is merelycalculated out of <var class="LITERAL">SHMMAXPGS</var> and <varclass="LITERAL">PGSIZE</var>. Therefore define <var class="LITERAL">SHMMAXPGS</var>. Allother options can be used as described in the guide. For example:</p><pre class="PROGRAMLISTING">options SHMMAXPGS=10000options SHMMNI=100options SHMSEG=10options SEMMNS=200options SEMMNI=70options SEMMSL=61</pre><p>Set these options to suit your intended use of <b class="APPLICATION"><spanclass="TRADEMARK">Oracle</span></b>.</p><p>Also, make sure you have the following options in your kernel configuration file:</p><pre class="PROGRAMLISTING">options SYSVSHM #SysV shared memoryoptions SYSVSEM #SysV semaphoresoptions SYSVMSG #SysV interprocess communication</pre></div><div class="SECT3"><h3 class="SECT3"><a id="LINUXEMU-ORACLE-ACCOUNT" name="LINUXEMU-ORACLE-ACCOUNT">10.6.3.2<span class="TRADEMARK">Oracle</span> Account</a></h3><p>Create an <tt class="USERNAME">oracle</tt> account just as you would create any otheraccount. The <tt class="USERNAME">oracle</tt> account is special only that you need togive it a Linux shell. Add <var class="LITERAL">/compat/linux/bin/bash</var> to <ttclass="FILENAME">/etc/shells</tt> and set the shell for the <ttclass="USERNAME">oracle</tt> account to <ttclass="FILENAME">/compat/linux/bin/bash</tt>.</p></div><div class="SECT3"><h3 class="SECT3"><a id="LINUXEMU-ENVIRONMENT" name="LINUXEMU-ENVIRONMENT">10.6.3.3Environment</a></h3><p>Besides the normal <b class="APPLICATION"><span class="TRADEMARK">Oracle</span></b>variables, such as <tt class="ENVAR">ORACLE_HOME</tt> and <ttclass="ENVAR">ORACLE_SID</tt> you must set the following environment variables:</p><div class="INFORMALTABLE"><a id="AEN13686" name="AEN13686"></a><table border="0" frame="void" class="CALSTABLE"><col width="1*" /><col width="2*" /><thead><tr><th>Variable</th><th>Value</th></tr></thead><tbody><tr><td><tt class="ENVAR">LD_LIBRARY_PATH</tt></td><td><var class="LITERAL">$ORACLE_HOME/lib</var></td></tr><tr><td><tt class="ENVAR">CLASSPATH</tt></td><td><var class="LITERAL">$ORACLE_HOME/jdbc/lib/classes111.zip</var></td></tr><tr><td><tt class="ENVAR">PATH</tt></td><td><var class="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</var></td></tr></tbody></table></div><p>It is advised to set all the environment variables in <ttclass="FILENAME">.profile</tt>. A complete example is:</p><pre class="PROGRAMLISTING">ORACLE_BASE=/oracle; export ORACLE_BASEORACLE_HOME=/oracle; export ORACLE_HOMELD_LIBRARY_PATH=$ORACLE_HOME/libexport LD_LIBRARY_PATHORACLE_SID=ORCL; export ORACLE_SIDORACLE_TERM=386x; export ORACLE_TERMCLASSPATH=$ORACLE_HOME/jdbc/lib/classes111.zipexport CLASSPATHPATH=/compat/linux/bin:/compat/linux/sbin:/compat/linux/usr/binPATH=$PATH:/compat/linux/usr/sbin:/bin:/sbin:/usr/bin:/usr/sbinPATH=$PATH:/usr/local/bin:$ORACLE_HOME/binexport PATH</pre></div></div><div class="SECT2"><h2 class="SECT2"><a id="AEN13713" name="AEN13713">10.6.4 Installing <spanclass="TRADEMARK">Oracle</span></a></h2><p>Due to a slight inconsistency in the Linux emulator, you need to create a directorynamed <tt class="FILENAME">.oracle</tt> in <tt class="FILENAME">/var/tmp</tt> before youstart the installer. Either make it world writable or let it be owned by the <ttclass="USERNAME">oracle</tt> user. You should be able to install <bclass="APPLICATION"><span class="TRADEMARK">Oracle</span></b> without any problems. Ifyou have problems, check your <b class="APPLICATION"><spanclass="TRADEMARK">Oracle</span></b> distribution and/or configuration first! After youhave installed <b class="APPLICATION"><span class="TRADEMARK">Oracle</span></b>, applythe patches described in the next two subsections.</p><p>A frequent problem is that the TCP protocol adapter is not installed right. As aconsequence, you cannot start any TCP listeners. The following actions help solve thisproblem:</p><pre class="SCREEN"><samp class="PROMPT">#</samp> <kbd class="USERINPUT">cd $ORACLE_HOME/network/lib</kbd><samp class="PROMPT">#</samp> <kbdclass="USERINPUT">make -f ins_network.mk ntcontab.o</kbd><samp class="PROMPT">#</samp> <kbd class="USERINPUT">cd $ORACLE_HOME/lib</kbd><samp class="PROMPT">#</samp> <kbd class="USERINPUT">ar r libnetwork.a ntcontab.o</kbd><samp class="PROMPT">#</samp> <kbd class="USERINPUT">cd $ORACLE_HOME/network/lib</kbd><samp class="PROMPT">#</samp> <kbd class="USERINPUT">make -f ins_network.mk install</kbd></pre><p>Do not forget to run <tt class="FILENAME">root.sh</tt> again!</p><div class="SECT3"><h3 class="SECT3"><a id="LINUXEMU-PATCH-ROOT" name="LINUXEMU-PATCH-ROOT">10.6.4.1Patching root.sh</a></h3><p>When installing <b class="APPLICATION"><span class="TRADEMARK">Oracle</span></b>, someactions, which need to be performed as <tt class="USERNAME">root</tt>, are recorded in ashell script called <tt class="FILENAME">root.sh</tt>. This script is written in the <ttclass="FILENAME">orainst</tt> directory. Apply the following patch to <ttclass="FILENAME">root.sh</tt>, to have it use to proper location of <ttclass="COMMAND">chown</tt> or alternatively run the script under a Linux nativeshell.</p><pre class="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</pre><p>When you do not install <b class="APPLICATION"><spanclass="TRADEMARK">Oracle</span></b> from CD, you can patch the source for <ttclass="FILENAME">root.sh</tt>. It is called <tt class="FILENAME">rthd.sh</tt> and islocated in the <tt class="FILENAME">orainst</tt> directory in the source tree.</p></div><div class="SECT3"><h3 class="SECT3"><a id="LINUXEMU-PATCH-TCL" name="LINUXEMU-PATCH-TCL">10.6.4.2 Patchinggenclntsh</a></h3><p>The script <tt class="COMMAND">genclntsh</tt> is used to create a single shared clientlibrary. It is used when building the demos. Apply the following patch to comment out thedefinition of <tt class="ENVAR">PATH</tt>:</p><pre class="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</pre></div></div><div class="SECT2"><h2 class="SECT2"><a id="AEN13765" name="AEN13765">10.6.5 Running <spanclass="TRADEMARK">Oracle</span></a></h2><p>When you have followed the instructions, you should be able to run <bclass="APPLICATION"><span class="TRADEMARK">Oracle</span></b> as if it was run on Linuxitself.</p></div></div><div class="NAVFOOTER"><hr align="LEFT" width="100%" /><table summary="Footer navigation table" width="100%" border="0" cellpadding="0"cellspacing="0"><tr><td width="33%" align="left" valign="top"><a href="linuxemu-matlab.html"accesskey="P">Prev</a></td><td width="34%" align="center" valign="top"><a href="index.html"accesskey="H">Home</a></td><td width="33%" align="right" valign="top"><a href="sapr3.html"accesskey="N">Next</a></td></tr><tr><td width="33%" align="left" valign="top">Installing <spanclass="TRADEMARK">MATLAB</span>&reg;</td><td width="34%" align="center" valign="top"><a href="linuxemu.html"accesskey="U">Up</a></td><td width="33%" align="right" valign="top">Installing <spanclass="TRADEMARK">SAP</span>&reg;&nbsp;<span class="TRADEMARK">R/3</span>&reg;</td></tr></table></div><p align="center"><small>This, and other documents, can be downloaded from <ahref="ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/">ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/</a>.</small></p><p align="center"><small>For questions about FreeBSD, read the <ahref="http://www.FreeBSD.org/docs.html">documentation</a> before contacting &#60;<ahref="mailto:questions@FreeBSD.org">questions@FreeBSD.org</a>&#62;.<br />For questions about this documentation, e-mail &#60;<ahref="mailto:doc@FreeBSD.org">doc@FreeBSD.org</a>&#62;.</small></p></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -