Date: Tue, 26 Feb 2013 16:52:43 +0000 (UTC) From: Dru Lavigne <dru@FreeBSD.org> To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r41051 - head/en_US.ISO8859-1/books/handbook/linuxemu Message-ID: <201302261652.r1QGqhPY085519@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dru Date: Tue Feb 26 16:52:43 2013 New Revision: 41051 URL: http://svnweb.freebsd.org/changeset/doc/41051 Log: Initial pass through chapter which does some tightening, modernizing, and fixes "you" and &os;. This chapter still needs a lot of testing and modernization. The ulink/xref tags need further review as well. Approved by: gjb (mentor) Modified: head/en_US.ISO8859-1/books/handbook/linuxemu/chapter.xml Modified: head/en_US.ISO8859-1/books/handbook/linuxemu/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/linuxemu/chapter.xml Tue Feb 26 13:13:15 2013 (r41050) +++ head/en_US.ISO8859-1/books/handbook/linuxemu/chapter.xml Tue Feb 26 16:52:43 2013 (r41051) @@ -28,7 +28,7 @@ </authorgroup> </chapterinfo> - <title>Linux Binary Compatibility</title> + <title>&linux; Binary Compatibility</title> <sect1 id="linuxemu-synopsis"> <title>Synopsis</title> @@ -40,58 +40,40 @@ <secondary>Linux</secondary> </indexterm> - <para>FreeBSD provides binary compatibility with several other - &unix; like operating systems, including Linux. At this point, - you may be asking yourself why exactly, does - FreeBSD need to be able to run Linux binaries? The answer to - that question is quite simple. Many companies and developers - develop only for Linux, since it is the latest <quote>hot - thing</quote> in the computing world. That leaves the rest - of us FreeBSD users bugging these same companies and developers - to put out native FreeBSD versions of their applications. The - problem is, that most of these companies do not really realize - how many people would use their product if there were FreeBSD - versions too, and most continue to only develop for Linux. - So what is a FreeBSD user to do? This is where the Linux binary - compatibility of FreeBSD comes into play.</para> - - <para>In a nutshell, the compatibility allows FreeBSD users to - run about 90% of all Linux applications without modification. - This includes applications such as - <application>&staroffice;</application>, the Linux version of - <application>&adobe; &acrobat;</application>, - <application>&realplayer;</application>, - <application>&oracle;</application>, - <application>Doom</application>, - <application>Quake</application>, and more. It is also reported - that in some situations, Linux binaries perform better on - FreeBSD than they do under Linux.</para> - - <para>There are, however, some Linux-specific operating system - features that are not supported under FreeBSD. Linux binaries - will not work on FreeBSD if they overly use &i386; specific + <para>&os; provides binary compatibility with &linux;, allowing + users to install and run &linux; binaries on a &os; system. + Many companies and developers develop only for &linux;, and + binary compatibility allows &os; users to run about 90% of all + &linux; applications without modification. This includes + productivity applications, games, and more. It has even been + reported that, in some situations, &linux; binaries perform + better on &os; than they do on &linux;.</para> + + <para>However, some &linux;-specific operating system features + are not supported under &os;. For example, &linux; binaries + will not work on &os; if they overly use &i386; specific calls, such as enabling virtual 8086 mode.</para> <para>After reading this chapter, you will know:</para> <itemizedlist> <listitem> - <para>How to enable Linux binary compatibility on your + <para>How to enable &linux; binary compatibility on a &os; system.</para> </listitem> <listitem> - <para>How to install additional Linux shared + <para>How to install additional &linux; shared libraries.</para> </listitem> <listitem> - <para>How to install Linux applications on your FreeBSD + <para>How to install &linux; applications on a &os; system.</para> </listitem> <listitem> - <para>The implementation details of Linux compatibility in - FreeBSD.</para> + <para>The implementation details of &linux; compatibility in + &os;.</para> </listitem> </itemizedlist> @@ -99,8 +81,8 @@ <itemizedlist> <listitem> - <para>Know how to install additional third-party - software (<xref linkend="ports"/>).</para> + <para>Know how to install <link linkend="ports">additional + third-party software</link>.</para> </listitem> </itemizedlist> @@ -109,25 +91,43 @@ <sect1 id="linuxemu-lbc-install"> <title>Installation</title> - <indexterm><primary>KLD (kernel loadable - object)</primary></indexterm> + <indexterm><primary>Ports Collection</primary></indexterm> - <para>Linux binary compatibility is not turned on by default. The - easiest way to enable this functionality is to load the - <literal>linux</literal> KLD object (<quote>Kernel LoaDable - object</quote>). You can load this module by typing the - following as <username>root</username>:</para> + <para>&linux; libararies are not installed on &os; by default + and &linux; binary compatibility is not enabled by default. + &linux; libraries can be installed using the &os; Ports + Collection. Alternately, &linux; libraries can be installed + <link linkend="linuxemu-libs-manually">manually</link>.</para> + + <para>Using the Ports Collection is by far the easiest way to + install &linux; libraries. On a &os; 8.0 or higher + system, install the following port:</para> - <screen>&prompt.root; <userinput>kldload linux</userinput></screen> + <screen>&prompt.root; <userinput>cd +/usr/ports/emulators/linux_base-f10</userinput> &prompt.root; <userinput>make install distclean</userinput></screen> - <para>If you would like Linux compatibility to always be enabled, - then you should add the following line to + <note> + <para>On &os; systems prior to &os; 8.0, instead + install the <filename + role="package">emulators/linux_base-fc4</filename> + port.</para> + </note> + + <para>Once the port is installed, enable &linux; binary + compatibility by loading the <literal>linux</literal> + module. Type the following as + <username>root</username>:</para> + + <screen>&prompt.root; <userinput>kldload linux</userinput></screen> + + <para>In order for &linux; compatibility to always be enabled at + boot time, add the following line to <filename>/etc/rc.conf</filename>:</para> <programlisting>linux_enable="YES"</programlisting> - <para>The &man.kldstat.8; command can be used to verify that the - KLD is loaded:</para> + <para>To verify that the module is loaded, use + &man.kldstat.8;:</para> <screen>&prompt.user; <userinput>kldstat</userinput> Id Refs Address Size Name @@ -139,112 +139,59 @@ Id Refs Address Size Name <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> - - <sect2> - <title>Installing Linux Runtime Libraries</title> - - <indexterm> - <primary>Linux</primary> - <secondary>installing Linux libraries</secondary> - </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 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 linkend="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>On &os; systems prior to &os; 8.0, you will have - to use the <filename - role="package">emulators/linux_base-fc4</filename> port - instead of <filename - role="package">emulators/linux_base-f10</filename>.</para> - </note> - - <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 <filename - role="package">emulators/linux_base</filename> 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 id="linuxemu-libs-manually"> - <title>Installing Libraries Manually</title> - - <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> + <para>Users who prefer to statically link &linux; binary + compatibility into the kernel should add <literal>options + COMPAT_LINUX</literal> to the custom kernel configuration + file. Compile and install the new kernel as described in <link + linkend="kernelconfig"></link>.</para> + + <sect2 id="linuxemu-libs-manually"> + <title>Installing Libraries Manually</title> + + <para>While using the Ports Collection is recommended, &linux; + libraries can be installed manually. The &linux; shared + libraries required by a program and the runtime linker + should be copied to <filename + class="directory">/compat/linux</filename>. Any shared + libraries opened by &linux; programs run under &os; will + look in this directory first. For example, if a &linux; + program loads <filename>/lib/libc.so</filename>, &os; 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 to <filename + class="directory">/compat/linux/lib</filename> rather than + to the paths that the &linux; <command>ld.so</command> + reports.</para> + + <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 imported + &linux; binaries without any extra work.</para> <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 <username>root</username> 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> + <para>If the <literal>linux_base</literal> port is installed + and an application still complains about missing shared + libraries, there are two methods <username>root</username> + can use to determine which shared libraries the &linux; + binaries need.</para> + + <para>If a &linux; system is available, determine which shared + libraries the application needs, and copy them to the &os; + system.</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>In this example, FTP was used to download the &linux; + binary of <application>Doom</application> on a &linux; + system . To check which shared libraries it needs, run + <command>ldd linuxdoom</command>:</para> <screen>&prompt.user; <userinput>ldd linuxdoom</userinput> libXt.so.3 (DLL Jump 3.1) => /usr/X11/lib/libXt.so.3.1.0 @@ -252,12 +199,11 @@ libX11.so.3 (DLL Jump 3.1) => /usr/X1 libc.so.4 (DLL Jump 4.5pl26) => /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> + <para>Copy all the files in the last column into + <filename class="directory">/compat/linux</filename> on + the &os; system, with the names in the first column as + symbolic links pointing to them. This example will result + in the following files on the &os; system:</para> <screen>/compat/linux/usr/X11/lib/libXt.so.3.1.0 /compat/linux/usr/X11/lib/libXt.so.3 -> libXt.so.3.1.0 @@ -268,33 +214,31 @@ libc.so.4 (DLL Jump 4.5pl26) => /lib/ <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. For example, these + libraries exist on the system:</para> <screen>/compat/linux/lib/libc.so.4.6.27 /compat/linux/lib/libc.so.4 -> 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 + <para>and a binary claims to require a later version + according to the output of <command>ldd</command>:</para> <screen>libc.so.4 (DLL Jump 4.5pl26) -> libc.so.4.6.29</screen> <para>If it is only one or two versions out of date - in the trailing digit then do not worry about copying - <filename>/lib/libc.so.4.6.29</filename> too, because + in the trailing digit, do not worry about copying + <filename>/lib/libc.so.4.6.29</filename>, 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> + version. However, it is safe to replace the + <filename>libc.so</filename>:</para> <screen>/compat/linux/lib/libc.so.4.6.29 /compat/linux/lib/libc.so.4 -> libc.so.4.6.29</screen> @@ -304,10 +248,9 @@ libc.so.4 (DLL Jump 4.5pl26) => /lib/ <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> + <emphasis>only</emphasis> needed for &linux; binaries + as the &os; runtime linker takes care of looking for + matching major revision numbers.</para> </note> </blockquote> </informalexample> @@ -315,7 +258,7 @@ libc.so.4 (DLL Jump 4.5pl26) => /lib/ </sect2> <sect2> - <title>Installing Linux ELF Binaries</title> + <title>Installing &linux; ELF Binaries</title> <indexterm> <primary>Linux</primary> @@ -323,69 +266,71 @@ libc.so.4 (DLL Jump 4.5pl26) => /lib/ </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 + <quote>branding</quote>. If an unbranded ELF binary is + executed, it will generate an error message like the following:</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 and a Linux binary, use the &man.brandelf.1; - utility.</para> + <para>To help the &os; kernel distinguish between a &os; + ELF binary and a &linux; binary, use &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> + <para>Since the GNU toolchain places the appropriate branding + information into ELF binaries automatically, this step is + usually not necessary.</para> </sect2> <sect2> - <title>Installing a Random Linux RPM Based Application</title> - - <para>FreeBSD has its own package database and it is used to - track all ports (&linux; ports as well). So the &linux; RPM - database is not used (not supported).</para> + <title>Installing a &linux; RPM Based Application</title> - <para>However if you need to install a random &linux; - RPM-based application it can be achieved by:</para> + <para>&os; uses its own package database to track all software + installed from the Ports Collection. However, the &linux; RPM + database is not supported.</para> + + <para>In order to install a &linux; RPM-based application, first + install the <filename + role="package">archivers/rpm2cpio</filename> package or + port. Once installed, <username>root</username> can use this + command to install a <filename>.rpm</filename> as + follows:</para> <screen>&prompt.root; <userinput>cd /compat/linux</userinput> &prompt.root; <userinput>rpm2cpio -q < /path/to/linux.archive.rpm | cpio -id</userinput></screen> - <para>Then brandelf installed ELF binaries (not libraries!). - You will not be able to do a clean uninstall, but it may - help you to do tests.</para> + <para>If necessary, <command>brandelf</command> the installed + ELF binaries, but <emphasis>not</emphasis> the libraries. + Note that this will prevent a clean uninstall.</para> </sect2> <sect2> <title>Configuring the Hostname Resolver</title> - <para>If DNS does not work or you get this message:</para> + <para>If DNS does not work or this error appears:</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>Configure + <filename>/compat/linux/etc/host.conf</filename> as + follows:</para> <programlisting>order hosts, bind multi on</programlisting> - <para>The order here specifies that + <para>This order 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>/compat/linux/etc/host.conf</filename> does not + exist, &linux; applications use <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> + incompatible &os; syntax. Remove + <literal>bind</literal> if a name server is not configured + using <filename>/etc/resolv.conf</filename>.</para> </sect2> </sect1> @@ -406,47 +351,46 @@ multi on</programlisting> <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 - <ulink url="http://www.wolfram.com/"></ulink>.</para> + <para>This section describes the process of installing the + &linux; version of <application>&mathematica; 5.X</application> + onto a &os; system. <application>&mathematica;</application> + is a commercial, computational software program used in + scientific, engineering, and mathematical fields. It is + available from <ulink + url="http://www.wolfram.com/mathematica/">Wolfram + Research</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>First, tell &os; that + <application>&mathematica;</application>'s &linux; + binaries use the &linux; Application Binary Interface + <acronym>ABI</acronym>. The easiest way to do this is to + set the default ELF brand to &linux; for all unbranded + binaries with the command:</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>&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>Now, copy the file <filename>MathInstaller</filename> to - your hard drive:</para> + <para>Copy the <filename>MathInstaller</filename> to the 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 + <para>In this file, replace <literal>/bin/sh</literal> in + the first line with <literal>/compat/linux/bin/sh</literal>. + This ensures 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 + <literal>Linux)</literal> with <literal>FreeBSD)</literal> + using a text editor or the script below in the next section. + This tells the <application>&mathematica;</application> + installer, to treat &os; as a &linux;-like operating + system. Invoking <command>MathInstaller</command> should now install <application>&mathematica;</application>.</para> </sect2> @@ -455,17 +399,17 @@ multi on</programlisting> <para>The shell scripts that <application>&mathematica;</application> created during - installation have to be modified before you can use them. - If you chose <filename + installation have to be modified before use. When using + <filename class="directory">/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>, + for the <application>&mathematica;</application> + executables, symlinks in this directory will point 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> + <literal>Linux)</literal> with <literal>FreeBSD)</literal> + using a text editor or the following shell script:</para> <programlisting>#!/bin/sh cd /usr/local/bin @@ -478,90 +422,85 @@ done</programlisting> </sect2> <sect2> - <title>Obtaining Your &mathematica; Password</title> + <title>Obtaining a &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 + <para>When <application>&mathematica;</application> is started + for the first time, it will ask for a password. If a password + had not yet been obtained from Wolfram Research, run <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> + obtain the <quote>machine ID</quote>. This machine ID is + based solely on the MAC address of the first Ethernet card, + as the copy of <application>&mathematica;</application> cannot + run on different machines.</para> + + <para>When registering with Wolfram Research, provide the + <quote>machine ID</quote> and they will respond with a + corresponding password consisting of groups of numbers.</para> </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 + class="directory">/cdrom/Unix/Files/SystemFiles/Fonts</filename> + on the CDROM, or <filename + class="directory">/usr/local/mathematica/SystemFiles/Fonts</filename> + on the hard drive. The actual fonts are in the subdirectories + <filename class="directory">Type1</filename> and + <filename class="directory">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 + class="directory">/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 + class="directory">/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> <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 + class="directory">/usr/local/lib/X11/fonts/Type1</filename> + does not already exist, change the name of the <filename + class="directory">MathType1</filename> directory in the + example above to <filename + class="directory">Type1</filename>.</para> </sect2> </sect1> @@ -593,11 +532,11 @@ done</programlisting> <para><application>&maple;</application> is a commercial mathematics program similar to - <application>&mathematica;</application>. You must purchase - this software from <ulink - url="http://www.maplesoft.com/"></ulink> and then register - there for a license file. To install this software on FreeBSD, - please follow these simple steps.</para> + <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 @@ -607,23 +546,25 @@ done</programlisting> might be <filename class="directory">/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 (<ulink - url="http://register.maplesoft.com/"></ulink>) 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 + <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 your machine for the license - server.</para></step> + comes with <application>&maple;</application>. Specify + the primary hostname for the machine for the license + server.</para> + </step> - <step><para>Patch the + <step> + <para>Patch <filename>/usr/local/maple/bin/maple.system.type</filename> - file with the following:</para> + with the following:</para> + <programlisting> ----- snip ------------------ *** maple.system.type.orig Sun Jul 8 16:35:33 2001 --- maple.system.type Sun Jul 8 16:35:51 2001 @@ -639,12 +580,11 @@ 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 + 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 @@ -660,7 +600,7 @@ done</programlisting> <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 @@ -685,14 +625,14 @@ exit 0 ----- snip ------------</programlisting></step> - <step><para>Test-start - <application>&maple;</application>:</para> + <step><para>Test that + <application>&maple;</application> starts:</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 + <para>Once everything is working, consider writing + Maplesoft to let them know you would like a native &os; version!</para></step> </procedure> @@ -700,14 +640,8 @@ exit 0 <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 - <ulink - url="http://www.globetrotter.com/"></ulink>.</para></listitem> - - <listitem><para><command>lmgrd</command> is known to be very - picky about the license file and to core dump if there + <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> @@ -724,12 +658,15 @@ 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. - <hostid>chillig</hostid> 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> @@ -752,41 +689,38 @@ FEATURE Maple maplelmg 2000.0831 permane <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 <ulink - url="http://www.mathworks.com"></ulink>. 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 <link linkend="matlab-jre"></link>.</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 <username>root</username>, 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> <screen>&prompt.root; <userinput>/compat/linux/bin/sh /cdrom/install</userinput></screen> <tip> - <para>The installer is graphical. If you get errors about - not being able to open a display, type - <command>setenv HOME + <para>The installer is graphical. If it is not able to + open a display, type <command>setenv HOME ~<replaceable>USER</replaceable></command>, - where <replaceable>USER</replaceable> is the user you - did a &man.su.1; as.</para> + where <replaceable>USER</replaceable> is the user who + ran &man.su.1;.</para> </tip> </step> @@ -798,22 +732,20 @@ FEATURE Maple maplelmg 2000.0831 permane <tip> <para>For easier typing on the rest of the installation - process, type this at your shell prompt: - <command>set - MATLAB=/compat/linux/usr/local/matlab</command></para> + process, type this at the shell prompt: <command>set + MATLAB=/compat/linux/usr/local/matlab</command>.</para> </tip> </step> <step> - <para>Edit the license file as instructed when - obtaining the <application>&matlab;</application> - license.</para> + <para>Edit the license file as instructed when obtaining + the <application>&matlab;</application> license.</para> <tip> - <para>You can prepare this file in advance using your - favorite editor, and copy it to + <para>This file can be prepared in advance using an + editor, and copied to <filename>$MATLAB/license.dat</filename> before the - installer asks you to edit it.</para> + installer asks to edit it.</para> </tip> </step> @@ -822,9 +754,9 @@ FEATURE Maple maplelmg 2000.0831 permane </step> </procedure> - <para>At this point your <application>&matlab;</application> + <para>At this point the <application>&matlab;</application> installation is complete. The following steps apply - <quote>glue</quote> to connect it to your &os; system.</para> + <quote>glue</quote> to connect it to the &os; system.</para> </sect2> <sect2> @@ -840,12 +772,12 @@ FEATURE Maple maplelmg 2000.0831 permane </step> <step> - <para>Create a startup file at + <para>Create a startup file named <filename>/usr/local/etc/rc.d/flexlm</filename>. The example below is a modified version of the distributed <filename>$MATLAB/etc/rc.lm.glnx86</filename>. The - changes are file locations, and startup of the license - manager under Linux emulation.</para> *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302261652.r1QGqhPY085519>