From owner-freebsd-doc@FreeBSD.ORG Sat Aug 16 21:10:11 2003 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EAE5D37B401 for ; Sat, 16 Aug 2003 21:10:11 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A08F043F93 for ; Sat, 16 Aug 2003 21:10:10 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h7H4AAUp079156 for ; Sat, 16 Aug 2003 21:10:10 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h7H4AAaX079155; Sat, 16 Aug 2003 21:10:10 -0700 (PDT) Resent-Date: Sat, 16 Aug 2003 21:10:10 -0700 (PDT) Resent-Message-Id: <200308170410.h7H4AAaX079155@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dan Pelleg Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8B3F137B401 for ; Sat, 16 Aug 2003 21:01:22 -0700 (PDT) Received: from gw.pelleg.org (gw.pelleg.org [205.201.13.235]) by mx1.FreeBSD.org (Postfix) with ESMTP id 453AE43F75 for ; Sat, 16 Aug 2003 21:01:21 -0700 (PDT) (envelope-from dpelleg@cs.cmu.edu) Received: from lank.auton.cs.cmu.edu (bzq-179-128-154.pop.bezeqint.net [212.179.128.154]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (Client CN "gw.pelleg.org", Issuer "Dan Pelleg" (verified OK)) by gw.pelleg.org (Postfix) with ESMTP id 5441A5A37 for ; Sun, 17 Aug 2003 00:01:15 -0400 (EDT) Received: by lank.auton.cs.cmu.edu (Postfix, from userid 7675) id D7E3854F; Sat, 16 Aug 2003 15:56:17 +0300 (IDT) Message-Id: <20030816125617.D7E3854F@lank.auton.cs.cmu.edu> Date: Sat, 16 Aug 2003 15:56:17 +0300 (IDT) From: Dan Pelleg To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: docs/55652: handbook addition: installing linux MATLAB X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Dan Pelleg List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2003 04:10:12 -0000 >Number: 55652 >Category: docs >Synopsis: handbook addition: installing linux MATLAB >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Aug 16 21:10:09 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Dan Pelleg >Release: FreeBSD 4.8-RC i386 >Organization: >Environment: System: FreeBSD l 4.8-RC FreeBSD 4.8-RC #4: Sat Aug 2 13:54:45 EDT 2003 root@p:/scratch/obj/usr/src/sys/L i386 >Description: Handbook section describing installation of MATLAB for linux. >How-To-Repeat: >Fix: --- en_US.ISO8859-1/books/handbook/linuxemu/chapter.sgml.orig Fri Aug 15 08:31:07 2003 +++ en_US.ISO8859-1/books/handbook/linuxemu/chapter.sgml Sat Aug 16 15:38:29 2003 @@ -2939,6 +2939,175 @@ + + + + + Dan + Pelleg + Contributed by + + + + + Installing MATLAB + + + applications + MATLAB + + + This document describes the process of installing the Linux + version of MATLAB version 6.5 onto + a FreeBSD system. It works quite well, with the exception of the Java + Virtual Machine (see below). + + The Linux version of MATLAB can be + ordered directly from MathWorks at . Make sure you also get the + license file or instructions how to create it. + + + Installing MATLAB + To install MATLAB, do the following: + + + Insert the installation CD and mount + it. Become root, as recommended by the install + script. To start the installation script type: + &prompt.root; /compat/linux/bin/sh /cdrom/install + + The installer is graphical. If you get errors about not + being able to open a display, type "setenv HOME + ~USER", where + USER is the user you did a + su as. + + + + + When asked for the MATLAB root directory, type: + /compat/linux/usr/local/matlab. + + + + For easier typing on the rest of the installation process, type + this at your shell: + set MATLAB=/compat/linux/usr/local/matlab + + + + + + Edit the license file as instructed when + obtaining the MATLAB license. + + + You can prepare this file in advance using your + favorite editor, and copy it to + $MATLAB/etc/license.dat before the + installer asks you to edit it. + + + + + + + Complete the installation process. + + + + At this point your MATLAB + installation is complete. The following steps apply "glue" to connect + it to your FreeBSD system. + + + + + License manager startup + + + Create symlinks for the license manager scripts: + &prompt.root; ln -s $MATLAB/etc/lmboot /usr/local/etc/lmboot_TMW +&prompt.root; ln -s $MATLAB/etc/lmdown /usr/local/etc/lmdown_TMW + + + Create a startup file at + /usr/local/etc/rc.d/flexlm.sh. The example + below is a modified version of the distributed + $MATLAB/etc/rc.lm.glnx86. The changes are + file locations, and startup of the license manager under + Linux emulation. + + #!/bin/sh +case "$1" in + start) + if [ -f /usr/local/etc/lmboot_TMW ]; then + /compat/linux/bin/sh /usr/local/etc/lmboot_TMW -u username && echo 'MATLAB_lmgrd' + fi + ;; + stop) + if [ -f /usr/local/etc/lmdown_TMW ]; then + /compat/linux/bin/sh /usr/local/etc/lmdown_TMW > /dev/null 2>&1 + fi + ;; + *) + echo "Usage: $0 {start|stop}" + exit 1 + ;; +esac + +exit 0 + + + The file must be made executable: + &prompt.root; chmod +x /usr/local/etc/rc.d/flexlm.sh + + + You must replace username + above with the name of a valid user on your system (and not + root). + + + + + Start the license manager: /usr/local/etc/rc.d/flexlm.sh start + + + + + + Creating a MATLAB startup script + + + Place the following startup script in + /usr/local/bin/matlab: + + #!/bin/sh +/compat/linux/bin/sh /compat/linux/usr/local/matlab/bin/matlab "$@" + + + Type: chmod +x /usr/local/bin/matlab. + + + + + + + Using MATLAB + At this point you are ready to type matlab + and start using it. Note that the version of + Java shipped with + MATLAB does not work under + FreeBSD. Therefore you will have to start + MATLAB with either the + or the + switch. + + + + + Advanced Topics >Release-Note: >Audit-Trail: >Unformatted: