Installing Flexlm License Server on Linux
June 11, 2015
Below are two short videos: the first discusses the overall behavior of Flexlm and the second takes you step by step through the installation process.
Step 1 - Downloading the Flexlm License Manager
Start by Downloading the flexlm license manager release. This is on Artwork's FTP site (login/password required):
Note: If you are not an Artwork customer please don't ask us for this download; Customers should email us to get the ftp login and current password.
Step 2 - Getting the License Server's Hostid
Unpack the download and copy into a directory where you want the license manager to reside.
The files in the package are:
artwork - the Artwork daemon
liseater - an Artwork utility for checking that a license is available
lmgrd - the flexlm license manager
lmutil - a utility for querying, managing and configuring the license manager
One cannot simply use the Linux operating system's hostid command to obtain the hostid as needed by Flexlm. You must use the utility called lmhostid that is provided as part of the flexlm utilities. Here is an example.
On my machine (ubuntu 2.6 kernel) I type:
$ hostid [enter] a8c09100using the lmhostid utility I type:
$ ./lmutil lmhostid [enter] lmutil - Copyright (c) 1989-2006 Macrovision Europe Ltd. The FLEXlm host ID of this machine is "1c6f6593b8d6"
Clearly these are two different values and if you request a license using the hostid a8c09100 your license server won't start/run using the license codes we send you.
Step 3 - Send an Email to Artwork Requesting your License Codes
This is a "sample" Please don't copy and paste this verbatim and email to us.
Artwork will then return by email the codes you need to run the license manager. These codes are put into a text file in the same directory as lmgrd and artwork.
In this example I am going to create a directory on my machine called: /home/cad/flex and ftp directly from this directory to Artwork's ftp server and download the zipped version of the release. (Of course, if you have a web browser you can use that to connect to our ftp server, download the file and move it to the directory of your choice ...)
stevedb:/home/cad/flex$ ftp ftp.artwork.com Connected to 207-111-203-98 220 FTP server ready. Name: acsGuest 331 Password required for acsGuest. Password: ********* 230 User acsGuest logged in. Using binary mode to transfer files. ftp> cd pub/get_from_here/flexlm/linux 250 CWD command successful. ftp> passive Passive mode on. ftp> get flexlm_artwork_v188.8.131.52.linux64.tar.gz 150 Opening BINARY mode data connection for 'flexlm_artwork_v184.108.40.206.linux64.tar.gz' (2036188 bytes). 226 Transfer complete. ftp> bye 221 Goodbye.
Now I've got the file I need in my /home/cad/flex directory where I plan to install the files.
stevedb:/home/cad/flex$ ls flexlm_artwork_v220.127.116.11.linux64.tar.gz
Step 5 Installation
First, let's unpack the zip file:
stevedb:/home/cad/flex$ gunzip artwork_v18.104.22.168.linux64.tar.gz stevedb:/home/cad/flex$ tar xf artwork_v22.214.171.124.linux64.tar Archive: flexlm.linux64.v113.zip inflating: artwork inflating: liseater inflating: lmgrd inflating: lmutil
Now using the method of your choice (i.e. vi or gedit) let's create and edit our license file and customize it as needed. Two things have to be decided that affect the contents of the license file.
What port will this license manager listen on?
Where is the artwork daemon?
The choice of port is up to you (and your system administrator) I am going to select port 27005. And I know where the artwork daemon is located because I just copied it into /home/cad/flex directory. So let me create a file called license.dat and edit the codes I received from Artwork there.
stevedb:/home/cad/flex$ cat license.dat SERVER asmsc45 1c6f6593b8d6 27005 VENDOR artwork /home/cad/flex/artwork # QCKVU3 GDSII (FULL) FEATURE ACS58IO artwork 1.0 20-oct-2020 1 SIGN="003F 66A8 66AA B956 \ 1849 9979 63A2 E500 5BF0 0C77 5A5B D17A DB80 E740 6913" # QCKVU3 OASIS (FULL) FEATURE ACS583O artwork 1.0 20-oct-2020 1 SIGN="002C B06B C0CD F1AB \ 0D8E 3785 8998 F900 4146 5059 088D 7D24 E127 9F7A 543E"
I added the port 27005 to the SERVER line
I added the path /home/cad/flex/artwork to the VENDOR line
Starting The License Manager
Now all we have to do is to start the license manager. This requires a couple of additional command line arguments:
the name of the license file
the name of the log file
Now let's start the license manager:
stevedb:/home/cad/flex$ /home/cad/flex/lmgrd -c /home/cad/flex/license.dat -log /home/cad/flex/lmgrd1.log
[there are no carriage returns, of course.]
You can check successful launching of the license manager by using the lmstat utility.
stevedb:/home/cad/flex$ ./lmutil -lmstat -c license.dat -f lmstat - Copyright (c) 1989-2015 Macrovision Europe Ltd. Flexible License Manager status on Thu 6/11/2015 16:15 License server status: 27005@asmsc45 License file(s) on asmsc45: /home/cad/flex/license.dat: asmsc45: license server UP (MASTER) v11.4 Vendor daemon status (on asmsc45): artwork: UP v11.4 Feature usage info: Users of ACS58IO: (Total of 1 license issued; Total of 0 licenses in use) Users of ACS583O: (Total of 1 license issued; Total of 0 licenses in use)
On the Client Side
The lmgrd license server will continue to run and listen on port 27005 for any license requests. Any client (i.e. the Qckvu3 software) can obtain a license as long as one is available for checkout. On each client machine you need an environment variable set which points to the license manager and port. In this example the environment variable is:
Restarting the License Manager on Reboot
Servers are rarely rebooted but if the license server is rebooted you want to be sure that the license server is restarted so that your clients can continue to check out licenses.
This can be best accomplished by adding a line to the OS's start up section. This may vary for different Linux flavors but typically the file to be edited is:/etc/init.d/rc.local
While you can put in a fancy script for testing the existence of lmgrd and license.dat and then checking for an existing process already running, it is sufficient to just include simple command:
/home/cad/flex/lmgrd -c /home/cad/flex/license.dat -log /home/cad/flex/lmgrd1.log
[there are no carriage returns, of course.]
Known Problems and Their Solution
We've run into these problems enough to note them here.
License server log reports can't open (or write to) /usr/tmp
It appears that lmgrd expects to be able to write a process file to /usr/tmp. We've seen some Linux installs that don't have a /usr/tmp directory.
Manually create a /usr/tmp directory (you probably need to be root to do this) and then change the permissions on it so that anyone can read/write/execute the directory. Or you can use a symbolic link from /usr/tmp to the location of your temporary directory.
License Server Won't Start at All
The license server log shows that the lmgrd did not start.
The hostid supplied by the user does not match the "true" hostid of the machine. This seems to happen because some users rely on the hostinfo command instead of using the provided utility lmhostid.
Run the utility lmhostid and make sure that the value which is returned matches that used to generate the license codes.
License Server reports another instance is already running and Won't Start
The user already started the license server previously and did not stop it or stopped it in a way that left the lock file present.
First, check to see if a license server is running using the command: ps -ef | grep lmgrd. If you see an lmgrd and an artwork process running, stop them using the lmdown utility.
If you don't see any lmgrd or artwork process running, then check for the presence of /usr/tmp/.flexid directory to see if there is a process file left (that should have been deleted when the lmgrd was stopped) and delete it. Also check for the existence of /var/tmp/artwork (this is a lock file) and delete it.
ARTWORK CONVERSION SOFTWARE, INC. Company Profile
417 Ingalls St., Santa Cruz, CA 95060 Tel (831) 426-6163 Fax 426-2824 email: firstname.lastname@example.org