Install Matlab Production Sever locally on Ubuntu
Sep 5, 2018 · 2 min read
For a new project I am working on I had to install MatLab Production Server (MPS) locally on my machine so that I could develop a Webapp that would interact with the MPS through a RESTful API. For the sake of remembering and in order to beeing able to reinstall it later on I have detailed every step here. I mainly followed the Quick Start Guide.
- Connected to my Mathworks account where my licence (trial or final) are registered
- Downloaded the install .zip
- Unpackage the zip
- In command line went to folder location and typed ‘./install’
- Installed first MatLab, MatLab Compiler, matLab Compiler SDK kept proposed path (usr/local/MATLAB) and installed with sudo.
- Installed secondly MPS and License Manager at the “/home/username/MATLAB”
- Started the license server (going to “/home/username/MATLAB/MATLAB_Production_Server/R2018a/etc” and typing ‘./lmstart’
- If you get error ‘Your hostname matches the hostname on a SERVER line in your license file but the lmhostid in that line does not.’ then you are missing ‘lsb-core’ you can install it with ‘sudo apt-get install lsb’ and then restart the license manager.
- Install the needed runtime (depending on the applications you will want to deploy and on which version of Matlab they were developped) — Download — unzip — ‘./install’
- In ”/home/username/MATLAB/MATLAB_Production_Server/R2018a/script” type “./mps-setup” to link the runtime to your server
- If you wanna use the dashboard, go to “/home/username/MATLAB/MATLAB_Production_Server/R2018a/dashboard” and install it with “ ./mps-dashboard.bat setup”
- Then start it with “./mps-dashboard.bat start
- Connect to dashboard at http://localhost:9090
- Access dashboard with admin/admin
- Create a new server
- in Settings, Matlab runtime set path to needed Runtime (“/usr/local/MATLAB/MATLAB_RUNTIME/v94)
- in HTTP > CORS Allowed Origins set “*”
- in License > License : “27000@ComputerName:/home/username/MATLAB/MATLAB_Production_Server/R2018a/etc/license.dat”
- Your MPS is ready to run a matlab app such as https://fr.mathworks.com/help/mps/restfuljson/example-web-based-bond-pricing-tool-using-javascript.html