5. The FLEXlm License Manager
FLEXlm wurde von der Firma Globetrotter entwickelt. Nach mehreren Übernahmen ist aktuell (2008) die Software bei Acresso angekommen. Dort wird die Software unter dem Namen FLEXnet Publisher vermarktet.5.1 Setup
Default installation path:/usr/magicadm/licenseThere are three files:
- lmgrd - the license manager runtime
- MAGIC - the daemon which handles the magic license request
- license.dat - contains the license information
chmod 4700 mgrqmbr
chown magicadm mgrqmbr
chmod 4700 MAGIC
chown magicadm MAGIC
- The license file normally is located in "usr/magicadm/etc". For better handling move it to the license manager directory.
5.2 Manual start
Login as "magicadm" and change to the license manager default directory.Starting the license manager:
cd /usr/magicadm/licenseCheck whether the license manager is started:
./lmgrd -c /usr/magicadm/license/license.dat -l /usr/magicadm/license/license.log.$$
-c voller Pfad und Dateiname der Lizenz Datei. -l voller Pfad und Dateiname einer Log Datei. Die "$$" Erweiterung am Ende wird durch die Prozess-Id des Lizenz Manager ersetzt.
ps -A -l| grep lmgrdAs user we see UID=501, that is e.g. "magicadm" and as process the PID=97397.F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD
040 S 501 97397 1 0 60 0 - 362 do_sel tty4 00:00:00 lmgrd
To stop enter:
kill 97397
5.3 FLEXlm and SuSE
The system scripts are located in/sbin/init.d/And they have their own start algorithm. The change of a run level is controlled by a script called:
/etc/rc.configYou have to insert a new section at the end of the file:
---------- cut ---------This setting can be changed by "yast"
#
# Start the magic license manager (yes,no).
#
START_MGFLEXLM="yes"
#
---------- cut ---------
Administrating the System -> Changing Configuration FileNow copy the script "mglms" from the archives to "/sbin/init.d/" and change the properties:
chmod 4700 mglmsThe run level in which the license manager should be started is controlled by an symbolic link in a directory:
chown magicadm mglms
-
Starte und stoppe den Lizenz Manager in dem Run-Level 2
ln -s /sbin/init.d/mglms /sbin/init.d/rc2.d/K92mglms
ln -s /sbin/init.d/mglms /sbin/init.d/rc2.d/S91mglms -
Starte und stoppe den Lizenz Manager in dem Run-Level 3
ln -s /sbin/init.d/mglms /sbin/init.d/rc3.d/K92mglms
ln -s /sbin/init.d/mglms /sbin/init.d/rc3.d/S91mglms
If you modified the location or the user of the broker, you have to modify the script:
---------- cut --------------You are now able to controll the license manager:
LM_PATH=/usr/magicadm/license
LM_USER=magicadm
---------- cut --------------
/sbin/init.d/mglms start
/sbin/init.d/mglms stop
/sbin/init.d/mglms status
/sbin/init.d/mglms restart
5.4 FLEXlm and Red Hat
The system scripts are located in/etc/rc.d/init.d/Now copy the script "mglmr" from archives to this location and change the properties:
chmod 4700 mglmrIt is controlled by "chkconfig". The "mglmr" script has a section with three lines like this (the slash at the end of the second line concatenates the third line and must be there):
chown magicadm mglmr
---------- cut --------------(First start the license manager (S91mglmr) than the broker (S92mgbrr). And first stop the broker (K91mgbrr) and than the license manager (K92mglmr). If you want to know more "man chkconfig".)
# chkconfig: 23 91 92
# description: start the daemon at run level 2 & 3 as S91mglmr \
# and stop it at the other level as K92mglmr
---------- cut --------------
To add the service:
chkconfig --add mglmrTo remove the service:
chkconfig --list mglmrresult: "mglmr 1:off 2:on 3:on 4:off 5:off 6:off"
chkconfig --del mglmrThe script "/etc/rc.d/rc" controlls the change of a run level. All symbolic links starting with a "K" ("K92mglmr") are taken to check "/var/lock/subsys" for a lock file named "mglmr". The script "mglmr" has to create an empty file in this directory during start up and delete it on stop. "magicadm" doesn't have properties to write into this directory.
chkconfig --list mglmrresult: "mglmr 1:off 2:off 3:off 4:off 5:off 6:off"
To solve this problem "root" has to change the properties of "/var/lock/subsys/" to "search/execute others" :
chmod o+x /var/lock/subsys/If you modified the location or the user of the license manager, you have to modify the script:
---------- cut --------------You are now able to controll the license manager:
LM_PATH=/usr/magicadm/license
LM_USER=magicadm
---------- cut --------------
/etc/rc.d/init.d/mglmr start
/etc/rc.d/init.d/mglmr stop
/etc/rc.d/init.d/mglmr status
/etc/rc.d/init.d/mglmr restart
5.5 The license.dat
The is the default magic demo license. Magic installs and configures the license file. If you change the host name or move the license file/daemon, you have to modify the "license.dat" also. Particularly if you modified the host name which is easily forgotten.---------- cut --------------
# If you change your host name you have change also here.
# It drives you crasy if it is forgotten
SERVER YourHostname ANY TCP:3111
#
# If you move the daemon you to change the path.
DAEMON MAGIC /usr/magicadm/license/MAGIC
FEATURE MGDEMO MAGIC 8.200 01-jan-0 35 5B7E6041513455C10A7A \
VENDOR_STRING=PT=MGDEMO,C=3FFFFFF,P=N,MR=500,MP=40,MD=15,MC=4 \
DUP_GROUP=NONE ISSUER="Magic Demonstration" ck=186 SN=612345675
---------- cut --------------