Skip to main content

FlexNet

FlexNet Commands

License Server Start:

sudo -u flexlm /opt/flexnet/creo/lmgrd -c /opt/flexnet/creo/lic.lic -l /var/log/loglmgrd.log

View Running Licenses:

sudo -u flexlm /opt/flexnet/creo/lmutil lmstat -a -c /opt/flexnet/creo/lic.lic

Check Port:

sudo lsof -i :7788

FlexNet License File Relocation

Move lmgrd, lmutil, and ptc_d to the /opt/flexnet/creo/flexnet directory (or wherever you wish to install).

License Service Setup:

Sample License File:

# License Pack for Request ID 4835301     04-Mar-2024
# This License pack was requested by: PTC Host ID 74-56-3C-86-05-7C
# Customer: FAMEX TOOLS KFT.
# Site: BAJCSY-ZSILINSZKY ÚT 3, GYŐR, HU
# Contact: Mark Vitarius (mark.vitarius@famextools.hu)
# Customer Number: 620141
# Install Site No: 3536841
...

Modify the following values if hostname/path changes:

SERVER HOSTNAME PTC_HOSTID=74-56-3C-86-05-7C 7788
DAEMON ptc_d /opt/flexnet/creo/ptc_d PORT=56789

Set Executable Permissions:

chmod +x /opt/flexnet/creo/lmgrd /opt/flexnet/creo/lmutil /opt/flexnet/creo/ptc_d

Missing Dependencies Installation

  • Install libnsl:

sudo apt-get update
sudo apt-get install libnsl
sudo ln -s /lib64/ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3

Firewall Port Opening

sudo firewall-cmd --zone=public --add-port=56789/tcp --permanent
sudo firewall-cmd --reload
sudo firewall-cmd --zone=public --add-port=7788/tcp --permanent
sudo firewall-cmd --reload

Creating a Service

Create Flexnet User and Group:

groupadd flexlm -g 124
useradd flexlm -d /opt/flexlm -c "FlexLM User" -u 124 -g 124 -s /sbin/nologin

Set Ownership:

chown flexlm:flexlm -R /opt/flexnet

Create Service File:

sudo nano /etc/systemd/system/flexnet.service

Service File Content:

[Unit]
Description=Licence Manager for Creo
After=network.target

[Service]
Type=simple
User=flexlm
WorkingDirectory=/opt/flexnet/creo
ExecStartPre=/bin/sleep 30
ExecStart=/opt/flexnet/creo/lmgrd -z -c /opt/flexnet/creo/lic.lic
Restart=always
RestartSec=30

[Install]
WantedBy=multi-user.target

Setting Permissions

sudo chown flexlm:flexlm /opt/flexnet/creo/lmgrd /opt/flexnet/creo/ptc_d /opt/flexnet/creo/lic.lic /var/log/loglmgrd.log
sudo chmod u+x /opt/flexnet/creo/lmgrd
sudo chmod u+r /opt/flexnet/creo/lic.lic
sudo chmod u+rw /var/log/loglmgrd.log

Troubleshooting

Audit Logs:

sudo ausearch -m avc -ts recent | audit2why

Set Network Permissions:

setsebool -P nis_enabled 1

Handle File Write Denials:

grep ptc_d /var/log/audit/audit.log | audit2allow -M ptc_d_selinux
semodule -i ptc_d_selinux.pp

Reload Systemd and Start Service:

sudo systemctl daemon-reload
sudo systemctl enable flexnet.service
sudo systemctl start flexnet.service

Notes

  • The hostname in this setup is server01.

  • Ensure server01 is recognizable on all machines.

  •