Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Oct 2015 17:45:08 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org
Subject:   svn commit: r47471 - head/zh_TW.UTF-8/books/handbook/linuxemu
Message-ID:  <201510011745.t91Hj8Is014725@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Thu Oct  1 17:45:07 2015
New Revision: 47471
URL: https://svnweb.freebsd.org/changeset/doc/47471

Log:
  Update Linux Binary Compatability chapter.
  
  Submitted by:	RayCherng Yu <raycherng gmail com>
  Differential Revision:	https://reviews.freebsd.org/D3597

Modified:
  head/zh_TW.UTF-8/books/handbook/linuxemu/chapter.xml

Modified: head/zh_TW.UTF-8/books/handbook/linuxemu/chapter.xml
==============================================================================
--- head/zh_TW.UTF-8/books/handbook/linuxemu/chapter.xml	Thu Oct  1 15:42:03 2015	(r47470)
+++ head/zh_TW.UTF-8/books/handbook/linuxemu/chapter.xml	Thu Oct  1 17:45:07 2015	(r47471)
@@ -6,65 +6,73 @@
      Original revision: 1.132
 -->
 <chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" xml:id="linuxemu">
-  <info><title>與 Linux Binary 的相容方面</title>
+  <info>
+    <title>&linux; 二進位檔的相容性</title>
+
     <authorgroup>
-      <author><personname><firstname>Jim</firstname><surname>Mock</surname></personname><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><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>
+      <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>
   </info>
 
-  
-
   <sect1 xml:id="linuxemu-synopsis">
     <title>概述</title>
-    <indexterm><primary>Linux binary compatibility</primary></indexterm>
+
+    <indexterm>
+      <primary>Linux binary compatibility</primary>
+    </indexterm>
     <indexterm>
       <primary>binary compatibility</primary>
       <secondary>Linux</secondary>
     </indexterm>
 
-    <para>FreeBSD 有提供其他幾種 &unix; like 作業系統的 binary 相容性,其中包括了 Linux。
-      你可能會納悶:為什麼 FreeBSD 需要能夠執行 Linux 專用執行檔(binary)呢?答案很簡單,
-      許多公司、開發者只會 Linux 開發程式,因為這是目前資訊界 <quote>最熱門</quote> 的玩意。
-      這逼得許多 FreeBSD 使用者不得不去勸說這些人是否提供可直接在 FreeBSD 上執行的版本。
-      但問題是,大多數公司並不瞭解會有多少人會用 FreeBSD 版,因此他們仍只開發 Linux 版。
-      那麼 FreeBSD 使用者該怎麼辦呢?答案就是用 FreeBSD 所提供的 Linux binary 相容。</para>
-
-    <para>簡單來講,這種相容性可讓 FreeBSD 使用者直接執行約 90% 的 Linux 程式,而不必做任何修改。
-      這些包括了: <application>&staroffice;</application>、
-      <application>&netscape;</application> 的 Linux 版、
-      <application>&adobe;&nbsp;&acrobat;</application>、
-      <application>RealPlayer</application>、
-      <application>VMware</application>、
-      <application>&oracle;</application>、
-      <application>WordPerfect</application>、<application>Doom</application>、
-      <application>Quake</application> 等等。此外,也有人回報說在某些情況下,
-      這些在 FreeBSD 上執行的 Linux 程式,甚至比原本在 Linux 執行得更好。</para>
-
-    <para>然而呢,還是有些只限 Linux 特定的作業系統功能,在 FreeBSD 上並未支援。
-      如果 Linux 程式過於濫用只有 &i386; 架構上才能用的功能,比如:虛擬 8086 模式,
-      則可能無法在 FreeBSD 運作正常。</para>
+    <para>&os; 提供和32位元 &linux; 二進位檔的相容性,允許使用者在 &os;不需要修改就可以安裝和執行大部份32位元 &linux; 二進位檔。
+      曾經有人指出,在某些情況下,32位元 &linux;二進位檔在 &os; 的表現比在 &linux;好。</para>
+
+    <para>然而,某些However, some &linux;作業系統的特色在 &os; 並未支援。
+      例如,如果 &linux; 二進位檔過度使用&i386;特定的呼叫,像是啟動虛擬8086模式,將無法在 &os; 執行。此外,64位元 &linux; 二進位檔目前也尚未支援。</para>
+
+    <para>讀完本章後,您將了解:</para>
 
-    <para>讀完這章,您將了解:</para>
     <itemizedlist>
       <listitem>
-	<para>如何啟用 Linux 相容模式。</para>
+	<para>如何在&os;系統啟用 &linux; 相容模式 &os;。</para>
       </listitem>
 
       <listitem>
-	<para>如何安裝額外的 Linux share libraries。</para>
-	</listitem>
+	<para>如何安裝額外的 &linux; 共享程式庫。</para>
+      </listitem>
 
       <listitem>
-	<para>如何在 FreeBSD 上安裝 Linux 程式。</para>
+	<para>如何在&os;系統安裝 &linux; 應用程式。</para>
       </listitem>
 
       <listitem>
-	<para>FreeBSD 上的 Linux 相容模式的實作細節。</para>
+	<para>The implementation details of &linux; compatibility in
+	  &os;.</para>
       </listitem>
     </itemizedlist>
 
@@ -72,466 +80,375 @@
 
     <itemizedlist>
       <listitem>
-	<para>知道如何透過 port 機制來安裝軟體(<xref linkend="ports"/>)。</para>
+	<para>知道如何安裝 <link linkend="ports">額外的第3方軟體</link>。</para>
       </listitem>
     </itemizedlist>
 
   </sect1>
 
   <sect1 xml:id="linuxemu-lbc-install">
-    <title>安裝</title>
+    <title>設置 &linux; 二進位檔相容性</title>
 
-    <indexterm><primary>KLD (kernel loadable object)</primary></indexterm>
+    <indexterm><primary>Ports Collection</primary></indexterm>
 
-    <para>預設並不會打開 Linux 相容模式,最簡單的啟用方式,就是載入
-      <literal>linux</literal> KLD object (<quote>Kernel LoaDable
-      object</quote>)。  載入方式,請切為 <systemitem class="username">root</systemitem>
-      權限,然後打下列指令:</para>
+    <para> &linux; 程式庫並未預設安裝,而且 &linux; 二進位檔相容性並未啟用。
+      &linux; 程式庫可以手動安裝或是從 &os; Ports 安裝。</para>
+
+    <para>編譯 port 前,要載入 &linux; 核心模組,否則編譯會失敗:</para>
 
     <screen>&prompt.root; <userinput>kldload linux</userinput></screen>
 
-    <para>若要每次開機都啟用的話,請把下列內容加到
-      <filename>/etc/rc.conf</filename> 檔:</para>
+    <para>確認模組已載入:</para>
 
-    <programlisting>linux_enable="YES"</programlisting>
+    <screen>&prompt.user; <userinput>kldstat</userinput>
+      Id Refs Address    Size     Name
+      1    2 0xc0100000 16bdb8   kernel
+      7    1 0xc24db000 d000     linux.ko</screen>
 
-    <para>另外可以用 &man.kldstat.8; 指令,來確認有哪些 KLD 有載入:</para>
+    <para>在 &os; 安裝基本的 &linux; 程式庫和二進位檔最簡單的方式是安裝 <package>emulators/linux_base-c6</package> 套件或是 port 。安裝 port:</para>
+
+    <screen>&prompt.root; <userinput>printf "compat.linux.osrelease=2.6.18\n" >> /etc/sysctl.conf</userinput>
+&prompt.root; <userinput>sysctl compat.linux.osrelease=2.6.18</userinput>
+&prompt.root; <userinput>pkg install emulators/linux_base-c6</userinput></screen>
+
+    <para>要讓 &linux; 相容性在開機時就啟用,可以加入這行到 <filename>/etc/rc.conf</filename>:</para>
+
+    <programlisting>linux_enable="YES"</programlisting>
 
-    <screen>&prompt.user; <userinput>kldstat</userinput>
-Id Refs Address    Size     Name
- 1    2 0xc0100000 16bdb8   kernel
- 7    1 0xc24db000 d000     linux.ko</screen>
     <indexterm>
       <primary>kernel options</primary>
       <secondary>COMPAT_LINUX</secondary>
     </indexterm>
 
-    <para>If for some reason you do not want to or cannot load the KLD,
-      then you may statically link Linux binary compatibility into the kernel
-      by adding <literal>options COMPAT_LINUX</literal> to your kernel
-      configuration file.  Then install your new kernel as described in
-      <xref linkend="kernelconfig"/>.</para>
+    <para>想要靜態連結 &linux; 二進位檔相容性到自訂核心的使用者應該增加  <literal>options COMPAT_LINUX</literal> 到他們自訂核心設定檔。
+      編譯和安裝新核心的方法,如 <xref linkend="kernelconfig"/>所述。</para>
+
+    <sect2 xml:id="linuxemu-libs-manually">
+      <title>手動安裝額外的程式庫</title>
 
-    <sect2>
-      <title>Installing Linux Runtime Libraries</title>
       <indexterm>
-	<primary>Linux</primary>
-	<secondary>installing Linux libraries</secondary>
+	<primary>shared libraries</primary>
       </indexterm>
 
-      <para>This can be done one of two ways, either by using the
-	<link linkend="linuxemu-libs-port">linux_base</link> port, or
-	by installing them <link linkend="linuxemu-libs-manually">manually</link>.</para>
-
-      <sect3 xml:id="linuxemu-libs-port">
-	<title>Installing Using the linux_base Port</title>
-	<indexterm><primary>Ports Collection</primary></indexterm>
-
-	<para>This is by far the easiest method to use when installing the
-	  runtime libraries.  It is just like installing any other port
-	  from the <link xlink:href="file://localhost/usr/ports/">Ports Collection</link>.
-	  Simply do the following:</para>
-
-	<screen>&prompt.root; <userinput>cd /usr/ports/emulators/linux_base-fc4</userinput>
-&prompt.root; <userinput>make install distclean</userinput></screen>
-
-	<para>You should now have working Linux binary compatibility.
-	  Some programs may complain about incorrect minor versions of the
-	  system libraries.  In general, however, this does not seem to be
-	  a problem.</para>
-
-	<note><para>There may be multiple versions of the <package>emulators/linux_base</package> port available,
-	  corresponding to different versions of various Linux distributions.
-	  You should install the port most closely resembling the
-	  requirements of the Linux applications you would like to
-	  install.</para></note>
-
-      </sect3>
-
-      <sect3 xml:id="linuxemu-libs-manually">
-	<title>Installing Libraries Manually</title>
+      <para>如果一個 &linux; 應用程式在設定 &linux;二進位檔相容性後表示缺少共享程式庫,
+	看看這個&linux; 二進位檔需要哪個共享程式庫,手動安裝他。</para>
 
-	<para>If you do not have the <quote>ports</quote> collection
-	  installed, you can install the libraries by hand instead.  You
-	  will need the Linux shared libraries that the program depends on
-	  and the runtime linker.  Also, you will need to create a
-	  <quote>shadow root</quote> directory,
-	  <filename>/compat/linux</filename>, for Linux libraries on your
-	  FreeBSD system.  Any shared libraries opened by Linux programs
-	  run under FreeBSD will look in this tree first.  So, if a Linux
-	  program loads, for example, <filename>/lib/libc.so</filename>,
-	  FreeBSD will first try to open
-	  <filename>/compat/linux/lib/libc.so</filename>, and if that does
-	  not exist, it will then try <filename>/lib/libc.so</filename>.
-	  Shared libraries should be installed in the shadow tree
-	  <filename>/compat/linux/lib</filename> rather than the paths
-	  that the Linux <command>ld.so</command> reports.</para>
-
-	<para>Generally, you will need to look for the shared libraries
-	  that Linux binaries depend on only the first few times that you
-	  install a Linux program on your FreeBSD system.  After a while,
-	  you will have a sufficient set of Linux shared libraries on your
-	  system to be able to run newly imported Linux binaries without
-	  any extra work.</para>
-      </sect3>
-
-      <sect3>
-	<title>How to Install Additional Shared Libraries</title>
-	<indexterm><primary>shared libraries</primary></indexterm>
-
-	<para>What if you install the <filename>linux_base</filename> port
-	  and your application still complains about missing shared
-	  libraries?  How do you know which shared libraries Linux
-	  binaries need, and where to get them?  Basically, there are 2
-	  possibilities (when following these instructions you will need
-	  to be <systemitem class="username">root</systemitem> on your FreeBSD system).</para>
-
-	<para>If you have access to a Linux system, see what shared
-	  libraries the application needs, and copy them to your FreeBSD
-	  system.  Look at the following example:</para>
-
-	<informalexample>
-	  <para>Let us assume you used FTP to get the Linux binary of
-	    <application>Doom</application>, and put it on a Linux system you have access to.  You
-	    then can check which shared libraries it needs by running
-	    <command>ldd linuxdoom</command>, like so:</para>
+	  <para> &linux; 系統中, <command>ldd</command> 可以用來決定應用程式需要哪個。
+	    例如,檢查 <command>linuxdoom</command> 需要哪個共享程式庫,從安裝 <application>Doom</application>的 &linux; 系統中執行這個指令:</para>
 
-	  <screen>&prompt.user; <userinput>ldd linuxdoom</userinput>
+      <screen>&prompt.user; <userinput>ldd linuxdoom</userinput>
 libXt.so.3 (DLL Jump 3.1) =&gt; /usr/X11/lib/libXt.so.3.1.0
 libX11.so.3 (DLL Jump 3.1) =&gt; /usr/X11/lib/libX11.so.3.1.0
 libc.so.4 (DLL Jump 4.5pl26) =&gt; /lib/libc.so.4.6.29</screen>
 
-	  <indexterm><primary>symbolic links</primary></indexterm>
-	  <para>You would need to get all the files from the last column,
-	    and put them under <filename>/compat/linux</filename>, with
-	    the names in the first column as symbolic links pointing to
-	    them.  This means you eventually have these files on your
-	    FreeBSD system:</para>
+      <indexterm>
+	<primary>symbolic links</primary>
+      </indexterm>
+
+      <para>然後,複製所有 &linux; 系統輸出最後一欄的檔案到 &os;系統的 <filename>/compat/linux</filename> 。
+	複製完後,建立符號連結到剛剛輸出第一欄的名字。這個例子會在 &os; 系統產生以下檔案:</para>
 
-	  <screen>/compat/linux/usr/X11/lib/libXt.so.3.1.0
+      <screen>/compat/linux/usr/X11/lib/libXt.so.3.1.0
 /compat/linux/usr/X11/lib/libXt.so.3 -&gt; libXt.so.3.1.0
 /compat/linux/usr/X11/lib/libX11.so.3.1.0
 /compat/linux/usr/X11/lib/libX11.so.3 -&gt; libX11.so.3.1.0
 /compat/linux/lib/libc.so.4.6.29
 /compat/linux/lib/libc.so.4 -&gt; libc.so.4.6.29</screen>
 
-	  <blockquote>
-	    <note>
-	      <para>Note that if you already have a Linux shared library
-		with a matching major revision number to the first column
-		of the <command>ldd</command> output, you will not need to
-		copy the file named in the last column to your system, the
-		one you already have should work.  It is advisable to copy
-		the shared library anyway if it is a newer version,
-		though.  You can remove the old one, as long as you make
-		the symbolic link point to the new one.  So, if you have
-		these libraries on your system:</para>
+      <para>If a &linux; shared library already exists with a
+	matching major revision number to the first column of the
+	<command>ldd</command> output, it does not need to be copied
+	to the file named in the last column, as the existing library
+	should work.  It is advisable to copy the shared library if it
+	is a newer version, though.  The old one can be removed, as
+	long as the symbolic link points to the new one.</para>
+
+      <para>For example, these libraries already exist on the &os;
+	system:</para>
 
-	      <screen>/compat/linux/lib/libc.so.4.6.27
+      <screen>/compat/linux/lib/libc.so.4.6.27
 /compat/linux/lib/libc.so.4 -&gt; libc.so.4.6.27</screen>
 
-	      <para>and you find a new binary that claims to require a
-		later version according to the output of
-		<command>ldd</command>:</para>
-
-	      <screen>libc.so.4 (DLL Jump 4.5pl26) -&gt; libc.so.4.6.29</screen>
-
-	      <para>If it is only one or two versions out of date in the
-		in the trailing digit then do not worry about copying
-		<filename>/lib/libc.so.4.6.29</filename> too, because the
-		program should work fine with the slightly older version.
-		However, if you like, you can decide to replace the
-		<filename>libc.so</filename> anyway, and that should leave
-		you with:</para>
+      <para>and <command>ldd</command> indicates that a binary
+	requires a later version:</para>
+
+      <screen>libc.so.4 (DLL Jump 4.5pl26) -&gt; libc.so.4.6.29</screen>
+
+      <para>Since the existing library is only one or two versions out
+	of date in the last digit, the program should still work with
+	the slightly older version.  However, it is safe to replace
+	the existing <filename>libc.so</filename> with the newer
+	version:</para>
 
-	      <screen>/compat/linux/lib/libc.so.4.6.29
+      <screen>/compat/linux/lib/libc.so.4.6.29
 /compat/linux/lib/libc.so.4 -&gt; libc.so.4.6.29</screen>
-	    </note>
-	  </blockquote>
 
-	  <blockquote>
-	    <note>
-	      <para>The symbolic link mechanism is
-		<emphasis>only</emphasis> needed for Linux binaries.  The
-		FreeBSD runtime linker takes care of looking for matching
-		major revision numbers itself and you do not need to worry
-		about it.</para>
-	    </note>
-	  </blockquote>
-	</informalexample>
-      </sect3>
+      <para>Generally, one will need to look for the shared libraries
+	that &linux; binaries depend on only the first few times that
+	a &linux; program is installed on &os;.  After a while, there
+	will be a sufficient set of &linux; shared libraries on the
+	system to be able to run newly installed &linux; binaries
+	without any extra work.</para>
     </sect2>
 
     <sect2>
-      <title>Installing Linux ELF Binaries</title>
+      <title>安裝 &linux; <acronym>ELF</acronym>
+	二進位檔</title>
+
       <indexterm>
 	<primary>Linux</primary>
 	<secondary>ELF binaries</secondary>
       </indexterm>
 
-      <para>ELF binaries sometimes require an extra step of
-	<quote>branding</quote>.  If you attempt to run an unbranded ELF
-	binary, you will get an error message like the following:</para>
+      <para><acronym>ELF</acronym> 二進位等有時候需要額外的步驟。當執行未標記的 <acronym>ELF</acronym> 二進位檔,會產生錯誤訊息:</para>
 
       <screen>&prompt.user; <userinput>./my-linux-elf-binary</userinput>
 ELF binary type not known
 Abort</screen>
 
-      <para>To help the FreeBSD kernel distinguish between a FreeBSD ELF
-	binary from a Linux binary, use the &man.brandelf.1;
-	utility.</para>
+      <para>為了幫 &os; 核心辨識 &os; <acronym>ELF</acronym> 二進位檔和 &linux; 二進位檔,使用 &man.brandelf.1;:</para>
 
       <screen>&prompt.user; <userinput>brandelf -t Linux my-linux-elf-binary</userinput></screen>
 
-      <indexterm><primary>GNU toolchain</primary></indexterm>
-      <para>The GNU toolchain now places the appropriate branding
-	information into ELF binaries automatically, so this step
-	should become increasingly unnecessary in the future.</para>
+      <indexterm>
+	<primary>GNU toolchain</primary>
+      </indexterm>
+
+      <para>因為GNU工具鏈會自動放置適當的標記資訊進 <acronym>ELF</acronym> 二進位檔,通常就不需要這個步驟。</para>
+    </sect2>
+
+    <sect2>
+      <title>安裝 &linux; <acronym>RPM</acronym> 基礎的應用程式</title>
+
+      <para>要安裝 &linux; <acronym>RPM</acronym> 基礎的應用程式,先安裝 <package>archivers/rpm</package> 套件或 port。
+	安裝後, <systemitem class="username">root</systemitem> 可以使用這個指令來安裝<filename>.rpm</filename>檔:</para>
+
+      <screen>&prompt.root; <userinput>cd /compat/linux</userinput>
+&prompt.root; <userinput>rpm2cpio &lt; /path/to/linux.archive.rpm | cpio -id</userinput></screen>
+
+      <para>如果需要, <command>brandelf</command> 已安裝的 <acronym>ELF</acronym>二進位檔。注意,這將會無法乾淨地解除安裝。</para>
     </sect2>
 
     <sect2>
-      <title>Configuring the Hostname Resolver</title>
+      <title>設定主機名稱解析器(Hostname Resolver)</title>
 
-      <para>If DNS does not work or you get this message:</para>
+      <para>如果 <acronym>DNS</acronym> 有問題或是出現這個錯誤:</para>
 
       <screen>resolv+: "bind" is an invalid keyword resolv+:
 "hosts" is an invalid keyword</screen>
 
-      <para>You will need to configure a
-	<filename>/compat/linux/etc/host.conf</filename> file
-	containing:</para>
+      <para>將 <filename>/compat/linux/etc/host.conf</filename>設定如下:</para>
 
       <programlisting>order hosts, bind
 multi on</programlisting>
 
-      <para>The order here specifies that <filename>/etc/hosts</filename>
-	is searched first and DNS is searched second.  When
-	<filename>/compat/linux/etc/host.conf</filename> is not
-	installed, Linux applications find FreeBSD's
-	<filename>/etc/host.conf</filename> and complain about the
-	incompatible FreeBSD syntax.  You should remove
-	<literal>bind</literal> if you have not configured a name server
-	using the <filename>/etc/resolv.conf</filename> file.</para>
+      <para>這指定先搜尋 <filename>/etc/hosts</filename> , <acronym>DNS</acronym> 次之。
+	當 <filename>/compat/linux/etc/host.conf</filename> 不存在, &linux; 應用程式會使用 <filename>/etc/host.conf</filename> 並會抱怨不相容的 &os; 語法。
+	如果名稱伺服器未設定使用<filename>/etc/resolv.conf</filename>的話,移除 <literal>bind</literal>。</para>
     </sect2>
   </sect1>
 
-  <sect1 xml:id="linuxemu-mathematica">
-    <info><title>Installing &mathematica;</title>
+  <?ignore
+
+  While the installer works, the binaries do not.  As of Oct 2013,
+  Linux emulation is 32-bit but the trial version of Mathematica is
+  only available as 64-bit.  This section should be revisited if Linux
+  emulation gets 64-bit binary support.
+
+  <sect1 id="linuxemu-mathematica">
+    <sect1info>
       <authorgroup>
-	<author><personname><firstname>Boris</firstname><surname>Hollas</surname></personname><contrib>Updated for Mathematica 5.X by </contrib></author>
+	<author>
+	  <firstname>Boris</firstname>
+	  <surname>Hollas</surname>
+	  <contrib>Updated for Mathematica 5.X by </contrib>
+	</author>
       </authorgroup>
-    </info>
-    
+    </sect1info>
+
+    <title>Installing &mathematica;</title>
 
     <indexterm>
       <primary>applications</primary>
       <secondary><application>Mathematica</application></secondary>
     </indexterm>
 
-    <para>This document describes the process of installing the Linux
-      version of <application>&mathematica; 5.X</application> onto
-      a FreeBSD system.</para>
-
-    <para>The Linux version of <application>&mathematica;</application>
-      or <application>&mathematica; for Students</application> can
-      be ordered directly from Wolfram at
-      <uri xlink:href="http://www.wolfram.com/">http://www.wolfram.com/</uri>.</para>;
+    <para>This section describes the process of installing the &linux;
+      version of <application>&mathematica; 9.X</application> onto a
+      &os; system.  <application>&mathematica;</application> is a
+      commercial, computational software program used in scientific,
+      engineering, and mathematical fields.  A 30 day trial version is
+      available for download from <ulink
+	url="http://www.wolfram.com/mathematica/">wolfram.com/mathematica</ulink>.</para>;
 
     <sect2>
       <title>Running the &mathematica; Installer</title>
 
-      <para>First, you have to tell &os; that
-	<application>&mathematica;</application>'s Linux
-	binaries use the Linux ABI.  The easiest way to do so is to
-	set the default ELF brand
-	to Linux for all unbranded binaries with the command:</para>
+      <para>Before installing &mathematica;, make sure that the
+	<filename role="package">textproc/linux-c6-aspell</filename>
+	package or port is installed and that the &man.linprocfs.5;
+	file system is mounted.</para>
 
       <screen>&prompt.root; <userinput>sysctl kern.fallback_elf_brand=3</userinput></screen>
 
-      <para>This will make &os; assume that unbranded ELF binaries
-	use the Linux ABI and so you should be able to run the
-	installer straight from the CDROM.</para>
-
-      <para>Now, copy the file <filename>MathInstaller</filename> to
-	your hard drive:</para>
-
-      <screen>&prompt.root; <userinput>mount /cdrom</userinput>
-&prompt.root; <userinput>cp /cdrom/Unix/Installers/Linux/MathInstaller /localdir/</userinput></screen>
-
-      <para>and in this file, replace <literal>/bin/sh</literal> in
-	the first line by <literal>/compat/linux/bin/sh</literal>.
-	This makes sure that the installer is executed by the Linux
-	version of &man.sh.1;.  Next, replace all occurrences of
-	<literal>Linux)</literal> by <literal>FreeBSD)</literal> with
-	a text editor or the script below in the next section.  This
-	tells the <application>&mathematica;</application> installer,
-	who calls <command>uname -s</command> to determine the
-	operating system, to treat &os; as a Linux-like operating
-	system.  Invoking <command>MathInstaller</command> will now
-	install <application>&mathematica;</application>.</para>
-    </sect2>
-
-    <sect2>
-      <title>Modifying the &mathematica; Executables</title>
-
-      <para>The shell scripts that
-	<application>&mathematica;</application> created during
-	installation have to be modified before you can use them.  If
-	you chose <filename>/usr/local/bin</filename>
-	as the directory to place the
-	<application>&mathematica;</application> executables in, you
-	will find symlinks in this directory to files called
-	<filename>math</filename>, <filename>mathematica</filename>,
-	<filename>Mathematica</filename>, and
-	<filename>MathKernel</filename>.  In each of these, replace
-	<literal>Linux)</literal> by <literal>FreeBSD)</literal> with
-	a text editor or the following shell script:</para>
-
-      <programlisting>#!/bin/sh
-cd /usr/local/bin
-for i in math mathematica Mathematica MathKernel
-  do sed 's/Linux)/FreeBSD)/g' $i &gt; $i.tmp
-  sed 's/\/bin\/sh/\/compat\/linux\/bin\/sh/g' $i.tmp &gt; $i
-  rm $i.tmp
-  chmod a+x $i
-done</programlisting>
-    </sect2>
-
-    <sect2>
-      <title>Obtaining Your &mathematica; Password</title>
-
-      <indexterm>
-	<primary>Ethernet</primary>
-	<secondary>MAC address</secondary>
-      </indexterm>
-
-      <para>When you start <application>&mathematica;</application>
-	for the first time, you will be asked for a password.  If you
-	have not yet obtained a password from Wolfram, run the program
-	<command>mathinfo</command> in the installation directory to
-	obtain your <quote>machine ID</quote>.  This machine ID is
-	based solely on the MAC address of your first Ethernet card,
-	so you cannot run your copy of
-	<application>&mathematica;</application> on different
-	machines.</para>
-
-      <para>When you register with Wolfram, either by email, phone or fax,
-	you will give them the <quote>machine ID</quote> and they will
-	respond with a corresponding password consisting of groups of
-	numbers.</para>
+      <para>&os; will now assume that unbranded ELF binaries use the
+	&linux; <acronym>ABI</acronym> which should allow the
+	installer to execute from the CDROM.</para>
+
+      <para>The downloaded file will be saved to
+	<filename>/tmp/Mathematica_9.0.1_LINUX.sh</filename>.  Become
+	the superuser and run this installer file:</para>
+
+      <programlisting>&prompt.root; <userinput>sh /tmp/Mathematica_9.0.1_LINUX.sh</userinput>
+Mathematica Secured 9.0.1 for LINUX Installer Archive
+
+Verifying archive integrity.
+Extracting installer. ...
+                               Wolfram Mathematica 9 Installer
+Copyright (c) 1988-2013 Wolfram Research, Inc. All rights reserved.
+
+WARNING: Wolfram Mathematica is protected by copyright law and international treaties. Unauthorized
+reproduction or distribution may result in severe civil and criminal
+penalties and will be prosecuted to the maximum extent possible under law.
+
+Enter the installation directory, or press ENTER to select /usr/local/Wolfram/Mathematica/9.0:
+>
+Now installing...
+***********************
+Installation complete.</programlisting>
     </sect2>
 
     <sect2>
       <title>Running the &mathematica; Frontend over a Network</title>
 
       <para><application>&mathematica;</application> uses some special
-	fonts to display characters not
-	present in any of the standard font sets (integrals, sums, Greek
-	letters, etc.).  The X protocol requires these fonts to be install
-	<emphasis>locally</emphasis>.  This means you will have to copy
-	these fonts from the CDROM or from a host with
-	<application>&mathematica;</application>
-	installed to your local machine.  These fonts are normally stored
-	in <filename>/cdrom/Unix/Files/SystemFiles/Fonts</filename> on the
-	CDROM, or
-	<filename>/usr/local/mathematica/SystemFiles/Fonts</filename> on
-	your hard drive.  The actual fonts are in the subdirectories
-	<filename>Type1</filename> and <filename>X</filename>.  There are
-	several ways to use them, as described below.</para>
-
-      <para>The first way is to copy them into one of the existing font
-	directories in <filename>/usr/X11R6/lib/X11/fonts</filename>.
-	This will require editing the <filename>fonts.dir</filename> file,
-	adding the font names to it, and changing the number of fonts on
-	the first line.  Alternatively, you should also just be able to
-	run &man.mkfontdir.1; in the directory you have copied
-	them to.</para>
+	fonts to display characters not present in any of the standard
+	font sets.  <application>Xorg</application> requires these
+	fonts to be installed locally.  This means that these fonts
+	need to be copied from the CDROM or from a host with
+	<application>&mathematica;</application> installed to the
+	local machine.  These fonts are normally stored in <filename
+	  >/cdrom/Unix/Files/SystemFiles/Fonts</filename>
+	on the CDROM, or <filename
+	  >/usr/local/mathematica/SystemFiles/Fonts</filename>
+	on the hard drive.  The actual fonts are in the subdirectories
+	<filename>Type1</filename> and
+	<filename>X</filename>.  There are several
+	ways to use them, as described below.</para>
+
+      <para>The first way is to copy the fonts into one of the
+	existing font directories in <filename
+	  >/usr/local/lib/X11/fonts</filename> then
+	running &man.mkfontdir.1; within the directory containing the
+	new fonts.</para>
 
       <para>The second way to do this is to copy the directories to
-	<filename>/usr/X11R6/lib/X11/fonts</filename>:</para>
+	<filename
+	  >/usr/local/lib/X11/fonts</filename>:</para>
 
-      <screen>&prompt.root; <userinput>cd /usr/X11R6/lib/X11/fonts</userinput>
+      <screen>&prompt.root; <userinput>cd /usr/local/lib/X11/fonts</userinput>
 &prompt.root; <userinput>mkdir X</userinput>
 &prompt.root; <userinput>mkdir MathType1</userinput>
 &prompt.root; <userinput>cd /cdrom/Unix/Files/SystemFiles/Fonts</userinput>
-&prompt.root; <userinput>cp X/* /usr/X11R6/lib/X11/fonts/X</userinput>
-&prompt.root; <userinput>cp Type1/* /usr/X11R6/lib/X11/fonts/MathType1</userinput>
-&prompt.root; <userinput>cd /usr/X11R6/lib/X11/fonts/X</userinput>
+&prompt.root; <userinput>cp X/* /usr/local/lib/X11/fonts/X</userinput>
+&prompt.root; <userinput>cp Type1/* /usr/local/lib/X11/fonts/MathType1</userinput>
+&prompt.root; <userinput>cd /usr/local/lib/X11/fonts/X</userinput>
 &prompt.root; <userinput>mkfontdir</userinput>
 &prompt.root; <userinput>cd ../MathType1</userinput>
 &prompt.root; <userinput>mkfontdir</userinput></screen>
 
-      <para>Now add the new font directories to your font path:</para>
+      <para>Now add the new font directories to the font path:</para>
 
-      <screen>&prompt.root; <userinput>xset fp+ /usr/X11R6/lib/X11/fonts/X</userinput>
-&prompt.root; <userinput>xset fp+ /usr/X11R6/lib/X11/fonts/MathType1</userinput>
+      <screen>&prompt.root; <userinput>xset fp+ /usr/local/lib/X11/fonts/X</userinput>
+&prompt.root; <userinput>xset fp+ /usr/local/lib/X11/fonts/MathType1</userinput>
 &prompt.root; <userinput>xset fp rehash</userinput></screen>
 
-      <para>If you are using the <application>&xorg;</application> server, you can have these font
-	directories loaded automatically by adding them to your
-	<filename>xorg.conf</filename> file.</para>
+      <para>When using the <application>&xorg;</application> server,
+	these font directories can be loaded automatically by adding
+	them to <filename>/etc/X11/xorg.conf</filename>.</para>
 
-      <note><para>For <application>&xfree86;</application> servers,
-	the configuration file is <filename>XF86Config</filename>.</para></note>
       <indexterm><primary>fonts</primary></indexterm>
 
-      <para>If you <emphasis>do not</emphasis> already have a directory
-	called <filename>/usr/X11R6/lib/X11/fonts/Type1</filename>, you
-	can change the name of the <filename>MathType1</filename>
-	directory in the example above to
-	<filename>Type1</filename>.</para>
+      <para>If <filename
+	  >/usr/local/lib/X11/fonts/Type1</filename>
+	does not already exist, change the name of the <filename
+	  >MathType1</filename> directory in the
+	example above to <filename
+	  >Type1</filename>.</para>
     </sect2>
   </sect1>
+  -->
 
-  <sect1 xml:id="linuxemu-maple">
-    <info><title>Installing &maple;</title>
+  <!--
+  As of October 2013, the trial version is only available in the
+  Professional and Academic editions (not the Student or Personal
+  editions) and requires a contact with a product specialist before
+  the evaluation download link is made available.
+  <sect1 id="linuxemu-maple">
+    <sect1info>
       <authorgroup>
-	<author><personname><firstname>Aaron</firstname><surname>Kaplan</surname></personname><contrib>Contributed by </contrib></author>
+	<author>
+	  <firstname>Aaron</firstname>
+	  <surname>Kaplan</surname>
+	  <contrib>Contributed by </contrib>
+	</author>
       </authorgroup>
       <authorgroup>
-	<author><personname><firstname>Robert</firstname><surname>Getschmann</surname></personname><contrib>Thanks to </contrib></author>
+	<author>
+	  <firstname>Robert</firstname>
+	  <surname>Getschmann</surname>
+	  <contrib>Thanks to </contrib>
+	</author>
       </authorgroup>
-    </info>
-    
+    </sect1info>
+    <title>Installing &maple;</title>
 
     <indexterm>
       <primary>applications</primary>
       <secondary><application>Maple</application></secondary>
     </indexterm>
 
-    <para><application>&maple;</application> is a commercial mathematics program similar to
-      <application>&mathematica;</application>.  You must purchase this software from <uri xlink:href="http://www.maplesoft.com/">http://www.maplesoft.com/</uri>; and then register there
-      for a license file.  To install this software on FreeBSD, please
-      follow these simple steps.</para>
+    <para><application>&maple;</application> is a commercial
+      mathematics program similar to
+      <application>&mathematica;</application>.  This software must be
+      purchased and licensed from <ulink
+	url="http://www.maplesoft.com/products/maple/">Maplesoft</ulink>.
+      To install the &linux; version of this software on &os;, follow
+      these steps.</para>
+
+    <procedure>
+      <step><para>Execute the <filename>INSTALL</filename> shell
+	script from the product distribution.  Choose the
+	<quote>RedHat</quote> option when prompted by the
+	installation program.  A typical installation directory
+	might be <filename
+	  >/usr/local/maple</filename>.</para></step>
+
+      <step>
+	<para>Copy the license to
+	  <filename>/usr/local/maple/license/license.dat</filename>.</para>
+      </step>
+
+      <step>
+	<para>Install the <application>FLEXlm</application> license
+	  manager by running the <filename>INSTALL_LIC</filename>
+	  install shell script that comes with
+	  <application>&maple;</application>.  Specify the primary
+	  hostname for the machine for the license server.</para>
+      </step>
+
+      <step>
+	<para>Patch
+	  <filename>/usr/local/maple/bin/maple.system.type</filename>
+	  with the following:</para>
 
-      <procedure>
-	<step><para>Execute the <filename>INSTALL</filename> shell
-	  script from the product distribution.  Choose the
-	  <quote>RedHat</quote> option when prompted by the
-	  installation program.  A typical installation directory
-	  might be <filename>/usr/local/maple</filename>.</para></step>
-
-        <step><para>If you have not done so, order a license for <application>&maple;</application>
-	  from Maple Waterloo Software (<uri xlink:href="http://register.maplesoft.com/">http://register.maplesoft.com/</uri>)
-	  and copy it to
-	  <filename>/usr/local/maple/license/license.dat</filename>.</para></step>
-
-        <step><para>Install the <application>FLEXlm</application>
-	  license manager by running the
-	  <filename>INSTALL_LIC</filename> install shell script that
-	  comes with <application>&maple;</application>.  Specify the
-	  primary hostname for your machine for the license
-	  server.</para></step>
-
-        <step><para>Patch the
-          <filename>/usr/local/maple/bin/maple.system.type</filename>
-          file with the following:</para>
-<programlisting>   ----- snip ------------------
+
+	<programlisting>   ----- snip ------------------
 *** maple.system.type.orig      Sun Jul  8 16:35:33 2001
---- maple.system.type   Sun Jul  8 16:35:51 2001
+-- - maple.system.type   Sun Jul  8 16:35:51 2001
 ***************
 *** 72,77 ****
---- 72,78 ----
+-- - 72,78 ----
           # the IBM RS/6000 AIX case
           MAPLE_BIN="bin.IBM_RISC_UNIX"
           ;;
@@ -541,27 +458,29 @@ done</programlisting>
         # We have two Linux implementations, one for Red Hat and
    ----- snip end of patch -----</programlisting>
 
-	<para>Please note that after the <literal>"FreeBSD"|\</literal> no other
-	  whitespace should be present.</para>
+	<para>Note that no whitespace should be present after
+	  <literal>"FreeBSD"|\</literal>.</para>
 
-	<para>This patch instructs <application>&maple;</application> to
-	  recognize <quote>FreeBSD</quote> as a type of Linux system.
-	  The <filename>bin/maple</filename> shell script calls the
+	<para>This patch instructs <application>&maple;</application>
+	  to recognize &os; as a type of &linux; system.  The
+	  <filename>bin/maple</filename> shell script calls the
 	  <filename>bin/maple.system.type</filename> shell script
-	  which in turn calls <command>uname -a</command> to find out the operating
-	  system name. Depending on the OS name it will find out which
-	  binaries to use.</para></step>
+	  which in turn calls <command>uname -a</command> to find out
+	  the operating system name.  Depending on the OS name it will
+	  find out which binaries to use.</para>
+      </step>
 
-      <step><para>Start the license server.</para>
+      <step>
+	<para>Start the license server.</para>
 
 	<para>The following script, installed as
-	  <filename>/usr/local/etc/rc.d/lmgrd.sh</filename> is a
+	  <filename>/usr/local/rtc/rc.d/lmgrd</filename> is a
 	  convenient way to start up <command>lmgrd</command>:</para>
 
 	<programlisting>   ----- snip ------------
 
 #! /bin/sh
-PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 PATH=${PATH}:/usr/local/maple/bin:/usr/local/maple/FLEXlm/UNIX/LINUX
 export PATH
 
@@ -583,31 +502,34 @@ stop)
 esac
 
 exit 0
-   ----- snip ------------</programlisting></step>
+   ----- snip ------------</programlisting>
+      </step>
 
+      <step>
+	<para>Test that <application>&maple;</application>
+	  starts:</para>
 
-      <step><para>Test-start <application>&maple;</application>:</para>
 	<screen>&prompt.user; <userinput>cd /usr/local/maple/bin</userinput>
 &prompt.user; <userinput>./xmaple</userinput></screen>
 
-	<para>You should be up and running. Make sure to write
-	  Maplesoft to let them know you would like a native FreeBSD
-	  version!</para></step>
+	<para>Once everything is working, consider writing Maplesoft
+	  to let them know you would like a native &os;
+	  version!</para>
+      </step>
     </procedure>
 
     <sect2>
       <title>Common Pitfalls</title>
 
       <itemizedlist>
-	<listitem><para>The <application>FLEXlm</application> license manager can be a difficult
-	  tool to work with.  Additional documentation on the subject
-	  can be found at <uri xlink:href="http://www.globetrotter.com/">http://www.globetrotter.com/</uri>.</para></listitem>;
-
-	<listitem><para><command>lmgrd</command> is known to be very picky
-	  about the license file and to core dump if there are any
-	  problems.  A correct license file should look like this:</para>
+	<listitem>
+	  <para><command>lmgrd</command> is known to be picky about
+	    the license file and to dump core if there are any
+	    problems.  A correct license file should look like
+	    this:</para>
 
-<programlisting># =======================================================
+	  <programlisting>#
+=======================================================
 # License File for UNIX Installations ("Pointer File")
 # =======================================================
 SERVER chillig ANY
@@ -619,88 +541,99 @@ FEATURE Maple maplelmg 2000.0831 permane
          ISSUED=11-may-2000 NOTICE=" Technische Universitat Wien" \
          SN=XXXXXXXXX</programlisting>
 
-	  <note><para>Serial number and key 'X''ed out. <systemitem>chillig</systemitem> is a
-	    hostname.</para></note>
-
-  	  <para>Editing the license file works as long as you do not
- 	    touch the <quote>FEATURE</quote> line (which is protected by the
- 	    license key).</para></listitem>
+	  <note>
+	    <para>In this example, the serial number and key were
+	      replaced with <literal>X</literal>.
+	      <hostid>chillig</hostid> is the hostname.</para>
+	  </note>
+
+	  <para>Editing the license file works as long as the
+	    <quote>FEATURE</quote> line is not edited.  That line is
+	    protected by the license key.</para>
+	</listitem>
       </itemizedlist>
     </sect2>
   </sect1>
+  -->
+  <!--
+  As of October, 2013, the Linux version of Matlab is only available
+  for 64-bit.
 
-  <sect1 xml:id="linuxemu-matlab">
-    <info><title>Installing &matlab;</title>
+  <sect1 id="linuxemu-matlab">
+    <sect1info>
       <authorgroup>
-	<author><personname><firstname>Dan</firstname><surname>Pelleg</surname></personname><contrib>Contributed by </contrib></author>
-	<!-- daniel+handbook@pelleg.org -->
+	<author>
+	  <firstname>Dan</firstname>
+	  <surname>Pelleg</surname>
+	  <contrib>Contributed by </contrib>
+	</author>
       </authorgroup>
-    </info>
-    
+    </sect1info>
+
+    <title>Installing &matlab;</title>
 
     <indexterm>
       <primary>applications</primary>
       <secondary><application>MATLAB</application></secondary>
     </indexterm>
 
-    <para>This document describes the process of installing the Linux
-      version of <application>&matlab; version 6.5</application> onto
-      a &os; system.  It works quite well, with the exception of the
-      <application>&java.virtual.machine;</application> (see
-      <xref linkend="matlab-jre"/>).</para>
-
-    <para>The Linux version of <application>&matlab;</application> can be
-      ordered directly from The MathWorks at <uri xlink:href="http://www.mathworks.com">http://www.mathworks.com</uri>.  Make sure you also get
-      the license file or instructions how to create it.  While you
-      are there, let them know you would like a native &os;
-      version of their software.</para>
+    <para>This document describes the process of installing the
+      &linux; version of
+      <application>&matlab; version 6.5</application> onto a &os;
+      system.  It works quite well, with the exception of the
+      <application>&java.virtual.machine;</application> which is
+      described further in <xref linkend="matlab-jre"/>.</para>
+
+    <para>The &linux; version of <application>&matlab;</application>
+      can be purchased and licensed from <ulink
+	url="http://www.mathworks.com/products/matlab/">;
+	MathWorks</ulink>.  Consider letting the company know that
+      you would like a native &os; version of this software.</para>
 
     <sect2>
       <title>Installing &matlab;</title>
 
-      <para>To install <application>&matlab;</application>, do the
-	following:</para>
+      <para>To install <application>&matlab;</application>:</para>
 
       <procedure>
 	<step>
-	  <para>Insert the installation CD and mount it.
-	    Become <systemitem class="username">root</systemitem>, as recommended by the
-	    installation script.  To start the installation script
-	    type:</para>
+	  <para>Become <username>root</username>, as recommended by
+	    the installation script.  Insert the installation CD and
+	    mount it.  To start the installation script type:</para>

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510011745.t91Hj8Is014725>