aboutsummaryrefslogtreecommitdiff
path: root/zh_CN.GB2312/books/handbook/linuxemu/chapter.xml
diff options
context:
space:
mode:
Diffstat (limited to 'zh_CN.GB2312/books/handbook/linuxemu/chapter.xml')
-rw-r--r--zh_CN.GB2312/books/handbook/linuxemu/chapter.xml181
1 files changed, 70 insertions, 111 deletions
diff --git a/zh_CN.GB2312/books/handbook/linuxemu/chapter.xml b/zh_CN.GB2312/books/handbook/linuxemu/chapter.xml
index 01e9ee260f..adf282922a 100644
--- a/zh_CN.GB2312/books/handbook/linuxemu/chapter.xml
+++ b/zh_CN.GB2312/books/handbook/linuxemu/chapter.xml
@@ -5,33 +5,21 @@
Original Revision: 1.142
$FreeBSD$
-->
-
-<chapter id="linuxemu">
- <chapterinfo>
+<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" xml:id="linuxemu">
+ <info><title>Linux二进制兼容模式</title>
<authorgroup>
- <author>
- <firstname>Jim</firstname>
- <surname>Mock</surname>
- <contrib>Restructured and parts updated by </contrib>
- </author>
+ <author><personname><firstname>Jim</firstname><surname>Mock</surname></personname><contrib>Restructured and parts updated by </contrib></author>
<!-- 22 Mar 2000 -->
</authorgroup>
<authorgroup>
- <author>
- <firstname>Brian N.</firstname>
- <surname>Handy</surname>
- <contrib>Originally contributed by </contrib>
- </author>
- <author>
- <firstname>Rich</firstname>
- <surname>Murphey</surname>
- </author>
+ <author><personname><firstname>Brian N.</firstname><surname>Handy</surname></personname><contrib>Originally contributed by </contrib></author>
+ <author><personname><firstname>Rich</firstname><surname>Murphey</surname></personname></author>
</authorgroup>
- </chapterinfo>
+ </info>
+
-<title>Linux二进制兼容模式</title>
- <sect1 id="linuxemu-synopsis">
+ <sect1 xml:id="linuxemu-synopsis">
<title>概述</title>
<indexterm><primary>Linux二进制兼容模式</primary></indexterm>
<indexterm>
@@ -55,7 +43,7 @@
Linux 版本的 <application>&netscape;</application>,
<application>&adobe;&nbsp;&acrobat;</application>,
<application>&realplayer;</application>,
- <application><trademark>VMware</trademark></application>,
+ <application>VMware</application>,
<application>&oracle;</application>,
<application>&wordperfect;</application>,
<application>Doom</application>,
@@ -96,7 +84,7 @@
</sect1>
- <sect1 id="linuxemu-lbc-install">
+ <sect1 xml:id="linuxemu-lbc-install">
<title>安装</title>
<indexterm><primary>KLD (kernel loadable object)</primary></indexterm>
@@ -104,7 +92,7 @@
<para>默认情况下, 并不开启 Linux 二进制兼容支持。
启用这一功能最简单的方法是载入
<literal>linux</literal> KLD 模块 (<quote>Kernel LoaDable
- object</quote>)。 以 <username>root</username>
+ object</quote>)。 以 <systemitem class="username">root</systemitem>
的身份, 键入下列命令即可:</para>
<screen>&prompt.root; <userinput>kldload linux</userinput></screen>
@@ -139,34 +127,31 @@ Id Refs Address Size Name
<para>有两种方法来安装Linux运行时库,要么使用<link linkend="linuxemu-libs-port">linux_base</link> port,
要么<link linkend="linuxemu-libs-manually">手动</link>安装。</para>
- <sect3 id="linuxemu-libs-port">
+ <sect3 xml:id="linuxemu-libs-port">
<title>通过使用 linux_base Port 来安装</title>
<indexterm><primary>Ports Collection</primary></indexterm>
<para>这是最容易的安装方法,只需要像安装其他port一样从
- <ulink type="html" url="file://localhost/usr/ports/">Ports Collection</ulink>来安装:</para>
+ <link xlink:href="file://localhost/usr/ports/">Ports Collection</link>来安装:</para>
<screen>&prompt.root; <userinput>cd /usr/ports/emulators/linux_base-f10</userinput>
&prompt.root; <userinput>make install distclean</userinput></screen>
<note>
<para>对于 &os;&nbsp;8.0 之前的版本的 &os; 系统,
- 你需要使用 <filename
- role="package">emulators/linux_base-fc4</filename> port
- 而不是 <filename
- role="package">emulators/linux_base-f10</filename>。</para>
+ 你需要使用 <package>emulators/linux_base-fc4</package> port
+ 而不是 <package>emulators/linux_base-f10</package>。</para>
</note>
<para>
您现在应当是工作在Linux兼容模式下了。一些程序可能会提示系统库的版本不正确。通常,这不是问题。</para>
- <note><para>有多个版本的<filename
- role="package">emulators/linux_base</filename> port,针对不同的版本的Linux。
+ <note><para>有多个版本的<package>emulators/linux_base</package> port,针对不同的版本的Linux。
您应该选择最接近Linux应用程序需要的那个版本来安装。</para></note>
</sect3>
- <sect3 id="linuxemu-libs-manually">
+ <sect3 xml:id="linuxemu-libs-manually">
<title>手动安装</title>
<para>如果您没有安装 Ports Collection,您也可以通过手动来安装Linux运行时库。
@@ -187,7 +172,7 @@ Id Refs Address Size Name
<para>如果您安装了<filename>linux_base</filename> port,但是您的
您的应用程序仍会报告丢失共享库的信息?您如何知道Linux程序需要哪个共享库?
- 基本上,有两种可能性(接下来的指令需要<username>root</username>权限):</para>
+ 基本上,有两种可能性(接下来的指令需要<systemitem class="username">root</systemitem>权限):</para>
<para>如果您有可以访问的Linux系统, 看看应用程序需要什么共享库,
把它们复制到您的FreeBSD系统。看下面的例子:</para>
@@ -309,17 +294,13 @@ multi on</programlisting>
</sect2>
</sect1>
- <sect1 id="linuxemu-mathematica">
- <sect1info>
+ <sect1 xml:id="linuxemu-mathematica">
+ <info><title>安装&mathematica;</title>
<authorgroup>
- <author>
- <firstname>Boris</firstname>
- <surname>Hollas</surname>
- <contrib>Updated for Mathematica 5.X by </contrib>
- </author>
+ <author><personname><firstname>Boris</firstname><surname>Hollas</surname></personname><contrib>Updated for Mathematica 5.X by </contrib></author>
</authorgroup>
- </sect1info>
- <title>安装&mathematica;</title>
+ </info>
+
<indexterm>
<primary>applications</primary>
@@ -332,7 +313,7 @@ multi on</programlisting>
<para>Linux 版本的 <application>&mathematica;</application>
或 <application>&mathematica; for Students</application>
可以直接从 Wolfram 的
- <ulink url="http://www.wolfram.com/"></ulink> 订购。</para>
+ <uri xlink:href="http://www.wolfram.com/">http://www.wolfram.com/</uri> 订购。</para>
<sect2>
<title>运行 &mathematica; 安装程序</title>
@@ -372,7 +353,7 @@ multi on</programlisting>
<para>在安装
<application>&mathematica;</application> 的过程中所创建的脚本,
必须首先进行适当的修改才能使用。
- 如果您选择将 <filename class="directory">/usr/local/bin</filename>
+ 如果您选择将 <filename>/usr/local/bin</filename>
作为
<application>&mathematica;</application> 可执行文件的安装路径,
则可以在这个目录中找到一些到名为
@@ -458,26 +439,16 @@ done</programlisting>
</sect2>
</sect1>
- <sect1 id="linuxemu-maple">
- <sect1info>
+ <sect1 xml:id="linuxemu-maple">
+ <info><title>安装&maple;</title>
<authorgroup>
- <author>
- <firstname>Aaron</firstname>
- <surname>Kaplan</surname>
-<!-- <address><email>aaron@lo-res.org</email></address>-->
- <contrib>Contributed by </contrib>
- </author>
+ <author><personname><firstname>Aaron</firstname><surname>Kaplan</surname></personname><contrib>Contributed by </contrib></author>
</authorgroup>
<authorgroup>
- <author>
- <firstname>Robert</firstname>
- <surname>Getschmann</surname>
-<!-- <address><email>rob@getschmann.org</email></address>-->
- <contrib>Thanks to </contrib>
- </author>
+ <author><personname><firstname>Robert</firstname><surname>Getschmann</surname></personname><contrib>Thanks to </contrib></author>
</authorgroup>
- </sect1info>
- <title>安装&maple;</title>
+ </info>
+
<indexterm>
<primary>应用程序</primary>
@@ -485,16 +456,14 @@ done</programlisting>
</indexterm>
<para><application>&maple;</application>是一个类似于<application>&mathematica;</application>的商业数学软件。
- 您可以从<ulink
- url="http://www.maplesoft.com/"></ulink>买到这个软件并注册得到一个使用许可。
+ 您可以从<uri xlink:href="http://www.maplesoft.com/">http://www.maplesoft.com/</uri>买到这个软件并注册得到一个使用许可。
要在FreeBSD上安装这个软件,请按照下面的步骤:</para>
<procedure>
<step><para>从软件的发行包执行<filename>INSTALL</filename> shell脚本。当进入安装程序的提示符时,
- 选择<quote>RedHat</quote> 选项。典型的安装目录是<filename
- class="directory">/usr/local/maple</filename>。</para></step>
+ 选择<quote>RedHat</quote> 选项。典型的安装目录是<filename>/usr/local/maple</filename>。</para></step>
- <step><para>如果您不这样做,可以从Maple Waterloo Software (<ulink url="http://register.maplesoft.com/"></ulink>)
+ <step><para>如果您不这样做,可以从Maple Waterloo Software (<uri xlink:href="http://register.maplesoft.com/">http://register.maplesoft.com/</uri>)
为 <application>&maple;</application> 订购一个授权许可。
然后把它复制到 <filename>/usr/local/maple/license/license.dat</filename>。</para></step>
@@ -570,8 +539,7 @@ exit 0
<itemizedlist>
<listitem><para><application>FLEXlm</application>许可管理器可能是一个使用比较困难的工具。
- 关于它的额外的文档可以在<ulink
- url="http://www.globetrotter.com/"></ulink>找到。</para></listitem>
+ 关于它的额外的文档可以在<uri xlink:href="http://www.globetrotter.com/">http://www.globetrotter.com/</uri>找到。</para></listitem>
<listitem><para><command>lmgrd</command>对许可文件非常挑剔,有一点问题就会core dump。
正确的许可文件看起来像下面这样:
@@ -589,25 +557,21 @@ FEATURE Maple maplelmg 2000.0831 permanent 1 XXXXXXXXXXXX \
ISSUED=11-may-2000 NOTICE=" Technische Universitat Wien" \
SN=XXXXXXXXX</programlisting>
- <note><para>序列号被'X'代替了。 <hostid>chillig</hostid>是主机名。</para></note>
+ <note><para>序列号被'X'代替了。 <systemitem>chillig</systemitem>是主机名。</para></note>
<para>只要不修改<quote>FEATURE</quote>行,编辑后一般都能工作。</para></listitem>
</itemizedlist>
</sect2>
</sect1>
- <sect1 id="linuxemu-matlab">
- <sect1info>
+ <sect1 xml:id="linuxemu-matlab">
+ <info><title>安装&matlab;</title>
<authorgroup>
- <author>
- <firstname>Dan</firstname>
- <surname>Pelleg</surname>
- <contrib>Contributed by </contrib>
- </author>
+ <author><personname><firstname>Dan</firstname><surname>Pelleg</surname></personname><contrib>Contributed by </contrib></author>
<!-- daniel+handbook@pelleg.org -->
</authorgroup>
- </sect1info>
- <title>安装&matlab;</title>
+ </info>
+
<indexterm>
<primary>应用程序</primary>
@@ -618,8 +582,7 @@ FEATURE Maple maplelmg 2000.0831 permanent 1 XXXXXXXXXXXX \
它工作的很好,除了<application>&java.virtual.machine;</application>例外(参考
<xref linkend="matlab-jre"/>)。</para>
- <para>Linux版本的<application>&matlab;</application>可以从MathWorks<ulink
- url="http://www.mathworks.com"></ulink>订购。请确定您也得到了许可文件或安装说明。
+ <para>Linux版本的<application>&matlab;</application>可以从MathWorks<uri xlink:href="http://www.mathworks.com">http://www.mathworks.com</uri>订购。请确定您也得到了许可文件或安装说明。
等您成功后,让他们知道您想要一个本地&os;版本。</para>
<sect2>
@@ -629,14 +592,14 @@ FEATURE Maple maplelmg 2000.0831 permanent 1 XXXXXXXXXXXX \
<procedure>
<step>
- <para>以<username>root</username>身份插入安装CD并挂载上。
+ <para>以<systemitem class="username">root</systemitem>身份插入安装CD并挂载上。
推荐使用安装脚本,为了启动安装脚本,键入:</para>
<screen>&prompt.root; <userinput>/compat/linux/bin/sh /cdrom/install</userinput></screen>
<tip>
<para>安装程序是图形的。如果您得到不能打开显示的错误,可以键入
- <command>setenv HOME ~<replaceable>USER</replaceable></command>,
+ <command>setenv HOME ~USER</command>,
<replaceable>USER</replaceable>是您&man.su.1;成的用户。</para>
</tip>
</step>
@@ -712,7 +675,7 @@ exit 0</programlisting>
<screen>&prompt.root; <userinput>chmod +x /usr/local/etc/rc.d/flexlm.sh</userinput></screen>
- <para>您也必须替换<replaceable>username</replaceable>为机器上的一个用户(不要是<username>root</username>)。
+ <para>您也必须替换<replaceable>username</replaceable>为机器上的一个用户(不要是<systemitem class="username">root</systemitem>)。
</para>
</important>
</step>
@@ -725,7 +688,7 @@ exit 0</programlisting>
</procedure>
</sect2>
- <sect2 id="matlab-jre">
+ <sect2 xml:id="matlab-jre">
<title>链接&java;运行时环境</title>
<para>改变<application>&java;</application>运行时环境(JRE),链接到一个可以工作的版本:
@@ -753,7 +716,7 @@ exit 0</programlisting>
</procedure>
<tip>
- <para>依赖于您的<filename role="package">emulators/linux_base</filename>版本,
+ <para>依赖于您的<package>emulators/linux_base</package>版本,
您在运行这个脚本时可能会出错,为了避免错误,编辑<filename>/compat/linux/usr/local/matlab/bin/matlab</filename>,
把这行:</para>
@@ -809,7 +772,7 @@ exit 0</programlisting>
</procedure>
</sect2>
- <sect2 id="matlab-using">
+ <sect2 xml:id="matlab-using">
<title>使用&matlab;</title>
<para>现在您已经可以键入
@@ -817,18 +780,14 @@ exit 0</programlisting>
</sect2>
</sect1>
- <sect1 id="linuxemu-oracle">
- <sect1info>
+ <sect1 xml:id="linuxemu-oracle">
+ <info><title>安装&oracle;</title>
<authorgroup>
- <author>
- <firstname>Marcel</firstname>
- <surname>Moolenaar</surname>
- <contrib>Contributed by </contrib>
- </author>
+ <author><personname><firstname>Marcel</firstname><surname>Moolenaar</surname></personname><contrib>Contributed by </contrib></author>
<!-- marcel@cup.hp.com -->
</authorgroup>
- </sect1info>
- <title>安装&oracle;</title>
+ </info>
+
<indexterm>
<primary>应用程序</primary>
@@ -844,17 +803,17 @@ exit 0</programlisting>
<sect2>
<title>安装Linux环境</title>
- <para>确信您已经从 Ports Collection 安装了 <filename role='package'>emulators/linux_base</filename> 和
- <filename role='package'>devel/linux_devtools</filename>。 如果在使用这些 port
+ <para>确信您已经从 Ports Collection 安装了 <package>emulators/linux_base</package> 和
+ <package>devel/linux_devtools</package>。 如果在使用这些 port
时遇到困难, 您可能就不得不从 package, 或使用较早版本的 Ports Collection
来安装。</para>
<para>如果要运行智能代理, 您还需要安装 Red Hat Tcl 软件包:
<filename>tcl-8.0.3-20.i386.rpm</filename>。
用于安装官方的 <application>RPM</application>
- (<filename role='package'>archivers/rpm</filename>) 软件包的命令是:</para>
+ (<package>archivers/rpm</package>) 软件包的命令是:</para>
- <screen>&prompt.root; <userinput>rpm -i --ignoreos --root /compat/linux --dbpath /var/lib/rpm <replaceable>package</replaceable></userinput></screen>
+ <screen>&prompt.root; <userinput>rpm -i --ignoreos --root /compat/linux --dbpath /var/lib/rpm package</userinput></screen>
<para><replaceable>包</replaceable>的安装通常不会出错。 </para>
</sect2>
@@ -867,7 +826,7 @@ exit 0</programlisting>
不像在<application>&oracle;</application>安装指南中所描述的那样。
</para>
- <sect3 id="linuxemu-kernel-tuning">
+ <sect3 xml:id="linuxemu-kernel-tuning">
<title>调整内核</title>
<indexterm><primary>调整内核</primary></indexterm>
@@ -892,18 +851,18 @@ options SYSVSEM #SysV semaphores
options SYSVMSG #SysV interprocess communication</programlisting>
</sect3>
- <sect3 id="linuxemu-oracle-account">
+ <sect3 xml:id="linuxemu-oracle-account">
<title>&oracle;帐号</title>
- <para>创建一个<username>oracle</username>帐号,正如您创建其他帐号一样。
- <username>oracle</username> 帐号特殊的地方是您需要给它一个Linux shell。
+ <para>创建一个<systemitem class="username">oracle</systemitem>帐号,正如您创建其他帐号一样。
+ <systemitem class="username">oracle</systemitem> 帐号特殊的地方是您需要给它一个Linux shell。
添加<literal>/compat/linux/bin/bash</literal>到<filename>/etc/shells</filename>,
- 然后设置<username>oracle</username>帐号的shell为<filename>/compat/linux/bin/bash</filename>。
+ 然后设置<systemitem class="username">oracle</systemitem>帐号的shell为<filename>/compat/linux/bin/bash</filename>。
</para>
</sect3>
- <sect3 id="linuxemu-environment">
+ <sect3 xml:id="linuxemu-environment">
<title>环境</title>
<para>除了普通的<application>&oracle;</application>变量外,
@@ -974,7 +933,7 @@ export PATH</programlisting>
<para>由于 Linux 模拟器的一处小小的差异, 您必须在 <filename>/var/tmp</filename>
中创建一个名为 <filename>.oracle</filename> 的目录才能够启动安装程序。
- 需要把它设置为属于 <username>oracle</username> 用户。 接下来,
+ 需要把它设置为属于 <systemitem class="username">oracle</systemitem> 用户。 接下来,
您就可以毫无问题地安装 <application>&oracle;</application> 了。
如果您遇到问题, 请首先检查 <application>&oracle;</application>
软件包和/或配置文件!安装完 <application>&oracle;</application>
@@ -992,10 +951,10 @@ export PATH</programlisting>
<para>不要忘记了再运行一下<filename>root.sh</filename>!</para>
- <sect3 id="linuxemu-patch-root">
+ <sect3 xml:id="linuxemu-patch-root">
<title>修补root.sh</title>
- <para>从CD安装<application>&oracle;</application>时,一些工作需要在<username>root</username>下执行,
+ <para>从CD安装<application>&oracle;</application>时,一些工作需要在<systemitem class="username">root</systemitem>下执行,
这些工作都被记录在一个叫<filename>root.sh</filename>的脚本里面。这个脚本被写在<filename>orainst</filename>目录。
为了使用<filename>root.sh</filename>来正确定位<command>chown</command>或在Linux本地shell下执行脚本,
应该对它进行修补。</para>
@@ -1024,7 +983,7 @@ export PATH</programlisting>
</para>
</sect3>
- <sect3 id="linuxemu-patch-tcl">
+ <sect3 xml:id="linuxemu-patch-tcl">
<title>修补genclntsh</title>
<para><command>genclntsh</command>脚本用来创建一个简单的共享客户端库。在建立demos时被使用。
@@ -1057,7 +1016,7 @@ export PATH</programlisting>
</sect2>
</sect1>
- <sect1 id="linuxemu-advanced">
+ <sect1 xml:id="linuxemu-advanced">
<title>高级主题</title>
<para>如果您对Linux兼容模式是如何工作的感到好奇,这节正是您所需要的。 下面的绝大部分内容是由
@@ -1138,8 +1097,8 @@ export PATH</programlisting>
<para>另外,Linux模式动态地<emphasis>reroots</emphasis>查找;这和启动文件系统的<option>union</option>
选项是等效的(即时不是<literal>unionfs</literal>文件系统)。
- 首先会试图在<filename>/compat/linux/<replaceable>original-path</replaceable></filename>
- 目录查找文件,如果失败了,就会在<filename>/<replaceable>original-path</replaceable></filename>
+ 首先会试图在<filename>/compat/linux/original-path</filename>
+ 目录查找文件,如果失败了,就会在<filename>/original-path</filename>
目录下查找。这使得需要其它程序的程序可以运行(例如,Linux工具链都可以在Linux ABI的支持下工作)。
也就是说Linux程序可以加载和执行FreeBSD程序,如果当前没有相应的Linux程序,
那您可以在<filename>/compat/linux</filename>目录树中放置一个&man.uname.1;,使 Linux 程序不易察觉它们并没有运行在 Linux 系统上。