To Configure a Mac OS X License Server

Important: If your license server is running, you must stop it before performing any configuration or system maintenance. If you have a firewall between the license server(s) and the client computers, you must open some TCP/IP ports on the server for license-related communication. Open port 2080 for adskflex, and open ports 27000 through 27009 for lmgrd.

To set up a basic network license server on Mac OS X, you can follow this Quick Start procedure from the Up and Ready website. As an alternative, you can follow the steps below to configure a Mac OS X license server with automatic startup.

  1. Create a directory titled flexnetserver under the home directory; for example, /usr/local/flexnetserver.
  2. Move the following files: lmgrd, adskflex, lmutil, and your product license file (.lic) into the flexnetserver directory created in Step 1.
  3. If it does not already exist, create the directory StartupItems under /Library using the sudo command. For example, sudo mkdir StartupItems.
  4. Create a startup item directory; for example, /Users/<user id>/adsknlm.
  5. Create an executable script file; for example, adsknlm, by entering the following in Terminal:
    Note: The executable file name must be the same as the directory name.
    #!/bin/sh
    ./etc/rc.common
    StartService() {   
    ConsoleMessage “Starting Autodesk Network License Manager”
    /usr/local/flexnetserver/lmgrd -c\
    /usr/local/flexnetserver/productlicense.lic -l\
    /usr/local/flexnetserver/debug.log   
    }
    
    StopService() {   
    ConsoleMessage “Stopping Autodesk Network License Manager”
    /usr/local/flexnetserver/lmutil lmdown -q -all -force
    }
    
    RestartService() {
    ConsoleMessage “Restarting Autodesk Network License Manager”
    /usr/local/flexnetserver/lmutil lmreread -c /usr/local/flexnetserver/productlicense.lic
    }
    
    RunService “$1”
  6. Grant the executable permission to the script by entering the following in Terminal:
    chmod +x adsknlm
  7. Create a property list file named StartupParameters.plist and add it to the directory by entering the following in Terminal:
    {
    Description=”Autodesk Network License Manager”;
    Provides=(“adsknlm”)OrderPreference			=”None”;
    Messages={start=
    “Starting Autodesk Network Manager Service”;
    stop=
    “Stopping Autodesk Network Manager Service”;
    };}{
  8. Move the startup item directory to /Library/StartupItems/ and modify your directory permission by entering the following in Terminal:
    Note: For security reasons your startup item directory should be owned by root, the group should be set to wheel, and the permission for the directory should be 755.
    sudo mv /Users/<user id>/adsknlm/ /Library/StartupItems/
    sudo chown root /Library/StartupItems/adsknlm/
    sudo chgrp wheel /Library/StartupItems/adsknlm/
    sudo chmod 755 /Library/StartupItems/adsknlm/
    sudo chown root /Library/StartupItems/adsknlm/*
    sudo chgrp wheel /Library/StartupItems/adsknlm/*
  9. Your resulting directory should look like this:
    drwxr-xr-x
    4 root wheel 136 Jul 31 01 01:50drwxr-xr-x
    3 root wheel 102 Jul 30 01 21:59-rw-r--r--
    1 root wheel 204 Jul 30 20:16 StartupParameters.plist-rwxr-xr-x
    1 root wheel 417 Jul 31 00:45 adsknlm
  10. Reboot your Mac and verify in the debug.log file (/Users/<user id>/NLG/) that the lmgrd and adskflex start up successfully.