post-inst.htm

来自「Debian中文参考手册,系统介绍了Debian系统」· HTM 代码 · 共 1,370 行 · 第 1/5 页

HTM
1,370 行
字号
</tr>
<tr align="left" valign="top">
<td id="r5c1" headers="r1c1" align="left" colspan="1" rowspan="1">LD&#095;LIBRARY&#095;PATH&#095;64
</td>
<td headers="r5c1 r1c2" align="left" colspan="1" rowspan="1">Set the LD&#095;LIBRARY&#095;PATH&#095;64 variable as <br /><code>&#036;ORACLE&#095;HOME&#047;lib</code> for Solaris 64-bit.
</td>
</tr>
<tr align="left" valign="top">
<td id="r6c1" headers="r1c1" align="left" colspan="1" rowspan="1">SHLIB&#095;PATH
</td>
<td headers="r6c1 r1c2" align="left" colspan="1" rowspan="1">Set the SHLIB&#095;PATH variable as <code>&#036;ORACLE&#095;HOME&#047;lib32</code> for HP.
</td>
</tr>
<tr align="left" valign="top">
<td id="r7c1" headers="r1c1" align="left" colspan="1" rowspan="1">LIBPATH
</td>
<td headers="r7c1 r1c2" align="left" colspan="1" rowspan="1">Set the LIBPATH variable as <code>&#036;ORACLE&#095;HOME&#047;lib32:</code> &#036;ORACLE&#095;HOME&#047;lib for AIX.
</td>
</tr>
<tr align="left" valign="top">
<td id="r8c1" headers="r1c1" align="left" colspan="1" rowspan="1">ORACLE&#095;SID 
</td>
<td headers="r8c1 r1c2" align="left" colspan="1" rowspan="1">Set the ORACLE&#095;SID variable to specify the name of the Oracle Server instance name. Oracle Corporation recommends restricting it to no more than four characters to avoid filename problems on different operating systems, as the <em><code>sid</code></em> is incorporated in many files. If you do not remember the value you entered when you were prompted by the Oracle Universal Installer, you can find it listed in the <code>installActions.log</code> file located in the <em><code>oraInventory&#095;location</code></em><code>&#047; </code>logs directory. 
<p>The <em><code>oraInventory&#095;location</code></em> directory is defined in the <code>&#047;etc&#047;oraInst.loc </code>file in AIX and <code>&#047;var&#047;opt&#047;oracle&#047;oraInst.loc</code> file in HP, Linux, Solaris and Tru64.
</p>
</td>
</tr>
<tr align="left" valign="top">
<td id="r9c1" headers="r1c1" align="left" colspan="1" rowspan="1">PATH
</td>
<td headers="r9c1 r1c2" align="left" colspan="1" rowspan="1">Make sure the new <code>&#036;ORACLE&#095;HOME&#047;bin</code> directory is included in the PATH setting.
<p>AIX Path is <code>&#036;ORACLE&#095;HOME&#047;bin,&#047;etc, &#047;usr&#047;bin,&#047;usr&#047;bin&#047;X11,&#047;usr&#047;lbin,</code> and <code>&#047;usr&#047;local&#047;bin</code>, if it exists
</p>
<p><br />HP Path is <code>&#036;ORACLE&#095;HOME&#047;bin,&#047;usr&#047;bin,&#047;etc,</code> <code>&#047;usr&#047;bin&#047;X11</code> and <code>&#047;usr&#047;local&#047;bin,</code> if it exists
</p>
<p><br />Linux Path is <code>&#036;ORACLE&#095;HOME&#047;bin,&#047;usr&#047;bin,&#047;bin, &#047;usr&#047;bin&#047;X11</code> and <code>&#047;usr&#047;local&#047;bin,</code>if it exists
</p>
<p><br />Solaris Path is <code>&#036;ORACLE&#095;HOME&#047;bin,&#047;usr&#047;ccs&#047;bin, &#047;usr&#047;bin,&#047;etc,&#047;usr&#047;openwin&#047;bin</code> and<code> &#047;usr&#047;local&#047;bin, </code>if it exists
</p>
<p><br />Tru64 Path is <code>&#036;ORACLE&#095;HOME&#047;bin,&#047;usr&#047;bin,&#047;etc, &#047;usr&#047;bin&#047;X11</code> and <code>&#047;usr&#047;local&#047;bin,</code>if it exists
</p>
<p><strong>See Also:</strong> <a href="pre.htm#g1079779">Chapter 2, " Pre-Installation Requirements"</a> for more information on other PATH requirements.
</p>
</td>
</tr>
<tr align="left" valign="top">
<td id="r10c1" headers="r1c1" align="left" colspan="1" rowspan="1">TNS&#095;ADMIN
</td>
<td headers="r10c1 r1c2" align="left" colspan="1" rowspan="1">TNS&#095;ADMIN specifies the directory containing the Oracle Net Services configuration files. 
<p>Oracle Net Services configuration files are typically, but not always located in the <code>&#036;ORACLE&#095;HOME&#047;admin&#047;network</code> directory. Depending on the file, Oracle Net uses a different search order to locate the file. 
</p>
<p>The search order for the <code>sqlnet.ora</code> and <code>ldap.ora</code> files is as follows:
</p>
<ol type="1" start="1">
<li>
<p>The directory specified by the TNS&#095;ADMIN environment variable, if set
</p>
</li>
<li>
<p><code>&#047;var&#047;opt&#047;oracle</code> directory for Solaris and <code>&#047;etc</code> directory for AIX, HP, Linux, and Tru64.
</p>
</li>
<li>
<p>The <code>&#036;ORACLE&#095;HOME&#047;admin&#047;network</code> directory
</p>
</li>
</ol>
</td>
</tr>
<tr align="left" valign="top">
<td id="r11c1" headers="r1c1" align="left" colspan="1" rowspan="1">TWO&#095;TASK
</td>
<td headers="r11c1 r1c2" align="left" colspan="1" rowspan="1">Set the TWO&#095;TASK variable to the default connect identifier to use in the connect string. The default connect identifier does not need to be specified in the connect string. For example, if the TWO&#095;TASK environment variable is set to <code>sales</code>, you can connect to a database using the <code>CONNECT</code> <em><code>username&#047;password</code></em> command rather than the <code>CONNECT</code> <em><code>username&#047;password</code></em><code>&#064;sales</code> command. 
<p><strong>See Also:</strong> <em>Oracle9<em>i</em> Net Services Administrator&#039;s Reference</em> and <em>Oracle9<em>i</em> Administrator&#039;s Reference Release 2 (9.2.0.1.0) for UNIX Systems: AIX-Based Systems, Compaq Tru64 UNIX, HP 9000 Series HP-UX, Linux Intel, and Sun Solaris</em> for more information on connect identifiers.
</p>
</td>
</tr></tbody>
</table>
</div class="sect2"><a id="i1039973" name="i1039973"></a>
<div class="sect2">
<!--
infolevel=all
infotype=general
--><a id="sthref591" name="sthref591"></a>
<h3>
<font face="arial, helvetica, sans-serif" color="#330099">
<a id="sthref592" name="sthref592"></a><a id="sthref593" name="sthref593"></a>Initializing the oraenv Script <a id="sthref594" name="sthref594"></a><a id="sthref595" name="sthref595"></a><a id="sthref596" name="sthref596"></a><a id="sthref597" name="sthref597"></a><a id="sthref598" name="sthref598"></a><a id="sthref599" name="sthref599"></a>
</font>
</h3>
<p>You can use the <code>oraenv</code> script to set a common environment for Oracle software users. 
</p><a id="i1007303" name="i1007303"></a>
<div class="sect3">
<!--
infolevel=all
infotype=general
--><a id="sthref600" name="sthref600"></a>
<h4>
<font face="arial, helvetica, sans-serif" color="#330099">
Single-Instance System
</font>
</h4>
<p>On a single-instance system, set the ORACLE&#095;SID environment variable in the <code>.profile</code> or<code>.login</code> file of the <code>oracle</code> user account. Enter the following commands to initialize the <code>oraenv</code> file at login.
</p>
<p>For the Bourne or Korn shell:
</p>
<pre>ORAENV&#095;ASK&#061;NO<br />. &#047;usr&#047;local&#047;bin&#047;oraenv

</pre>
<p>For the C shell:
</p>
<pre>set ORAENV&#095;ASK &#061; NO<br />source &#047;usr&#047;local&#047;bin&#047;coraenv<br />unset ORAENV&#095;ASK
</pre>
<div align="center">
<br /><table summary="This is a layout table to format a note" title="This is a layout table to format a note" dir="ltr" border="1" width="80%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0"><tbody>
<tr>
<td align="left" colspan="1" rowspan="1">
<p>
<font face="arial, helvetica, sans-serif">
<strong>Note:</strong>
</font>
</p>The C shell uses the settings in <code>coraenv</code> file instead of the <code>oraenv</code> file.
</td>
</tr></tbody>
</table><br />
</div>
</div class="sect3">
<div class="sect3">
<!--
infolevel=all
infotype=general
--><a id="sthref601" name="sthref601"></a>
<h4>
<font face="arial, helvetica, sans-serif" color="#330099">
Multiple-Instance System
</font>
</h4>
<p>On a multiple-instance System, include a list of instance names and commands necessary to initialize the <code>oraenv</code> script at the end of the startup file of the <code>oracle</code> user account.
</p>
<p><a href="#g1058421">Table 4-3</a> shows the required Bourne or Korn shell commands for initializing the oraenv script on UNIX platforms.
</p><a id="sthref602" name="sthref602"></a><a id="g1058421" name="g1058421"></a>
<p><strong><em><font face="arial, helvetica, sans-serif">Table 4-3 Bourne&#047;Korn Commands to Initialize the oraenv Script on Multiple-Instance Systems 
</font></em></strong></p>
<table title="Bourne Korn Commands to Initialize the oraenv Script on Multiple-Instance Systems " summary="This table lists the Borne or Korn shell for UNIX platforms." dir="ltr" border="1" width="100%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0">
<thead>
<tr align="left" valign="top">
<th id="r1c1" align="left" colspan="1" rowspan="1" valign="bottom">
<font face="Arial, Helvetica, sans-serif">
<strong>Platforms
</strong></font></th>
<th id="r1c2" align="left" colspan="1" rowspan="1" valign="bottom">
<font face="Arial, Helvetica, sans-serif">
<strong>Bourne or Korn Shell
</strong></font></th>
</tr>
</thead><tbody>
<tr align="left" valign="top">
<td id="r2c1" headers="r1c1" align="left" colspan="1" rowspan="1">Solaris
</td>
<td headers="r2c1 r1c2" align="left" colspan="1" rowspan="1">
<pre>&#035;!&#047;bin&#047;sh
echo "The SIDs on this machine are:"
cat &#047;var&#047;opt&#047;oracle&#047;oratab &#124; awk -F: &#039;&#123;print &#036;1&#125;&#039; &#124;&#092; grep -v "&#035;"
ORAENV&#095;ASK&#061;"YES"
. &#047;usr&#047;local&#047;bin&#047;oraenv
</pre>
</td>
</tr>
<tr align="left" valign="top">
<td id="r3c1" headers="r1c1" align="left" colspan="1" rowspan="1">AIX, HP, Linux and Tru64
</td>
<td headers="r3c1 r1c2" align="left" colspan="1" rowspan="1">
<pre>&#035;!&#047;bin&#047;sh
echo "The SIDs on this machine are:"
cat &#047;etc&#047;oratab &#124; awk -F: &#039;&#123;print &#036;1&#125;&#039; &#124; grep -v "&#035;"
ORAENV&#095;ASK&#061;"YES"
. &#047;usr&#047;local&#047;bin&#047;oraenv
</pre>
</td>
</tr></tbody>
</table>
<p><a href="#g1058538">Table 4-4</a> describes the C shell commands for initializing the oraenv script on UNIX platforms. 
</p><a id="sthref603" name="sthref603"></a><a id="g1058538" name="g1058538"></a>
<p><strong><em><font face="arial, helvetica, sans-serif">Table 4-4 C Shell Commands to Initialize the oraenv Script on Multiple-Instance Systems 
</font></em></strong></p>
<table title="C Shell Commands to Initialize the oraenv Script on Multiple-Instance Systems " summary="This table lists the C shells for UNIX platforms." dir="ltr" border="1" width="100%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0">
<thead>
<tr align="left" valign="top">
<th id="r1c1" align="left" colspan="1" rowspan="1" valign="bottom">
<font face="Arial, Helvetica, sans-serif">
<strong>Platforms
</strong></font></th>
<th id="r1c2" align="left" colspan="1" rowspan="1" valign="bottom">
<font face="Arial, Helvetica, sans-serif">
<strong>C shell
</strong></font></th>
</tr>
</thead><tbody>
<tr align="left" valign="top">
<td id="r2c1" headers="r1c1" align="left" colspan="1" rowspan="1">Solaris
</td>
<td headers="r2c1 r1c2" align="left" colspan="1" rowspan="1">
<pre>&#035;!&#047;usr&#047;bin&#047;csh
echo "The SIDs on this machine are:"
cat &#047;var&#047;opt&#047;oracle&#047;oratab &#124; awk -F: &#039;&#123;print &#036;1&#125;&#039; &#124;&#092; grep -v "&#035;"
set ORAENV&#095;ASK&#061;"YES"
source &#047;usr&#047;local&#047;bin&#047;coraenv
</pre>
</td>
</tr>
<tr align="left" valign="top">
<td id="r3c1" headers="r1c1" align="left" colspan="1" rowspan="1">AIX, HP, Linux and Tru64
</td>
<td headers="r3c1 r1c2" align="left" colspan="1" rowspan="1">
<pre>&#035;!&#047;usr&#047;bin&#047;csh
echo "The SIDs on this machine are:"
cat &#047;etc&#047;oratab &#124; awk -F: &#039;&#123;print &#036;1&#125;&#039; &#124; grep -v "&#035;"
set ORAENV&#095;ASK&#061;"YES"
source &#047;usr&#047;local&#047;bin&#047;coraenv
</pre>
</td>
</tr></tbody>
</table>
</div class="sect3">
<div class="sect3">
<!--
infolevel=all
infotype=general
--><a id="sthref604" name="sthref604"></a>
<h4>
<font face="arial, helvetica, sans-serif" color="#330099">
Other Oracle User Startup Files
</font>
</h4>
<p>To create the same environment for all Oracle software user accounts, modify each <code>oracle</code> user startup file to include the following addition at the end of the file:
</p>
<ul>
<li type="disc">
<p>For&#160;<code>.profile</code> files used by the Bourne or Korn shells, add:
</p>
<pre><code>. </code>&#047;usr&#047;local&#047;bin&#047;oraenv 

</pre>
</li>
<li type="disc">
<p>For&#160;<code>.login</code> files used by the C shell, add:
</p>
<pre>source &#047;usr&#047;local&#047;bin&#047;coraenv

</pre>
</li>
<li type="disc">
<p>The ORACLE&#095;HOME and PATH environment variables are described in <a href="#i1014168">"Setting Environment Variables"</a>.
</p>
</li>
</ul>
</div class="sect3"><a id="i1000810" name="i1000810"></a>
<div class="sect3">
<!--
infolevel=all
infotype=general
--><a id="sthref605" name="sthref605"></a>
<h4>
<font face="arial, helvetica, sans-serif" color="#330099">
Update the oratab File<a id="sthref606" name="sthref606"></a><a id="sthref607" name="sthref607"></a>
</font>
</h4>
<p>If you have created a database manually instead of using Database Configuration Assistant, you must ensure the system configuration is reflected in the <code>oratab</code> file. The <code>oratab</code> file is located in the <code>&#047;var&#047;opt&#047;oracle</code> directory on Solaris and in the <code>&#047;etc</code> directory on AIX, HP, Linux and Tru64.
</p>
<p>Add an entry for each server instance on the system in the following format: 
</p>
<pre><em>ORACLE&#095;SID:ORACLE&#095;HOME:&#123;Y&#124;N&#125;</em>

</pre>
<p>In the preceding command, Y or N indicates whether you want to activate the <code>dbstart</code> and <code>dbshut</code> scripts. Database Configuration Assistant automatically adds an entry for each database it creates.<a id="sthref608" name="sthref608"></a>

⌨️ 快捷键说明

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