How can I change the license server used by MATLAB clients?
97 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MathWorks Support Team
le 27 Juin 2009
Modifié(e) : MathWorks Support Team
le 4 Avr 2024
I have just installed a new Network License Manager, and would like to "retarget" my MATLAB installations to this new server.
Réponse acceptée
MathWorks Support Team
le 4 Avr 2024
Modifié(e) : MathWorks Support Team
le 4 Avr 2024
This can be accomplished in 3 ways:
1) Replacing the license files MATLAB uses
2) Setting an environment variable to point to a new server
3) Launching MATLAB using the -c flag
Method 1
MATLAB clients will have a license file located in <matlabInstallationPath>\licenses This file contains of a SERVER line, and a USE_SERVER line. To change the client, replace the SERVER line with the new SERVER line from the new manager, save the file, and start MATLAB.
Method 2
During MATLAB's startup, it checks the environment variable "MLM_LICENSE_FILE". To launch MATLAB using a license from a new server, set an environment variable with either of these names to a value using the syntax {port}@{hostname} of the license server, where {port} is the number at the end of the SERVER line, and {hostname} is the resolvable name of the license manager.
For example, if the Network License Manager had a server line that read as follows:
SERVER licenseserver1 001122aabbcc 27000
the environment variable value should be set as
LM_LICENSE_FILE=27000@licenseserver1
In the example above licenseserver1 is the hostname, 001122aabbcc is the Host ID (in this case, a physical/MAC address), and 27000 is the port number.
Method 3
When launching MATLAB, you can also force it to use a particular license by using the -c flag. The argument that follows -c can be in the form of a path to a license file, or using the <port>@<hostname> syntax mentioned above. For example:
matlab -c 12345@licenseserver
On Windows machines, you can modify the target field of the MATLAB shortcut as follows for a similar effect:
"C:\Program Files\MATLAB\R2022b\bin\matlab.exe" -c 12345@licenseserver
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Manage Products dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!