Installing FlexNet Servers
This page provides a guide for the installation of FlexNet servers on Windows and Linux operating systems.
Windows
To install the FlexNet Server on Windows operating system, perform the following steps:
2. Create a <new_folder> and copy the downloaded files into that folder. For example: C:\Program Files\PTC
3. Extract the downloaded archive to <new_folder>
4. Move the file <new_folder>\PTCEswlm\ptc_e\ptc_e.exe to <new_folder>\PTCEswlm\bin
5. Extract the license package you received to <new_folder>
6. 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
7. Create a FlexLM server for PTC service:
a. Launch lmtools by running the <new_folder>\PTCEswlm\bin\lmtools.exe command as an administrator.
b. Go to the Config Services tab.
c. Create a new service FlexLM server for PTC.
d. Browse to the location of the lmgrd.exe file: < new_folder >\PTCEswlm\bin\.
e. Browse to the location of the .lic file. It should be in <new_folder>.
f. Select the Use Services and the Start Server at Power Up checkboxes.
g. Click Save Service.
h. Go to Windows Services configuration > Right-click FlexLM server for PTC service > Properties.
a. Click tab General > Startup Type drop-down menu > Automatic.
b. Click tab Log On > Local System Account.
c. Click Apply > OK.
8. Launch the FlexLM server for PTC service.
Linux
To install FlexNet on a Redhat-based Linux distribution, perform the following steps:
1. Set installation options.
BASEDIR="/etc/flexnet/"
CFGFILE="/etc/flexnet/flexnet.cfg"
LOGFILE="/etc/flexnet/flexnet.log"
LICFILE="/etc/flexnet/flexnet.lic"
DOMAIN="FLEXNET.CODEBEAMER.COM"
HOSTID="0123456789AB"
2. FlexNet Server Installation.
# install dependencies
yum -y install redhat-lsb || ln -s /lib64/ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3
## Note: If the above fails, you will probably be unable to run lmgrd (No such file or directory error)
# Download and install FlexNet Server
mkdir -p "$BASEDIR"
cd "$BASEDIR"
FLEXNET_DOWNLOAD_URL="[https://download.ptc.com/download2/products/FLEXnet/PTC_E_11.19.1.0_Linux.zip]"
wget $${FLEXNET_DOWNLOAD_URL}
unzip $${FLEXNET_DOWNLOAD_URL##*/}
rm -rf $${FLEXNET_DOWNLOAD_URL##*/}
mv PTCEswlm/* "$BASEDIR"
ln -s "$BASEDIR/ptc_e/ptc_e" "$BASEDIR/bin/ptc_e"
rm -rf PTCEswlm
# set hostname
hostname -b $DOMAIN
3. Configure FlexNet as a service.
# Create FlexNet user
useradd flexnet -c "FlexNet Service User" -s /sbin/nologin -d $BASEDIR
# set permission on files
## Note: You need to ensure you license file is in place
touch "$LOGFILE" "$CFGFILE"
chown flexnet: "$LOGFILE"
chown flexnet: "$LICFILE"
chown flexnet: "$CFGFILE"
chown -R flexnet "$BASEDIR/"
# create config
cat > "$CFGFILE" <<EOF
LOGFILE="$LOGFILE"
LICFILE="$LICFILE"
EOF
# create systemd file
cat > /etc/systemd/system/flexnet.service <<EOF
[Unit]
Description=FlexNet Licence Server
Requires=network.target
After=local_fs.target network.target
[Service]
EnvironmentFile=$CFGFILE
Type=simple
User=flexnet
Group=flexnet
Restart=always
WorkingDirectory=$BASEDIR
ExecStart=$BASEDIR/bin/lmgrd -c \${LICFILE} -l +\${LOGFILE} -z -2 -p -local
ExecStop=$BASEDIR/bin/lmgrd lmdown -c \${LICFILE}
SuccessExitStatus=15
[Install]
WantedBy=multi-user.target
EOF
# enable the service
systemctl daemon-reload
systemctl enable flexnet
systemctl start flexnet