Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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_centos7centos_rhel.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:  

...

Code Block
192.168.130.10  yourhostname
Code Block
languagetext
titleinstall_flex_centos7.sh
#!/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 "=========================================="