Installing MATLAB on Linux - iteloo/formality-tools GitHub Wiki

From the MathWorks website, you should be able to download a file named download_agent.jnlp. This is the bootloader used to download, install, and activate MATLAB on your machine.

For the download_agent.jnlp to successfully run, we need to install several utilities:

  • java web start: on RedHat, run yum install javaws
  • xauth if you are accessing the machine through a SSH connection: on RedHat, run yum install xorg-x11-xauth (if xorg-x11-xauth cannot be found, the package name might have changed. Find it by running yum search xauth)

Make sure you are connecting through SSH with X forwarding enabled (e.g. by running ssh -X ...). Now run

javaws download_agent.jnlp

This should start a X window that guides you through the download, installation, and activation process.

Making symlink to matlab

On Linux the MATLAB executable is located at /usr/local/MATLAB/<<MATLAB_VERSION>>/bin/matlab. To run it anywhere you will need to add that to the PATH variable. Or you can do what I did, and create a symlink in /usr/local/bin by running

ln -s /usr/local/MATLAB/<<MATLAB_VERSION>>/bin/matlab /usr/local/bin/matlab

Possible problem with permissions

One of the steps in the MATLAB installer will ask you to specify a directory to put the MATLAB contents. The default path on Linux systems is /usr/local/MATLAB/<<MATLAB_VERSION>>. Since /usr/local/ is only writable by root, you may have to run the installer as root. My X server is not configured properly for root, so I just cheated and change the permission temporarily by running

chmod go+w /usr/local

Just remember to change it back after the installation by running

chmod go-w /usr/local