A FlexNet license server is required for Teamwork Cloud to operate. It can be installed on the same system, or on a separate machine. The automated deployment script (install_flex_centos7.sh) downloads all required components, deploys the server, creates the systemctl service entry to control it, and creates the necessary firewall rules to allow the required traffic. The firewall rules are created for both the internal and public zones, and the script may require modification depending on which zone the interface is located in. Additionally, if the firewall is not running when the installation script is executed, the rules will not be created. The script creates a user, lmadmin, which runs the lmadmin service. The FlexNet server requires the Redhat LSB core files as well as the ld-linux library in order to execute. The script is configured for Centos 7, but can be modified for a different version. In order to identify which LSB Core library is required, the following command can be issued:
sudo yum provides /lib/ld-lsb.so.3
The application should be installed in /opt/local/FNPLicenseServerManager (the installer's default location is /opt/FNPLicenseServerManager - so make sure that you change the location when prompted). All other default values presented by the installer should be accepted.
After the lmadmin server has been installed it can be started by issuing the command:
sudo systemctl start lmadmin
To check if the service is running, issue the following command:
sudo systemctl status lmadmin
If the service failed to start, it is often because the built-in web server cannot resolve the hostname. To check if this is the case, issue the following commands:
cd /opt/local/FNPLicenseServerManager/logs tail web.log
You will see output similar to the following:
[Tue May 02 18:43:27 2017] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "yourhostname" Configuration Failed
Where yourhostname is the name of the host. If this is the case, you will need to edit the /etc/hosts file and add an entry so the webserver can resolve the host. The line will be similar to the following:
192.168.130.10 yourhostname
#!/bin/bash echo "===============" echo "Installing wget" echo "===============" yum install -y wget echo "==================" echo "Installing lmadmin" echo "==================" echo "Creating temporary directory for install anywhere" IATEMPDIR=$(pwd)/_tmp export IAEMPDIR mkdir $IATEMPDIR getent group lmadmin >/dev/null || groupadd -r lmadmin getent passwd lmadmin >/dev/null || useradd -d /home/lmadmin -g lmadmin -m -r lmadmin yum install -y ld-linux.so.2 LSB=$(yum provides /lib/ld-lsb.so.3 | grep lsb-core | tail -1 | cut -f 1 -d ' ') yum install -y $LSB echo "lmadmin ALL=(ALL) NOPASSWD:ALL " >> /etc/sudoers # If Web GUI to Flex licensing is not a must - lmgrd can be used, can be placed in rc.local to startup on boot # usage - ./lmgrd -c PATH_TO_KEY_FILE -l PATH_TO_LOG_FILE # RW rights needed to both files echo "===========================================================" echo "Getting Linux 32-bit IPv6 version 11.17 " echo "===========================================================" wget https://d1g91r27pzl568.cloudfront.net/Cameo_daemon/FlexNet_11_17/linux32/cameo.zip unzip cameo.zip chmod +x cameo echo "========================================" echo "Getting Linux 32-bit lmgrd version 11.17" echo "========================================" wget https://d1oqhepk9od1tu.cloudfront.net/Flex_License_Server_Utilities/v11.17.0/linux32/lmgrd.zip unzip lmgrd.zip chmod +x lmgrd echo "======================================" echo "Making flex log file named FlexLog.log" echo "======================================" touch FlexLog.log chmod 664 FlexLog.log echo "==========================================" echo "Getting Linux 32-bit lmadmin version 11.17" echo "==========================================" wget https://d1oqhepk9od1tu.cloudfront.net/Flex_License_Server_Utilities/v11.17.0/linux32/lmadmin-i86_lsb-11_17_0_0.bin chmod +x lmadmin-i86_lsb-11_17_0_0.bin echo "=========================================" echo "Executing lmadmin version 11.16 installer" echo "IMPORTANT: Install into directory /opt/local/FNPLicenseServerManager" echo "" echo " Note: Accept all defaults for script to work properly!!!" echo "" read -p -"Press any key to continue ...: " -n1 -s echo "==========================================" ./lmadmin-i86_lsb-11_17_0_0.bin -i console -DUSER_INSTALL_DIR=/opt/local/FNPLicenseServerManager mkdir -p /opt/local/FNPLicenseServerManager/licenses/cameo/ cp cameo /opt/local/FNPLicenseServerManager/cameo mv cameo /opt/local/FNPLicenseServerManager/licenses/cameo/cameo mv lmgrd /opt/local/FNPLicenseServerManager/lmgrd mv FlexLog.log /opt/local/FNPLicenseServerManager/FlexLog.log chown -R lmadmin:lmadmin /opt/local/FNPLicenseServerManager/ chmod +x /opt/local/FNPLicenseServerManager/lib* cp /opt/local/FNPLicenseServerManager/lib* /usr/lib/ echo "======================" echo "Opening firewall ports" echo "======================" FWZONE=$(firewall-cmd --get-default-zone) cat <<EOF > /etc/firewalld/services/lmadmin.xml <?xml version="1.0" encoding="utf-8"?> <service version="1.0"> <short>lmadmin</short> <description>lmadmin</description> <port port="8090" protocol="tcp"/> <port port="1101" protocol="tcp"/> </service> EOF sleep 30 firewall-cmd --zone=public --remove-port=8090/tcp --permanent &> /dev/null firewall-cmd --zone=public --remove-port=1101/tcp --permanent &> /dev/null firewall-cmd --zone=public --remove-port=27000-27009/tcp --permanent &> /dev/null firewall-cmd --zone=internal --remove-port=8090/tcp --permanent &> /dev/null firewall-cmd --zone=internal --remove-port=1101/tcp --permanent &> /dev/null firewall-cmd --zone=internal --remove-port=27000-27009/tcp --permanent &> /dev/null firewall-cmd --zone=$FWZONE --add-service=lmadmin --permanent firewall-cmd --reload IP_ADDRESS=$(ip route get 1 | awk '{print $NF;exit}') HOSTNAME=$(hostname) echo "$IP_ADDRESS $HOSTNAME" >> /etc/hosts echo "==========================================" echo "Creating systemd service - lmadmin" echo "==========================================" echo "[Unit]" > /etc/systemd/system/lmadmin.service echo "Description=Flexnet License Daemon" >> /etc/systemd/system/lmadmin.service echo "After=network.target network.service" >> /etc/systemd/system/lmadmin.service echo "" >> /etc/systemd/system/lmadmin.service echo "[Service]" >> /etc/systemd/system/lmadmin.service echo "User=lmadmin" >> /etc/systemd/system/lmadmin.service echo "WorkingDirectory=/opt/local/FNPLicenseServerManager/" >> /etc/systemd/system/lmadmin.service echo "ExecStart=/opt/local/FNPLicenseServerManager/lmadmin -allowStopServer yes" >> /etc/systemd/system/lmadmin.service echo "Restart=always" >> /etc/systemd/system/lmadmin.service echo "RestartSec=30" >> /etc/systemd/system/lmadmin.service echo "Type=forking" >> /etc/systemd/system/lmadmin.service echo "" >> /etc/systemd/system/lmadmin.service echo "[Install]" >> /etc/systemd/system/lmadmin.service echo "WantedBy=multi-user.target" >> /etc/systemd/system/lmadmin.service echo "" >> /etc/systemd/system/lmadmin.service chown root:root /etc/systemd/system/lmadmin.service chmod 755 /etc/systemd/system/lmadmin.service systemctl daemon-reload systemctl enable lmadmin.service echo "Removing installanywhere temporary directory" rm -fr $IATEMPDIR echo "==========================================" echo "lmadmin service installation complete" echo " usage: systemctl start|stop lmadmin" echo "=========================================="