You are not logged in. Click here to log in.

codebeamer Application Lifecycle Management (ALM)

Search In Project

Search inClear

Installing FlexNet Servers

This page provides a guide for the installation of FlexNet servers on Windows and Linux operating systems.

Prerequisites

To run FlexNet, at least Java 8 is required.

Windows

To install the FlexNet Server on Windows operating system, perform the following steps:

  1. Open the following page: Order or Download Software Updates.
  2. Click Additional Downloadable Software Updates > PTC License Server: FLEXnet Publisher.
  3. Open the PDF file that includes the links to the FlexNet License Server installers.
  4. Copy the link of the Windows installer for Codebeamer to the clipboard. A typical link is as follows:
    https://download.ptc.com/download2/products/FLEXnet/PTC_E_11.19.4.3_Windows64.zip
  5. Create a <new_folder> and copy the downloaded file into that folder. For example: C:\Program Files\PTC
  6. Extract the downloaded archive to <new_folder>.
  7. Move the file <new_folder>\PTCEswlm\ptc_e\ptc_e.exe to <new_folder>\PTCEswlm\bin.
  8. Extract the license package you received to <new_folder>
  9. Edit the .lic file in <new_folder> and insert the host name of the license server in the line starting with SERVER.
    Example: The line SERVER WrongHostName 00246735CC83 needs to be replaced with SERVER CorrectsHostName 00246735CC83.
  10. Create a FlexLm service for PTC.
    1. Launch lmtools by running the <new_folder>\PTCEswlm\bin\lmtools.exe command as an administrator.
    2. Go to the Config Services tab.
    3. Create a new service FlexLM server for PTC.
    4. Browse to the location of the lmgrd.exe file: <new_folder>\PTCEswlm\bin\.
    5. Browse to the location of the .lic file. It should be in <new_folder>.
    6. Select the Use Services and the Start Server at Power Up checkboxes.
    7. Click Save Service.
    8. Go to Windows Services configuration > rRght-click FlexLM server for PTC service > Properties.
      1. Click tab General > Startup Type drop-down menu >  Automatic.
      2. Click tab Log On > Local System Account.
      3. Click Apply > OK.
  11. Launch the FlexLM server for PTC service.

Linux

RedHat

These instructions describe the installation and the configuration of the FlexNet License Server on Red Hat Enterprise Linux (RHEL) 9+. They are generally applicable to other compatible Red Hat-based distributions, such as AlmaLinux 9+ or Rocky Linux 9+.

To install FlexNet License Server on Red Hat-based Linux distributions, follow these steps:


Prepare the system:

  1. Create the flexnetsystem user:
    1. Log in to your server as a user with sudo privileges.
    2. Create a flexnet system user and a group for the FlexNet service:
      sudo useradd --system --create-home --home-dir /opt/flex --shell /bin/bash --user-group flexnet
  2. Verify the hostname:
    1. Verify the short and the full hostname of the server:
      hostname
      hostname -f
    2. If you get an empty or incorrect result, set the hostname to match the value in your license file:
      sudo hostnamectl set-hostname <your hostname>
  3. Verify the /etc/hostsfile:
    1. Ensure that the /etc/hosts file includes the short and the full hostname at the beginning of the alias list:
      cat /etc/hosts
      • Example entry:
        127.0.0.1 <full hostname> localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain4
    2. If the hostname in the output is different from the hostname in your license, update the license file to match the output of the hostname command.
    3. If cloud-init or similar tools regenerate your /etc/hosts file at startup, ensure that they retain the entries for the short and the full hostname. If your hosts file is static and does not contain the required entries, update it using a text editor.
  4. Validate the host ID:
    1. Verify the MAC addresses:
      ip a
    2. Ensure that one of the MAC addresses matches the host ID in your license file. Use the value without colons, preferably from the Ethernet device.

Configure the network and the firewall:

  1. Create a temporary folder for FlexLM:
    sudo mkdir -p /usr/tmp/.flexlm
    sudo chmod 1777 /usr/tmp/.flexlm
  2. Open the required ports:
    1. Verify the active firewall zones:
      sudo firewall-cmd --get-active-zones
    2. Open the ports for FlexLM and the vendor daemon:
      sudo firewall-cmd --zone=<your zone> --add-port=27000/tcp --permanent
      sudo firewall-cmd --zone=<your zone> --add-port=28001/tcp --permanent
    3. Reload the firewall configuration to apply the changes:
      sudo firewall-cmd --reload
      • If you use a firewall service different from firewalld, adapt the preceding firewall commands accordingly.

Configure compatibility:

  1. Create an LSB link to the standard GNU loader:
    sudo ln -s /lib64/ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3

Install the FlexNet License Server:

  1. Switch to the flexnetuser:
    sudo su - flexnet
  2. Define the variables for the installation:
    BASEDIR="/opt/flex/flexnet/"
    CFGFILE="/opt/flex/flexnet/flexnet.cfg"
    LOGFILE="/opt/flex/flexnet/flexnet.log"
    LICFILE="/opt/flex/flexnet/flexnet.lic"
    DOMAIN=$(hostname)
    HOSTID="<your hostid from the license file>"
  3. Create the application directory:
    mkdir -p "$BASEDIR"
    cd "$BASEDIR"
  4. Get the links for the FlexNet License Server installers:
    1. Open the following page: Order or Download Software Updates.
    2. Click Additional Downloadable Software UpdatesPTC License Server: FLEXnet Publisher.
    3. Open the PDF file that includes the links to the FlexNet License Server installers.
    4. Copy the PTC_D and the PTC_Elinks of the Linux installers to the clipboard.
      • Typical links:
        https://download.ptc.com/download2/products/FLEXnet/PTC_D_<FlexNet License Server version>_Linux.zip
        https://download.ptc.com/download2/products/FLEXnet/PTC_E__Linux.zip
      • You require these links for the next step.
      • You must always obtain the latest versions of the PTC_D and the PTC_E links to ensure compatibility with other PTC products.
  5. Download the FlexNet packages:
    1. Set the download variables using the installer links:
      FLEXNET_DOWNLOAD_URL1="<PTC_D installer link>"
      FLEXNET_DOWNLOAD_URL2="<PTC_E installer link>"
    2. Use your PTC eSupport Portal credentials to download the installers:
      wget --user=<your PTC eSupport portal username> --ask-password "$FLEXNET_DOWNLOAD_URL1"
      wget --user=<your PTC eSupport portal username> --ask-password "$FLEXNET_DOWNLOAD_URL2"
    3. Extract and clean up the packages:
      unzip $(basename "$FLEXNET_DOWNLOAD_URL1")
      unzip $(basename "$FLEXNET_DOWNLOAD_URL2")
      cp PTCEswlm/ptc_e/ptc_e .
      rm -r PTC*
      rm ptc_d
  6. Create the required files:
    touch "$LOGFILE" "$CFGFILE"
    touch "$LICFILE"
  7. Add the license content:
    cat > "$LICFILE" <<EOF
    # Delete these lines and paste the content of your license file.
    # Ensure the hostname, host ID, and ports are correct.
    # Always set the ports explicitly for both the server and the daemon.
    # Add the full path for the ptc_e daemon before the port in the VENDOR line.
    # Example:
    # SERVER myhostname 1234567890ab 27000
    # VENDOR ptc_e /opt/flex/flexnet/ptc_e PORT=28001
    EOF
  8. Create an environment configuration file for the FlexNet service:
    cat > "$CFGFILE" <<EOF
    LOGFILE="$LOGFILE"
    LICFILE="$LICFILE"
    EOF

Validate the FlexNet License Server installation:

  1. Verify the FlexNet License Server version:
    ./lmgrd -V
    • The preceding command must print the lmgrd version. If the command does not return the lmgrd version number, verify the hostname resolution of your server.
  2. Start FlexNet License Server:
    ./lmgrd -c ${LICFILE} -l ${LOGFILE}
    
  3. Verify the log file:
    cat ${LOGFILE}
    
    • If the logs show no errors and the vendor daemons are running, continue.
  4. Stop and exit FlexNet License Server:
    ./lmutil lmdown -c ${LICFILE} -q
    exit

Configure the FlexNet License Server as a systemd service:

  1. Switch to root:
    sudo su
  2. Define the variables for the FlexNet License Server service:
    BASEDIR="/opt/flex/flexnet/"
    CFGFILE="/opt/flex/flexnet/flexnet.cfg"
    LOGFILE="/opt/flex/flexnet/flexnet.log"
    LICFILE="/opt/flex/flexnet/flexnet.lic"
  3. Create the service file:
    cat > /etc/systemd/system/flexnet.service <<EOF
    [Unit]
    Description=FlexNet License Server
    Requires=network.target
    After=local_fs.target network.target
    
    [Service]
    EnvironmentFile=$CFGFILE
    Type=simple
    User=flexnet
    Group=flexnet
    Restart=on-failure
    WorkingDirectory=$BASEDIR
    ExecStart=${BASEDIR}lmgrd -c ${LICFILE} -l +${LOGFILE} -z -2 -p -local
    ExecStop=${BASEDIR}lmutil lmdown -c ${LICFILE} -q
    SuccessExitStatus=15
    
    [Install]
    WantedBy=multi-user.target
    EOF
  4. Reload the systemd daemons and start the service:
    systemctl daemon-reload
    systemctl start flexnet
  5. Verify the status to detect any errors:
    systemctl status flexnet
    • If there are no errors, continue.
  6. Enable the FlexNet License Server service to load at startup:
    systemctl enable flexnet
  7. If your Codebeamer server runs on the same machine, add the flexnet service as a prerequisite in the codebeamer.service file:
    [Unit]
    Description=Codebeamer Application Server
    After=network.target iptables.service firewalld.service httpd.service flexnet.service
    
    [Service]
    Type=forking
    User=codebeamer
    Environment=CB_HOME=<Codebeamer installation folder>
    Environment=CB_FLEXLM_ENABLED=true
    Environment=CB_FLEX_LM_LICENSE_SERVER_LINES="SERVER <hostname> <hostid> <flexnet_port>"
    ExecStart=<Codebeamer install folder>/bin/startup
    ExecStop=<Codebeamer install folder>/bin/stop
    WorkingDirectory=<Codebeamer installation folder>
    PIDFile=<Codebeamer installation folder>/tomcat/cb.pid
    Restart=on-failure
    RestartSec=10
    TimeoutSec=150
    
    [Install]
    WantedBy=multi-user.target
    EOF

Ubuntu

These instructions describe the installation and the configuration of the FlexNet License Server on Ubuntu 22.04 and Ubuntu 24.04. They are generally applicable to later Ubuntu versions.

To install FlexNet License Server on Ubuntu, perform the following steps:


Prepare the system:

  1. Create the flexnetsystem user:
    1. Log in to your server as a user with sudo privileges.
    2. Create a flexnet system user and a group for the FlexNet service:
      sudo adduser --home /opt/flex --system --group --shell /bin/bash flexnet
  2. Verify the hostname:
    1. Verify the short and the full hostname of the server:
      hostname
    2. If you get an empty result, set the hostname to the same value that you have in your license file:
      sudo hostnamectl set-hostname <your hostname>
    3. If the hostname in the output is different from the hostname in your license, update the hostname in the license file to the same value as the hostname command.
  3. Validate the host ID:
    1. Verify the MAC addresses:
      ip a
    2. Ensure that one of the MAC addresses returned by the preceding command is the same as the host ID in your license file. The value of the host ID must be without colons and, preferably, from the ethernet device.

Configure the network and the firewall:

  1. Create a temporary folder for FlexLM:
    sudo mkdir -p /usr/tmp/.flexlm
    sudo chmod 1777 /usr/tmp/.flexlm
  2. Enable the FlexLM and the license daemon port in the firewall:
    sudo ufw allow 27000/tcp
    sudo ufw allow 28001/tcp
    • If you use different ports, or a firewall service different than ufw, update the preceding commands accordingly.

Configure compatibility:

  1. Create an LSB link to the standard GNU loader:
    sudo ln -s /lib64/ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3

Install the FlexNet License Server:

  1. Switch to the flexnet user:
    sudo su - flexnet
  2. Define the variables for the installation:
    BASEDIR="/opt/flex/flexnet/"
    CFGFILE="/opt/flex/flexnet/flexnet.cfg"
    LOGFILE="/opt/flex/flexnet/flexnet.log"
    LICFILE="/opt/flex/flexnet/flexnet.lic"
    DOMAIN=$(hostname)
    HOSTID="<your hostid from the license file>"
  3. Create the application directory:
    mkdir -p "$BASEDIR"
    cd "$BASEDIR"
  4. Get the links for the FlexNet License Server installers:
    1. Open the following page: Order or Download Software Updates.
    2. Click Additional Downloadable Software Updates > PTC License Server: FLEXnet Publisher.
    3. Open the PDF file that includes the links to the FlexNet License Server installers.
    4. Copy the PTC_D and the PTC_E links of the Linux installers to the clipboard. Typical links are as follows:
      https://download.ptc.com/download2/products/FLEXnet/PTC_D_<FlexNet License Server version>_Linux.zip
      https://download.ptc.com/download2/products/FLEXnet/PTC_E_<FlexNet License Server version>_Linux.zip
      • You require these links for the next step.
      • You must always obtain the latest versions of the PTC_D and the PTC_E links. This ensures the compatibility of your FlexNet License Server with other PTC products.
  5. Download the FlexNet packages:
    1. Set the download variables using the PTC_D and the PTC_E installer links from the preceding step:
      FLEXNET_DOWNLOAD_URL1="<PTC_D installer link from the preceding step>"
      FLEXNET_DOWNLOAD_URL2="<PTC_E installer link from the preceding step>"
    2. Use your PTC eSupport Portal credentials to download the installers:
      wget --user=<your PTC eSupport portal username> --ask-password "$FLEXNET_DOWNLOAD_URL1"
      wget --user=<your PTC eSupport portal username> --ask-password "$FLEXNET_DOWNLOAD_URL2"
  6. Extract and clean up the packages:
    unzip $(basename "$FLEXNET_DOWNLOAD_URL1")
    unzip $(basename "$FLEXNET_DOWNLOAD_URL2")
    cp PTCEswlm/ptc_e/ptc_e .
    rm -r PTC*
    rm ptc_d
  7. Create the additional and required files:
    touch "$LOGFILE" "$CFGFILE"
    touch "$LICFILE"
  8. Add the license content:
    cat > "$LICFILE" <<EOF
    #delete these lines starting with # and add the content of your license file
    #make sure the hostname, hostid and ports are correct
    #always set the ports explicitly for both the server and the daemon
    #add full path for ptc_e daemon before the port in the VENDOR line
    #when completed, the SERVER and DAEMON lines should look like these
    #SERVER myhostname 1234567890ab 27000
    #VENDOR ptc_e /opt/flex/flexnet/ptc_e PORT=28001
    EOF
  9. Create an environment configuration file for the FlexNet service:
    cat > "$CFGFILE" <<EOF
    LOGFILE="$LOGFILE"
    LICFILE="$LICFILE"
    EOF

Validate the FlexNet License Server installation:

  1. Verify the FlexNet License Server version:
    ./lmgrd -V
    • The preceding command must print the lmgrd version. If the command does not return the lmgrd version number, verify the hostname resolution of your server.
  2. Start FlexNet License Server:
    ./lmgrd -c ${LICFILE} -l ${LOGFILE
  3. Verify the log file:
    cat ${LOGFILE
    • If the logs do not show any errors, and the vendor daemons run correctly, proceed to the next step.
  4. Stop and exit FlexNet License Server:
    ./lmutil lmdown -c ${LICFILE} -q
    exit

Configure the FlexNet License Server as a systemd service:

  1. Switch to root:
    sudo su
  2. Define the variables for the FlexNet License Server service:
    BASEDIR="/opt/flex/flexnet/"
    CFGFILE="/opt/flex/flexnet/flexnet.cfg"
    LOGFILE="/opt/flex/flexnet/flexnet.log"
    LICFILE="/opt/flex/flexnet/flexnet.lic"
  3. Create the service file:
    cat > /etc/systemd/system/flexnet.service <<EOF
    [Unit]
    Description=FlexNet License Server
    Requires=network.target
    After=local_fs.target network.target
    
    [Service]
    EnvironmentFile=$CFGFILE
    Type=simple
    User=flexnet
    Group=flexnet
    Restart=on-failure
    WorkingDirectory=$BASEDIR
    ExecStart=${BASEDIR}lmgrd -c ${LICFILE} -l +${LOGFILE} -z -2 -p -local
    ExecStop=${BASEDIR}lmutil lmdown -c ${LICFILE} -q
    SuccessExitStatus=15
    
    [Install]
    WantedBy=multi-user.target
    EOF
  4. Reload the systemd daemons, and start the service:
    systemctl daemon-reload
    systemctl start flexnet
  5. Verify the status to detect any errors:
    systemctl status flexnet
    • If there are no errors, proceed with the next step.
  6. Enable the FlexNet License Server service to load at the startup:
    systemctl enable flexnet
    • If your Codebeamer server runs on the same machine as the FlexNet License Server, make sure to add the flexnet service as a prerequisite to your codebeamer.service file, as shown in the following example:
      [Unit]
      Description=Codebeamer Application Server
      After=network.target iptables.service firewalld.service httpd.service flexnet.service
      
      [Service]
      Type=forking
      User=codebeamer
      Environment=CB_HOME={Codebeamer install folder}
      Environment=CB_FLEXLM_ENABLED=true
      Environment=CB_FLEX_LM_LICENSE_SERVER_LINES="SERVER {hostname} {hostid} {flexnet_port}"
      ExecStart={Codebeamer install folder}/bin/startup
      ExecStop={Codebeamer install folder}/bin/stop
      WorkingDirectory={Codebeamer install folder}
      PIDFile={Codebeamer install folder}/tomcat/cb.pid
      Restart=on-failure
      RestartSec=10
      TimeoutSec=150
      
      [Install]
      WantedBy=multi-user.target
      EOF