|
|
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+.
|
sudo useradd --system --create-home --home-dir /opt/flex --shell /bin/bash --user-group flexnet
hostname
hostname -f
sudo hostnamectl set-hostname <your hostname>
cat /etc/hosts
127.0.0.1 <full hostname> <short hostname> localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 <full hostname> <short hostname> localhost localhost.localdomain localhost6 localhost6.localdomain4
If cloud-init or other tools regenerate your /etc/hosts file at the startup, ensure that these tools retain the entries for the short and the full hostname. If your hosts file is static and does not contain the short and the full hostname, you can update it using a text editor. |
ip a
sudo mkdir -p /usr/tmp/.flexlm
sudo chmod 1777 /usr/tmp/.flexlm
sudo firewall-cmd --get-active-zones
sudo firewall-cmd --zone=<your zone> --add-port=27000/tcp --permanent
sudo firewall-cmd --zone=<your zone> --add-port=28001/tcp --permanent
sudo firewall-cmd --reload
If you use a firewall service daemon different than firewalld, you must adapt the preceding firewall commands accordingly. |
sudo ln -s /lib64/ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3
sudo su - flexnet
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>"
mkdir -p "$BASEDIR"
cd "$BASEDIR"
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 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. |
FLEXNET_DOWNLOAD_URL1="<PTC_D installer link from the preceding step>"
FLEXNET_DOWNLOAD_URL2="<PTC_E installer link from the preceding step>"
wget --user=<your PTC eSupport portal username> --ask-password "$FLEXNET_DOWNLOAD_URL1"
wget --user=<your PTC eSupport portal username> --ask-password "$FLEXNET_DOWNLOAD_URL2"
unzip $(basename "$FLEXNET_DOWNLOAD_URL1")
unzip $(basename "$FLEXNET_DOWNLOAD_URL2")
cp PTCEswlm/ptc_e/ptc_e .
rm -r PTC*
rm ptc_d
touch "$LOGFILE" "$CFGFILE"
touch "$LICFILE"
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
cat > "$CFGFILE" <<EOF
LOGFILE="$LOGFILE"
LICFILE="$LICFILE"
EOF
./lmgrd -V
./lmgrd -c ${LICFILE} -l ${LOGFILE}cat ${LOGFILE}./lmutil lmdown -c ${LICFILE} -q
exitsudo su
BASEDIR="/opt/flex/flexnet/"
CFGFILE="/opt/flex/flexnet/flexnet.cfg"
LOGFILE="/opt/flex/flexnet/flexnet.log"
LICFILE="/opt/flex/flexnet/flexnet.lic"
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
systemctl daemon-reload
systemctl start flexnet
systemctl status flexnet
systemctl enable flexnet
[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