3.1. Start the Ansys License Manager at System Boot Time

On Windows systems, the license manager is set up as a service to start automatically at boot time.

On Linux machines, you can set the license manager to start automatically at system boot time. This task is optional but is recommended and should be done regardless of which type of license server configuration you use. You can use the following instructions for systemd to configure automatic license manager startup for all Ansys supported Linux versions. If you would prefer to use the deprecated init.d method, refer to section 5.1 in the Ansys 2020 R1 release documentation.

3.1.1. Boot Time Startup Instructions using systemd

This section details the steps that must be performed on each license server to start the license manager automatically during system boot on Ansys supported Red Hat Enterprise Linux, CentOS and SuSE SLES platforms.

The following systemd configuration steps are applicable to Red Hat, SuSE and CentOS platforms.


Note:  The procedure described below starts the license manager at boot time as root. It is not essential that the license manager be started by the root user; it may be run by a non-privileged user, depending on your preference. If you do not want the license manager to be started by root, the "User=" line in the service file is used to provide a username if you need to run the server as a specific non-root user.


Prior to performing these steps, makes sure that you have:

  • Removed any instances of the Ansys License Manager in init.d or rc.local from your environment

  • Stop Ansys License Manager

License Manager automatic startup instructions with systemd

  1. Create a service file in in the following location:

    sudo vi /etc/systemd/system/ansyslmd.service

    This file should include the following sample content:

    [Unit]
    Description=Ansys License Manager ansyslmd(CVD)
    After=syslog.target network.target
    
    [Service]
    User=
    Environment=ANSYSLMDSCRIPTS_DIR=/ansys_inc/shared_files/licensing
    Type=forking
    ExecStart=/bin/sh -c "${ANSYSLMDSCRIPTS_DIR}/start_ansyslmd"
    ExecStop=/bin/sh -c "${ANSYSLMDSCRIPTS_DIR}/stop_ansyslmd"
    Restart=on-failure
    RestartSec=100
     
    LimitNOFILE=500000
    LimitNPROC=500000
    
    [Install]
    WantedBy=multi-user.target
    
  2. After creating the service file steps above, issue the following command:

    sudo chmod 755 /etc/systemd/system/ansyslmd.service

  3. Reload the systemd process by issuing the following command:

    sudo systemctl daemon-reload

  4. Enable the service to start automatically after the reload by issuing the following command:

    sudo systemctl enable ansyslmd.service

  5. Start the service by issuing the following command:

    sudo systemctl start ansyslmd.service


    Note:  If the server shuts down while this process is enabled, the service restarts after 100 seconds.


Additional Service Commands:

Removing the automatic startup information when using systemd:

If you plan to remove the License Manager server installation from a machine and need to remove this capability, follow the instructions below.

  1. Stop the License Manager service by issuing the following command:

    sudo systemctl stop ansyslmd.service

  2. Disable the service by issuing the following command:

    sudo systemctl disable ansyslmd.service

  3. Permanently remove the service file after stopping and disabling the service:

    sudo rm /etc/systemd/system/ansyslmd.service

Checking the status of the service after start/restart/stop/reload/system reboot:

sudo systemctl status ansyslmd.service

Stopping the service:

sudo systemctl stop ansyslmd.service

Disabling the service:

sudo systemctl disable ansyslmd.service

Reloading the service:

This command should be used when you have made changes that will affect the license manager and want to incorporate these changes without stopping and restarting the license manager. This command performs the same function as the “Reread License Manager Settings” option in Ansys License Management Center.

sudo systemctl reload ansyslmd.service

Stopping and restarting the service:

sudo systemctl restart ansyslmd.service