In order to set up gridMathematica Server, we will

Install gridMathematica Server on a Compute Node

The gridMathematica Server installer for Linux is a bash script that is run in the Linux terminal. If you’re not familiar with the terminal, please read a brief guide on how to use the terminal.

  1. Quit any previous installation of Wolfram products running on your machine.
  2. Open a terminal and change the directory to where the installer is located. For example, if the installer is located on your desktop, run:
     cd Desktop 

    This changes the directory to your desktop. If you wish to verify that the installer file is on your desktop, use the command ls.

  3. The installer needs administrative privileges to run. Use the command sudo to run the installer script. For example, if the installer is called “installer.sh”, run:
    sudo bash installer.sh

    sudo asks you to enter the administrative password on the machine. After providing the administrative password, the installer starts.

  4. The installer begins by verifying the archive integrity and then extracting the archive. Once extracted, you are prompted to enter an installation directory.
    Enter the installation directory, or press ENTER to select
    /usr/local/Wolfram/gridMathematicaServer/11.2:
  5. Press Enter to install gridMathematica Server to the default directory. To install the software in a different location, type the full file path to your desired installation directory and press Enter.

    After installing, you are prompted to configure the Lightweight Grid Manager.

    Do you want to configure the Wolfram Lightweight Grid Manager?
    
    [y]es (Recommended)
    
      Use this option if this machine is not part of an existing cluster
    management framework.
    
    [n]o
    
      Use this option if you will access this machine with a cluster management
    framework (e.g. Windows Computer Cluster Server, Sun grid Engine, Platform
    LSF), if you will access this machine with a remote shell protocol (e.g. SSH),
    or if you will install Lightweight Grid manually.
    
      If you choose this option but later change your mind, you can reinstall and
    choose yes.
  6. Type “y” to select the “yes” option and press Enter. You are prompted to choose a user account from which the daemon will run.
    Please select a User Account Method
    
    Mathematica kernels and the Wolfram Lightweight Grid Manager daemon will run
    as the user you select here.
    If you are unsure which settings apply to your situation, check with your
    system administrator.
    
      (1) Create a local account (Recommended)
    
        Use this option to create a new user account on this computer. This allows
    you to configure security settings specifically for Mathematica.
    
      (2) Use an existing account
    
        Use this option if you want to use a network user account or an existing
    local account.
  7. Press Enter to create an account. You are prompted to enter a user account.
    Enter the name of the user account to create, or press ENTER to select
    (wolframgrid):
  8. We recommend creating a new user account with the name “wolframgrid”. Press Enter to confirm this selection.

    You are prompted to create a password for the new wolframgrid user account.

    Enter a password for the user account "wolframgrid":
  9. Choose a login password for the chosen account. Reenter the password when you are prompted to do so.

    You are prompted to create a Web Interface Admin Account and password.

    Web Interface Admin Account
    
    This password is used to log in as 'admin' to the web interface to perform
    such actions as killing kernels and changing the configuration.
    
    Type a password for the web admin:
  10. Choose a login password for the Web Admin account. Reenter the password when you are prompted to do so.

    The Apache Tomcat server is started. You are prompted to enter a directory in which to place the gridMathematica executable scripts.

    Starting tomcat:
    Creating web user home directory
    Starting Tomcat
    .
    .
    .
    Type the directory path in which the gridMathematica Server script(s) will be
    created, or press ENTER to select /usr/local/bin:
  11. Press Enter to place them in the default directory. To place the executables in a different location, type the full file path to your desired executables directory and press Enter.

    If Mathematica is already installed on the computer, then you are prompted to overwrite the existing shortcuts.

    The scripts 'MathKernel', 'Mathematica', 'WolframKernel', 'math',
    'mathematica', 'mcc', 'wolfram' already exist in the directory /usr/local/bin.
    The following actions can be performed on the existing file(s).
    
      (1) Overwrite
      (2) Rename
      (3) Cancel
    
    Type your selection, or press ENTER to select (1):
  12. We recommend canceling the overwrite, as it may interfere with starting the standalone version of Mathematica that is already installed. Type “3” and press Enter to cancel this step.

The installation procedure is now complete.

Activate the gridMathematica Server’s License

  1. Change the directory in which gridMathematica Server is installed. With the default location, this would be:
    cd /usr/local/Wolfram/gridMathematicaServer/11.2/Executables
  2. Open gridMathematica with the following command:
    ./Mathematica
  3. Activate gridMathematica Server. Activating gridMathematica creates a mathpass file located at ~/.Mathematica/Licensing/mathpass.
  4. In order for all users to access activated gridMathematica kernels, move the mathpass file to the so-called base directory. You can do this with the sudo mv command:

    sudo mv ~/.Mathematica/Licensing/mathpass /usr/share/Mathematica/Licensing/.

Test a gridMathematica Kernel

  1. Open a web browser and navigate to localhost:3737. The main status page appears.

  2. The left panel indicates any gridMathematica Servers visible on the local network, including the one that was just installed.

    Navigate to Kernel Settings ► Services.

  3. Click the Open Kernel link to open a kernel. A warning message appears.

  4. Confirm the warning message by clicking OK. A Wolfram kernel attempts to start.
  5. Wait for the Wolfram kernel to initialize. A connection status appears.

  6. Verify that the Kernel state is Available.

The configuration of the Lightweight Grid Manager is now complete and tested.