Updated for Mathematica 4.X by Murray Stokely. Merged with work by Bojan Bistrovic.
This document describes the process of installing the Linux version of Mathematica® 4.X onto a FreeBSD system.
The Linux version of Mathematica runs perfectly under FreeBSD however the binaries shipped by Wolfram need to be branded so that FreeBSD knows to use the Linux ABI to execute them.
The Linux version of Mathematica or Mathematica for Students can be ordered directly from Wolfram at http://www.wolfram.com/.
The Linux binaries are located in the Unix directory of the Mathematica CDROM distributed by Wolfram. You need to copy this directory tree to your local hard drive so that you can brand the Linux binaries with brandelf(1) before running the installer:
# mount /cdrom # cp -rp /cdrom/Unix/ /localdir/ # brandelf -t Linux /localdir/Files/SystemFiles/Kernel/Binaries/Linux/* # brandelf -t Linux /localdir/Files/SystemFiles/FrontEnd/Binaries/Linux/* # brandelf -t Linux /localdir/Files/SystemFiles/Installation/Binaries/Linux/* # brandelf -t Linux /localdir/Files/SystemFiles/Graphics/Binaries/Linux/* # brandelf -t Linux /localdir/Files/SystemFiles/Converters/Binaries/Linux/* # brandelf -t Linux /localdir/Files/SystemFiles/LicenseManager/Binaries/Linux/mathlm # cd /localdir/Installers/Linux/ # ./MathInstaller
Alternatively, you can simply set the default ELF brand to Linux for all unbranded binaries with the command:
# sysctl kern.fallback_elf_brand=3
This will make FreeBSD assume that unbranded ELF binaries use the Linux ABI and so you should be able to run the installer straight from the CDROM.
Before you can run Mathematica you will have to obtain a password from Wolfram that corresponds to your ``machine ID''.
Once you have installed the Linux compatibility runtime libraries and unpacked Mathematica you can obtain the ``machine ID'' by running the program mathinfo in the installation directory. This machine ID is based solely on the MAC address of your first Ethernet card.
# cd /localdir/Files/SystemFiles/Installation/Binaries/Linux # mathinfo disco.example.com 7115-70839-20412
When you register with Wolfram, either by email, phone or fax, you will give them the ``machine ID'' and they will respond with a corresponding password consisting of groups of numbers. You can then enter this information when you attempt to run Mathematica for the first time exactly as you would for any other Mathematica platform.
Mathematica 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 locally. This means you will have to copy these fonts from the CDROM or from a host with Mathematica installed to your local machine. These fonts are normally stored in /cdrom/Unix/Files/SystemFiles/Fonts on the CDROM, or /usr/local/mathematica/SystemFiles/Fonts on your hard drive. The actual fonts are in the subdirectories Type1 and X. There are several ways to use them, as described below.
The first way is to copy them into one of the existing font directories in /usr/X11R6/lib/X11/fonts. This will require editing the fonts.dir 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 mkfontdir(1) in the directory you have copied them to.
The second way to do this is to copy the directories to /usr/X11R6/lib/X11/fonts:
# cd /usr/X11R6/lib/X11/fonts # mkdir X # mkdir MathType1 # cd /cdrom/Unix/Files/SystemFiles/Fonts # cp X/* /usr/X11R6/lib/X11/fonts/X # cp Type1/* /usr/X11R6/lib/X11/fonts/MathType1 # cd /usr/X11R6/lib/X11/fonts/X # mkfontdir # cd ../MathType1 # mkfontdir
Now add the new font directories to your font path:
# xset fp+ /usr/X11R6/lib/X11/fonts/X # xset fp+ /usr/X11R6/lib/X11/fonts/MathType1 # xset fp rehash
If you are using the XFree86™ server, you can have these font directories loaded automatically by adding them to your XF86Config file.
If you do not already have a directory called /usr/X11R6/lib/X11/fonts/Type1, you can change the name of the MathType1 directory in the example above to Type1.
This, and other documents, can be downloaded from ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/.