Our professional version of Ansys 5.7 has been bound to a license manager running on a windows NT server. Once mighty server rests in peace already, but our professional Ansys is worth to use. At least time to time.
Our license is based on serial number of hard disc, from which is the flexlm started. OK, wine emulator allows to specify the label and serial of its (virtual) disks.
Wine installation on CentOS 6.4 x86_64
Remark: use just zypper in wine on (open)SUSE. However, Ansys on CentOS is said to be "oficially supported". It does not apply to this case, I guess.
Wine is not part of the official repository tree. As a first step configure EPEL repository (thanks to
this link ).
yum install wget
wget https://fedoraproject.org/static/0608B895.txt --no-check-certificate
mv 0608B895.txt /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
rpm -ivh http://mirror.slu.cz/epel/6/i386/epel-release-6-8.noarch.rpm
check success:
[root@localhost ~]# yum repolist
repo id repo name status
base CentOS-6 - Base 6,381
epel Extra Packages for Enterprise Linux 6 - x86_64 10,031
extras CentOS-6 - Extras 13
updates CentOS-6 - Updates 1,555
install Wine:
[root@localhost ~]# yum install wine
Yum finds and installs a huge number of 32bit dependencies.
License manager configuration
Run
winecfg and specify Windows NT compatibility. In the Drives panel press Advanced options and specify the serial number of the disk C: (or use
~/.wine/drive_c/.windows-serial file containing the serial number)
copy flexlm directory to C: (.wine/drive_c)
┌┌<─ ~/.wine/drive_c/flexlm ───────────────────────────.[^]>┐
││'n Name │ Size │Modify time │
││/.. │UP--DIR│Nov 29 01:19│
││/Intel │ 4096│Apr 26 2004│
││ ansyslmd │ 0│Nov 29 01:45│
││ ansyslmd.ini │ 33│Apr 26 2004│
││ license.dat │ 224│Nov 29 01:38│
││ license.log │ 1351│Nov 29 01:45│
││ lmgrd.8 │ 144│Nov 29 01:45│
││ startup.log │ 227│Nov 29 01:45│
││ │ │ │
startup.sh :
#!/bin/bash
cd ~/.wine/drive_c/flexlm
date >>startup.log
LOGF=license.log
mv -f $LOGF license.log-`date +"%F+%T"`
nohup wine Intel/lmgrd.exe -z >> $LOGF 2>>startup.log &
Check the status (it takes some time to start up the server)
[root@plchova3 flexlm]# wine Intel/lmutil.exe lmdiag -c license.dat
lmutil - Copyright (C) 1989-2001 Globetrotter Software, Inc.
FLEXlm diagnostics on Fri 11/29/2013 11:06
-----------------------------------------------------
License file: license.dat
-----------------------------------------------------
"ansys" v2001.0630, vendor: ansyslmd
License server: hostname
floating license no expiration date
This license can be checked out
-----------------------------------------------------
or:
[root@plchova3 flexlm]# wine Intel/lmutil.exe lmstat -a -c license.dat
For shutdown:
[root@plchova3 flexlm]# wine Intel/lmutil.exe lmdown -c license.dat
lmutil - Copyright (C) 1989-2001 Globetrotter Software, Inc.
[Detecting lmgrd processes...]
Port@Host Vendors
1) 1057@hostname ansyslmd
Are you sure (y/n)? y
1 FLEXlm License Server shut down
Troubleshooting
- check the drive serial number
[root@localhost flexlm]# wine cmd
CMD Version 1.4.1
C:\flexlm>dir
Volume in drive C has no label.
Volume Serial Number is 70fa-1234
Directory of C:\flexlm
11/29/2013 1:45 AM <dir> .
11/29/2013 1:19 AM <dir> ..
11/29/2013 1:45 AM 0 ansyslmd
4/26/2004 8:34 PM 33 ansyslmd.ini
4/26/2004 8:23 PM <dir> Intel
11/29/2013 1:38 AM 224 license.dat
11/29/2013 2:05 AM 1,452 license.plchova.log
11/29/2013 2:15 AM 144 lmgrd.8
11/29/2013 1:45 AM 227 startup.log
6 files 2,080 bytes
3 directories 7,727,013,888 bytes free
- check the if hostname in the
license.dat match the hostname, specify the same hostname in /etc/hosts
- check the firewall settings. The two ports specified in the license file have to be opened fog incoming traffic
SERVER hostname DISK_SERIAL_NUM=70fa1234 1057
VENDOR ansyslmd PORT=1058
INCREMENT ansys ansyslmd 2001.0630 permanent 1 3A8F12345678 \
VENDOR_STRING=customer:00000001 SUPERSEDE ISSUED=24-May-2001 \
START=03-Apr-2001
The two ports are 1057 and 1058 in our case:
iptables -A INPUT -m state -s $LAN --state NEW -m tcp -p tcp --dport 1057 -j ACCEPT
iptables -A INPUT -m state -s $LAN --state NEW -m tcp -p tcp --dport 1058 -j ACCEPT
or specify the corresponding rules in /etc/sysconfig/iptables (in CentOS).