Install Polyspace Server Products at Command Line
This topic describes how to perform an installation of the Polyspace® Server products entirely at the command line.
The Polyspace Server products support automated Polyspace runs on a Continuous Integration (CI) server. You might be accessing this server through a terminal or using cloud computing platforms such as Azure® or AWS®. In these situations, you might not be able to install Polyspace Bug Finder™ Server™ or Polyspace Code Prover™ Server using a graphical installer. Use the steps below to perform a command-line installation.
Prerequisites
Before beginning installation from the command line, note the following:
You must have a license file (
.lic
file) from MathWorks® and a File Installation Key or FIK for this license. To obtain the license file and FIK, activate Polyspace in License Center.Some of the initial steps of the installation occur in a graphical user interface. If you cannot open a graphical interface on your target machine, you must have access to a machine where you can open a graphical user interface and then transfer files from this machine to the target machine.
On the target machine, you must have the Linux Standard Base or
lsb
package installed. On most standard installations, this package is already installed. The machine must also haveunzip
or an equivalent package to extract files from a.zip
file.
Installation Steps
To run the Polyspace Server products, you have to install the products and the network license manager for managing licenses.
Create Installer
You can download a light installer from the web and create the full installer required for command-line installation (or obtain the ISO image of the full installer directly from https://www.mathworks.com/downloads/web_downloads/download_iso).
To create the full installer from the light installer download from the web:
Download a light installer (
.zip
file) from the web on a machine, where you can open a graphical user interface.For instance, you can download the installer from https://www.mathworks.com/downloads. The machine where you download the installer can have a different operating system from the machine where you will eventually install the products. For instance, you can download a light installer for Linux® on a Windows® machine, create the full installer and then transfer the full installer to the target Linux machine.
Unzip and run the installer to download additional product files so that you have a full installer.
For instance, if you downloaded the light installer to a Linux machine:
Extract files from the zipped installer.
In a terminal,
cd
to the extracted folder and enter:./install
In the installer interface, after signing in to your MathWorks Account and accepting the License Agreement, from the Advanced Options menu, select I want to download without installing.
Follow the prompts to complete the download.
Your destination folder, for instance, one that ends with
MathWorks/R
, contains all the files required for full installation.xxxx
At this point, the light installer is no longer required.
Install Product
Once you have the full installer, you are ready to install the Polyspace Server products on any machine.
Transfer the files that you downloaded in the previous step to the machine without a graphical user interface.
On this machine, run the full installer with an input file as argument. In this file, you specify the various installation specifics such as installation folder, File Installation Key or FIK, and path to license file.
For instance, if you are installing on a Linux machine:
Make a writable copy of the file
installer_input.txt
that is provided with the installer files.Read the instructions in the file and enter the required information such as destination folder, license agreement, File Installation Key or FIK, and product selection. Unlike a desktop product installation, you also need to enter the path to the license file that you obtained from MathWorks.
In a terminal,
cd
to the folder containing the installer files and enter the following:where./install -inputFile installer_input_copy.txt
installer_input_copy.txt
is the writable copy of the fileinstaller_input.txt
that you made earlier (the above command assumes that the copy is saved in the same location as the original file).Depending on where you install, you might require superuser privileges for the installation. If so, prepend
sudo
to the installation command.If you create the full installer in Windows and then transfer to a Linux machine for installation, you might see this error message during command-line installation:
Command not found
. Extract the contents of the zip filematlab_R
so that necessary files are available for command-line installation.xxxx
_glnxa64.zip
After installation,
cd
to the subfolderpolyspace/bin
in the installation folder and enter:If you do not see this subfolder or run into other errors, the installation might not have completed successfully. Check the installation log. You specified this log in the input file that you provided with the./polyspace-bug-finder-server -help
-inputFile
option. Typically, the file path is/tmp/mathworks_
.username
.log
To run Polyspace
Bug Finder
Server or Polyspace
Code Prover
Server on source files, you must also install and start the network license
manager that handles checking out of licenses. Otherwise, if you try to run
polyspace-bug-finder-server
(or
polyspace-code-prover-server
) on a C source
file:
./polyspace-bug-finder-server -sources aFile.c
Install Network License Manager
The network license manager controls checkout of licenses. To allow a Polyspace Server installation to communicate with a network license manager, you have to specify the host name and host ID of the server that runs the network license manager in your Polyspace Server installation.
To install the network license manager:
Download the network license manager in zipped format from https://www.mathworks.com/support/install/license_manager_files.html.
If you want to start the network license manager on a machine without a graphical user interface, transfer the zipped file to that machine.
Extract the network license manager files to a folder.
Modify these license files to allow communication between the Polyspace Server installation and the network license manager:
License file (
.lic
file) provided by MathWorks: Add the following lines at the beginning of the license file:where:SERVER hostname hostid port_number DAEMON MLM path_to_mlm
is the host name of the server hosting the network license manager. To find the host name, in a terminal, enter:hostname
hostname
is the MAC address of the server. You provided this MAC address to obtain the license file (and this address should be already in a comment in the license file).hostid
is the port number on the server used for communication.port_number
is the path to the MLM binary provided with the network license manager. On Linux, the binary is typically located in the subfolderpath_to_mlm
etc/glnxa64
in the network license manager folder. Example specification:/usr/local/license_manager/etc/glnxa64/MLM
.
network.lic
file in the subfolderlicenses
in the Polyspace Server installation folder: Modify the line starting withSERVER
to exactly replicate theSERVER
line in the previous license file:SERVER hostname hostid port_number
To start the network license manager, on a terminal, cd
to the subfolder etc/glnxa64
in the network license manager folder and enter:
./lmgrd -c path_to_license
path_to_license
is the path to the license file (.lic
file) provided by MathWorks. You can use the option -l
to pipe the output to a log file.You can also configure the network license manager to start automatically. It is recommended that you do not start the license manager as a root user since it is a security risk to run any program that does not require root permissions and the network license manager does not require root permissions. For instance, you can create a dedicated user with restricted permissions and start the network license manager as this user. See Start Network License Manager.
Now, you should be able to run the polyspace-bug-finder-server
(or polyspace-code-prover-server
) command on a source file
without errors. See Run Polyspace Bug Finder on Server and Upload Results to Web Interface or Run Polyspace Code Prover on Server and Upload Results to Web Interface (Polyspace Code Prover).