Koozali.org: home of the SME Server

Using Flexlm

Offline marsa_matruh

  • *****
  • 250
  • +0/-0
Using Flexlm
« on: March 30, 2010, 09:40:29 PM »
For a software (Origin) with floating licenses, I need to install a FlexLM server. I am considering using SME-server 7.x but I do not really have an idea on how to do that. I found a rpm on the net: nagios-plugins-flexlm-1.4.6-3.el4.i386.rpm. For dependencies, I also installed nagios-plugins-1.4.6-3.el4.i386.rpm and nagios-plugins-perl-1.4.6-3.el4.i386.rpm. Is this the right way? And then? Need to start some daemon? In accordance to SME policies (templates...)? Any help welcome  :-D

I saw that Kevin already set up such a server: http://forums.contribs.org/index.php/topic,41908.msg196330.html#msg196330


Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Using Flexlm
« Reply #1 on: March 30, 2010, 09:59:35 PM »
For a software (Origin) with floating licenses, I need to install a FlexLM server.

You need to buy the flexlm server software from the company which makes/sells it, and then follow their instructions for getting it working.

Offline markleman

  • ***
  • 66
  • +0/-0
    • http://www.leman.net
Re: Using Flexlm
« Reply #2 on: April 01, 2010, 11:43:39 PM »
This is a general comment rather than exact instructions but I hope it helps you:

If a piece of software is protected by FlexLM the vendor will normally supply the FlexLM server software when you buy their package(*). My experience has been in installing the windows version but I expect the concepts are the same under Linux. ( Looking at Altera's instructions http://www.altera.com/support/licensing/setup/lic-setup-float-unix.html confirms this). FlexLM requires very few files, typically 4 or 5: A Windows Service/Linux daemon lmgrd,  a 'vendor specific' daemon, a licence file and a configuration utility lmutil. Installation should be fairly straightforward, hopefully following the instructions origin give you and consists of copying the files to a directory on your server, modifying the licence file to match your server, then starting the lmgrd daemon.

The tricky bit for SME is any config required to allow the PCs on you network to reach the daemon running on the SME server and configuring the lmgrd daemon to automatically start on boot, so may I suggest you:

1) Read the pages here (assuming this is the software you need to licence) http://wiki.originlab.com/~originla/wiki/index.php?title=Basic_Setup_Instructions. The Altera pages linked above also worth a peek.
2) Buy the software and get your licence file which will be tied to the MAC address of your server.
3) Come back with questions reqarding the specific quirks of an SME install.
4) When you suceed write it up here or as a howto to aid others in the future.

Regards, Mark Leman

*My experience has been with Altera FPGA development software and Mentor Graphics. Altera even make the downloads available on their web site.

Offline marsa_matruh

  • *****
  • 250
  • +0/-0
Re: Using Flexlm
« Reply #3 on: April 02, 2010, 09:36:53 AM »
Thanks both for yours answers.

Offline marsa_matruh

  • *****
  • 250
  • +0/-0
Re: Using Flexlm
« Reply #4 on: May 18, 2010, 06:21:33 PM »
So, I bough the software. It comes with a version of flexlm for RedHat 4.6 provided as a tgz file. I logged as root through SSH to the server. I expanded it in /usr/local/flexlm. I obtained a license file from the software vendor. I put it in /usr/local/flexlm/licenses. I started the daemon with lmgrd. I had a warning :
Code: [Select]
14:45:55 (lmgrd) The license server manager (lmgrd) running as root:
14:45:55 (lmgrd)        This is a potential security problem
14:45:55 (lmgrd)        and is not recommended.
It also provided a tcp-ip port (around 30000). So I installed the software on a windows workstation. I gave the name of the server and the port to the software and he was happy with it (no need to open port on the server?). Messages were displayed on the ssh/root standard console. Then I stopped the daemon with lmdown. And I started it again but the port changed. So I added the port number at the end of the first line of license file to fix it, something like this:
Code: [Select]
SERVER myserver mymacaddressxxx myport
After restarting the daemon, the port did not changed.

No, the questions are:
- How do I start automatically the daemon at server starting?
- How to start it without root user?
- How to redirect standard output to a log file?

Any tips (wiki? using template?) on how to do that are welcome?

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Using Flexlm
« Reply #5 on: May 18, 2010, 06:47:58 PM »
Doesn't the package come with installation instructions and perhaps a start-up script?

If not this might be a bit technical, but it is the method things are done on SME Server:

http://wiki.contribs.org/SME_Server:Documentation:Developers_Manual#Process_startup.2C_supervision_and_shutdown
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Using Flexlm
« Reply #6 on: May 18, 2010, 06:58:55 PM »
Not sure if it might be off help but here is a startup script for a flexlm service. I am not sure if it will work out of the box:

http://www.artwork.com/support/flexlm/index2.htm
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline marsa_matruh

  • *****
  • 250
  • +0/-0
Re: Using Flexlm
« Reply #7 on: May 19, 2010, 11:29:49 AM »
Doesn't the package come with installation instructions and perhaps a start-up script?
...

Thank you for pointing me to the right direction (RTFM  :-?)

Page 122 of the FlexLM user guide talk about Automatic Start on Unix Platforms.

Quote
On UNIX, edit the appropriate boot script, which may be /etc/rc.boot, /etc/
rc.local, /etc/rc2.d/Sxxx, /sbin/rc2.d/Sxxxx. Include commands similar to the
following. See the following notes for a full explanation.
Code: [Select]
/bin/su daniel -c 'echo starting lmgrd > \
/home/flexlm/v5.12/hp700_u9/boot.log'
/bin/nohup /bin/su daniel -c 'umask 022; \
/home/flexlm/v5.12/hp700_u9/lmgrd -c \
/home/flexlm/v5.12/hp700_u9/license.dat >> \
/home/flexlm/v5.12/hp700_u9/boot.log'
/bin/su daniel -c 'echo sleep 5 >> \
/home/flexlm/v5.12/hp700_u9/boot.log'
/bin/sleep 5
/bin/su daniel -c 'echo lmdiag >>\
/home/flexlm/v5.12/hp700_u9/boot.log'
/bin/su daniel -c '/home/flexlm/v5.12/hp700_u9/lmdiag -n -c\
/home/flexlm/v5.12/hp700_u9/license.dat >> \
/home/flexlm/v5.12/hp700_u9/boot.log'
/bin/su daniel -c 'echo exiting >>\
/home/flexlm/v5.12/hp700_u9/boot.log'
Please note the following about how this script was written:
- All paths are specified in full because no paths are assumed at boot time.
- Because no paths are assumed, the vendor daemon must be in the same directory
as lmgrd, or the VENDOR lines in the license file must be edited to include the full
path to the vendor daemon.
- The su command is used to run lmgrd as a non-root user, daniel. It is
recommended that lmgrd not be run as root since it is a security risk to run any
program as root that does not require root permissions. lmgrd does not require
root permissions.
- daniel has a csh login, so all commands executed as daniel must be in csh
syntax. All commands not executed as daniel must be in /bin/sh syntax since
that is what is used by the boot scripts.
- The use of nohup and sleep are required on some operating systems, notably HPUX
and Digital UNIX. These are not needed on Solaris and some other operating
systems, but are safe to use on all.
- lmdiag is used as a diagnostic tool to verify that the server is running and serving
licenses.

So new questions.

How to create an account (like daniel) for this daemon? Should I create a System accounts? With a specific group? A flexlm:flexlm like www:www?

Where to put the script in accordance to sme-server policy?

Where to put the log file so that we can watch it with the server manager?

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Using Flexlm
« Reply #8 on: May 19, 2010, 11:40:04 AM »
Thank you for pointing me to the right direction (RTFM  :-?)
That was the easy part ;-)

How to create an account (like daniel) for this daemon? Should I create a System accounts? With a specific group? A flexlm:flexlm like www:www?
You could just create a user through server-manager I guess.

Where to put the script in accordance to sme-server policy?
I will have to study that again as well as it has been a while I looked at it, but it should be in the reference I provided earlier.

Where to put the log file so that we can watch it with the server manager?
That should be in /var/log/, in this case I guess /var/log/flexlm/ would be a good one, although I am not sure if it will be visible automatically in the web interface, but that is for later. I think the first challenge is to get the service up and running.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Using Flexlm
« Reply #9 on: May 19, 2010, 11:40:07 AM »
try this one and adapt to your needs

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Using Flexlm
« Reply #10 on: May 19, 2010, 11:43:42 AM »
try this one and adapt to your needs
Although that is the one for solaris. I already pointed OP to another site on that domain that also lists a linux startup script:
Not sure if it might be off help but here is a startup script for a flexlm service. I am not sure if it will work out of the box:

http://www.artwork.com/support/flexlm/index2.htm

:-D
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Using Flexlm
« Reply #11 on: May 19, 2010, 11:51:55 AM »
The startup files should be in /etc/rc7.d IIRC.

But perhaps it can be done more easy and in the SME Server fashion as there is a startup script that uses the internal configuration database. Not sure if the method is documented... I might have time to look it up later today, as I am busy doing other things now.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Using Flexlm
« Reply #12 on: May 19, 2010, 12:14:12 PM »
Although that is the one for solaris. I already pointed OP to another site on that domain that also lists a linux startup script:
:-D

well.. I think that flexlm support is .... (fill the blanks)

the link I gave is: www.artwork.com/support/flexlm/linux_startup.htm but, as stated on the top of the page, it's for.. solaris.. rotfl

my bad :-)

Offline marsa_matruh

  • *****
  • 250
  • +0/-0
Re: Using Flexlm
« Reply #13 on: May 19, 2010, 02:58:29 PM »
So, I created a file /etc/rc.d/rc7.d/S95flexlm.

Inside, I put a single line :

Code: [Select]
/usr/local/flexlm/lmgrd -l +/var/log/flexlm
So, daemon starts with server startup. No supervision right now. I hope the process is enough stable. If not, I will look at a supervisor later.

Log are sent to /var/log/flexlm. (+ is for append mode). I can see the log file using the server manager.

The last point is the specific account not to run as root. I don't want to create a classical user with all associated services. I want something more specific.