View | Details | Raw Unified | Return to bug 16859
Collapse All | Expand All

(-)chapter.sgml (-149 / +45 lines)
Lines 692-726 Link Here
692
  <sect1 id="mathematica">
692
  <sect1 id="mathematica">
693
    <title>How to Install Mathematica on FreeBSD</title>
693
    <title>How to Install Mathematica on FreeBSD</title>
694
    
694
    
695
    <para><emphasis>Contributed by &a.rich; and &a.chuck;</emphasis></para>
695
    <para>This document describes the process of installing the Linux
696
    
696
version of Mathematica 4.0 onto a FreeBSD 3.X system.</para>
697
    <para>This document shows how to install the Linux binary distribution of
697
698
      Mathematica 2.2 on FreeBSD 2.1.</para>
698
    <para>The Linux version of Mathematica runs perfectly under
699
    
699
      FreeBSD however the binaries shipped by Wolfram need to be
700
    <para>Mathematica supports Linux but not FreeBSD as it stands.  So once
700
      branded so that FreeBSD knows to use the Linux ABI to execute
701
      you have configured your system for Linux compatibility you have most of
701
      them.</para>
702
      what you need to run Mathematica.</para>
703
    
704
    <para>For those who already have the student edition of Mathematica for
705
      DOS the cost of upgrading to the Linux version at the time this was
706
      written, March 1996, was &#36;45.00.  It can be ordered directly from
707
      Wolfram at (217) 398-6500 and paid for by credit card.</para>
708
702
703
    <para>The Linux version of Mathematica or Mathematica for Students
704
    can be ordered directly from Wolfram at
705
    http://www.wolfram.com</para>
706
709
    <sect2>
707
    <sect2>
710
      <title>Unpacking the Mathematica distribution</title>
708
      <title>Branding the Linux binaries</title>
711
	  
712
      <para>The binaries are currently distributed by Wolfram on CDROM. The
713
	CDROM has about a dozen tar files, each of which is a binary
714
	distribution for one of the supported architectures.  The one for
715
	Linux is named <filename>LINUX.TAR</filename>.  You can, for example,
716
	unpack this into <filename>/usr/local/Mathematica</filename>:</para>
717
      
718
      <screen>&prompt.root; <userinput>cd /usr/local</userinput>
719
&prompt.root; <userinput>mkdir Mathematica</userinput>
720
&prompt.root; <userinput>cd Mathematica</userinput>
721
&prompt.root; <userinput>tar -xvf /cdrom/LINUX.TAR</userinput></screen>
722
    </sect2>
723
    
709
    
710
      <para>The Linux binaries are located in the
711
      	<filename>Unix</filename> directory of the Mathematica CDROM
712
      	distributed by Wolfram.  You need to copy this directory tree
713
      	to your local hard drive so that you can brand the Linux
714
      	binaries with <filename>brandelf</filename>(1) before running
715
      	the installer :
716
	</para>
717
718
	<screen>&prompt.root; <userinput>mount /cdrom</userinput>
719
	&prompt.root; <userinput>cp -rp /cdrom/Unix/
720
	/localdir/</userinput>
721
	&prompt.root; <userinput>brandelf -t Linux
722
	/localdir/Files/SystemFiles/Kernel/Binaries/Linux/*</userinput>
723
	&prompt.root; <userinput>brandelf -t Linux
724
	/localdir/Files/SystemFiles/FrontEnd/Binaries/Linux/*</userinput>
725
	&prompt.root; <userinput>brandelf -t Linux
726
	/localdir/Files/SystemFiles/Installation/Binaries/Linux/*</userinput>
727
	&prompt.root: <userinput>cd
728
	/localdir/Installers/Linux/</userinput>
729
	&prompt.root: <userinput>./MathInstaller</userinput>
730
731
	</screen>
732
733
      </sect2>
734
    
724
    <sect2>
735
    <sect2>
725
      <title>Obtaining your Mathematica Password</title>
736
      <title>Obtaining your Mathematica Password</title>
726
      
737
      
Lines 730-865 Link Here
730
      <para>Once you have installed the Linux compatibility runtime libraries
741
      <para>Once you have installed the Linux compatibility runtime libraries
731
	and unpacked Mathematica you can obtain the &ldquo;machine
742
	and unpacked Mathematica you can obtain the &ldquo;machine
732
	ID&rdquo; by running the program <command>mathinfo</command> in the
743
	ID&rdquo; by running the program <command>mathinfo</command> in the
733
	Install directory.</para>
744
	Install directory.  This machine ID is based solely on the MAC
745
	address of your first ethernet card.</para>
734
746
735
      <screen>&prompt.root; <userinput>cd /usr/local/Mathematica/Install</userinput>
747
      <screen>&prompt.root; <userinput>cd /localdir/Files/SystemFiles/Installation/Binaries/Linux</userinput>
736
&prompt.root; <userinput>mathinfo</userinput>
748
&prompt.root; <userinput>mathinfo</userinput>
737
LINUX: 'ioctl' fd=5, typ=0x89(), num=0x27 not implemented
749
disco.cdrom.com 7115-70839-20412</screen>
738
richc.isdn.bcm.tmc.edu   9845-03452-90255</screen>
739
      
750
      
740
      <para>So, for example, the &ldquo;machine ID&rdquo; of
741
	<hostid>richc</hostid> is <literal>9845-03452-90255</literal>.  You
742
	can ignore the message about the ioctl that is not implemented.  It
743
	will not prevent Mathematica from running in any way and you can
744
	safely ignore it, though you will see the message every time you run
745
	Mathematica.</para>
746
	  
747
      <para>When you register with Wolfram, either by email, phone or fax, you
751
      <para>When you register with Wolfram, either by email, phone or fax, you
748
	will give them the &ldquo;machine ID&rdquo; and they will respond with
752
	will give them the &ldquo;machine ID&rdquo; and they will respond with
749
	a corresponding password consisting of groups of numbers.  You need to
753
	a corresponding password consisting of groups of numbers.  You
750
	add them both along with the machine name and license number in your
754
	can then enter this information when you attempt to run
751
	<filename>mathpass</filename> file.</para>
755
	Mathematica for the first time exactly as you would for any
752
	  
756
	other Mathematica platform.</para>
753
      <para>You can do this by invoking:</para>
754
      
755
      <screen>&prompt.root; <userinput>cd /usr/local/Mathematica/Install</userinput>
756
&prompt.root; <userinput>math.install</userinput></screen>
757
	    
758
      <para>It will ask you to enter your license number and the Wolfram
759
	supplied password.  If you get them mixed up or for some reason the
760
	<command>math.install</command> fails, that is OK; you can simply edit
761
	the file <filename>mathpass</filename> in this same directory to
762
	correct the info manually.</para>
763
	  
764
      <para>After getting past the password, <command>math.install</command>
765
	will ask you if you accept the install defaults provided, or if you
766
	want to use your own.  If you are like us and distrust all install
767
	programs, you probably want to specify the actual directories.
768
	Beware.  Although the <command>math.install</command> program asks
769
	you to specify directories, it will not
770
	create them for you, so you should perhaps have a second window open
771
	with another shell so that you can create them before you give them to
772
	the install program.  Or, if it fails, you can create the directories
773
	and then restart the <command>math.install</command> program.  The
774
	directories we chose to create beforehand and specify to
775
	<command>math.install</command> were:</para>
776
777
      <informaltable frame="none">
778
	<tgroup cols="2">
779
	  <tbody>
780
	    <row>
781
	      <entry><filename>/usr/local/Mathematica/bin</filename></entry>
782
	      <entry>for binaries</entry>
783
	    </row>
784
	    
785
	    <row>
786
	      <entry><filename>/usr/local/Mathematica/man/man1</filename></entry>
787
	      <entry>for man pages</entry>
788
	    </row>
789
	    
790
	    <row>
791
	      <entry>/usr/local/Mathematica/lib/X11</entry>
792
	      <entry>for the <filename>XKeysymb</filename> file</entry>
793
	    </row>
794
	  </tbody>
795
	</tgroup>
796
      </informaltable>
797
      
798
      <para>You can also tell it to use <filename>/tmp/math.record</filename>
799
	for the system record file, where it puts logs of sessions.  After
800
	this <command>math.install</command> will continue on to unpacking
801
	things and placing everything where it should go.</para>
802
	  
803
      <para>The Mathematica Notebook feature is included separately, as the X
804
	Front End, and you have to install it separately.  To get the X Front
805
	End stuff correctly installed, cd into the
806
	<filename>/usr/local/Mathematica/FrontEnd</filename> directory and
807
	execute the <command>xfe.install</command> shell script.  You will
808
	have to tell it where to put things, but you do not have to create any
809
	directories because it will use the same directories that had been
810
	created for <command>math.install</command>.  When it finishes, there
811
	should be a new shell script in
812
	<filename>/usr/local/Mathematica/bin</filename> called
813
	<filename>mathematica</filename>.</para>
814
	  
815
      <para>Lastly, you need to modify each of the shell scripts that
816
	Mathematica has installed.  At the beginning of every shell script in
817
	<filename>/usr/local/Mathematica/bin</filename> add the following
818
	line:</para>
819
820
      <screen>&prompt.user; <userinput>XKEYSYMDB=/usr/local/Mathematica/lib/X11/XKeysymDB; export XKEYSYMDB</userinput></screen>
821
	    
822
      <para>This tells Mathematica were to find its own
823
	version of the key mapping file <filename>XKeysymDB</filename>.
824
	Without this you will get pages of error messages about missing
825
	key mappings.</para>
826
      
827
      <para>On 2.1-STABLE you need to add the following as well:</para>
828
      
829
      <screen>&prompt.user; <userinput>RESOLV_HOST_CONF=/compat/linux/etc/host.conf; export RESOLV_HOST_CONF</userinput></screen>
830
	    
831
      <para>This tells Mathematica to use the Linux version of
832
	<filename>host.conf</filename>.  This file has a different syntax
833
	from FreeBSD's <filename>host.conf</filename>, so you will
834
	get an error message about <filename>/etc/host.conf</filename> if you
835
	leave this out.</para>
836
	  
837
      <para>You might also want to modify your
838
	<filename>/etc/manpath.config</filename> file to read the new man
839
	directory, and you may need to edit your <filename>~/.cshrc</filename>
840
	file to add <filename>/usr/local/Mathematica/bin</filename> to your
841
	path.</para>
842
	  
843
      <para>That is about all it takes.  With this you should be able to type
844
	<command>mathematica</command> and get a really slick looking
845
	Mathematica Notebook screen up.  Mathematica has included the Motif
846
	user interfaces, but it is compiled in statically, so you do not need
847
	the Motif libraries.  Good luck doing this yourself!</para>
848
    </sect2>
757
    </sect2>
849
    
758
    
850
    <sect2>
851
      <title>Bugs</title>
852
      
853
      <para>The Notebook front end is known to hang sometimes when reading
854
	notebook files with an error messages similar to:</para>
855
	  
856
      <screen><errorname>File .../Untitled-1.mb appears to be broken for OMPR.257.0</errorname></screen>
857
	    
858
      <para>We have not found the cause for this, but it only affects the
859
	Notebook's X Window front end, not the mathematica engine itself. So
860
	the command line interface invoked by <command>math</command> is
861
	unaffected by this bug.</para>
862
    </sect2>
863
    
759
    
864
    <sect2>
760
    <sect2>
865
      <title>Acknowledgments</title>
761
      <title>Acknowledgments</title>

Return to bug 16859