安迪尔 發表於 2019-9-25 09:49:00

CentOS 7下安装IDL 8.2

<p>材料准备:</p>
<p>CentOS 7 x86_64</p>
<p>IDL 8.2,下载自 ftp://ftp.lowell.edu/incoming/temp/old/IDL_Clients/v8.2/idl82sp2linux.x86_64.tar.gz</p>
<p>参考资料:</p>
<p> centos6.9安装idl8.2,亲测成功!!!</p>
<p> ubuntu下IDL8安装及破解步骤(已自测通过)</p>
<p> centos 7 物理机添加虚拟网卡</p>
<p> LINUX IDL8.4安装 那些坑!</p>
<p>&nbsp;</p>
<p>安装步骤:</p>
<h3>1、下载IDL</h3>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 255, 1)">mkdir</span> ~/Downloads/<span style="color: rgba(0, 0, 0, 1)">IDL

cd </span>~/Downloads/<span style="color: rgba(0, 0, 0, 1)">IDL

</span><span style="color: rgba(0, 0, 255, 1)">wget</span> <span style="color: rgba(0, 0, 255, 1)">ftp</span>:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">ftp.lowell.edu/incoming/temp/old/IDL_Clients/v8.2/idl82sp2linux.x86_64.tar.gz<br><br></span></pre>
</div>
<p>&nbsp;</p>
<h3>2、找到相应的license破解文件</h3>
<h4>2.0 license文件</h4>
<p>在网上找到一个破解文件,内容如下,并将其保存为 license.dat 文件。</p>
<div class="cnblogs_code">
<pre>############ license file comments, do not delete ###############
# License Number(s):705016
SERVER <strong><span style="color: rgba(255, 0, 0, 1)">xxx</span> <span style="color: rgba(51, 102, 255, 1)">bc305bd94286</span></strong> 1700
USE_SERVER
DAEMON idl_lmgrd
INCREMENT idl idl_lmgrd 8.200 1-jan-0000 12 B5ED924F5F29E2AF
VENDOR_STRING=705016TOHOKU ck=186 SIGN="0B28 D32E 6E90 74D9
A0BB F2ED AC90 F39D 318D F197 26FB B996 C8C4 B225 76C8 009A
52FD AB87 3FE1 06B9 1AA9 FD57 A46E 94A8 3764 9F97 D1F8 2653
D36D 7018"
INCREMENT idl_bridge_assist idl_lmgrd 8.200 1-jan-0000 2
F2004C85D332BFF5 VENDOR_STRING=705016TOHOKU ck=105 SIGN="08BA
CD27 8E25 5309 ED01 983C 59C6 183A EE24 A464 706F F499 3607
416A 0CE1 16D8 425F CC40 3C90 8BAB 9E1E ECFB D9C5 C9E4 3517
1D7E 1B8F 296C 3DC3 1AEB"
INCREMENT idl_video_write idl_lmgrd 8.200 1-jan-0000 2
F0A17234C4CCC039 VENDOR_STRING=705016TOHOKU ck=92 SIGN="08A2
A99F F7DB 7C58 9AF8 B52F D70F 3B6E F686 DE0F FDB7 CE79 BD82
3494 500F 0A12 5C97 8375 0AE0 E848 0B20 69CA AFA2 DE8D AC10
8173 DBFC B93E 574A DBB4"
INCREMENT idl_wavelet idl_lmgrd 8.200 1-jan-0000 2 20B1118017C42245
VENDOR_STRING=705016TOHOKU ck=41 SIGN="0DBC 606C 1E2D 3FD8
19FD 61DE F909 3BCD E7E4 5314 30BA 60CC 015D 0BD0 100D 1E33
CC5A 96F0 64C0 9B08 D033 E075 1DBA DE77 AE90 08A8 8AB7 C4C3
0037 C672"
FEATURESET idl_lmgrd D093522208F1C61A
##################### end of license file #######################</pre>
</div>
<p>&nbsp;</p>
<p>破解文件的&nbsp;<span class="cnblogs_code">SERVER <strong><span style="color: rgba(255, 0, 0, 1)">xxx</span> <span style="color: rgba(51, 102, 255, 1)">bc305bd94286</span> </strong>1700</span> 一行,提供了许可文件适用的用户名和Mac地址。</p>
<p>其中,红色字段(<strong><span style="color: rgba(255, 0, 0, 1)">xxx</span></strong>)是主机名,需要将它替换为本机的主机名,它是bash命令hostname的返回值。</p>
<p>蓝色字段(<strong><span style="color: rgba(255, 0, 0, 1)"><span style="color: rgba(51, 102, 255, 1)">bc305bd94286</span></span></strong>)是MAC地址,需要在本机上生成一个与它一致的MAC地址,可以采用参考资料中的方法生成虚拟MAC地址,具体操作如下。</p>
<h4><strong style="font-family: tahoma, arial, &quot;‘宋体‘&quot;; font-size: 14px; line-height: 25.2px">2.1 获取xxx</strong></h4>
<h4><strong style="font-family: tahoma, arial, &quot;‘宋体‘&quot;; font-size: 14px; line-height: 25.2px">2.2 修改本机的MAC地址 (摘自资料)</strong></h4>
<p>新建一个虚拟网格eth1,要不然有的网络环境可能会导致您的计算机出现无法上网的情况,这需要安装tunctl工具。</p>
<p><strong style="font-family: tahoma, arial, &quot;‘宋体‘&quot;; font-size: 14px; line-height: 25.2px">2.2.1 确认内核是否支持tun/tap</strong></p>
<p><span style="font-family: tahoma, arial, &quot;‘宋体‘&quot;; font-size: 14px; line-height: 25.2px">确认内核是否有tun模块</span></p>
<p>[...] $ modinfo tun</p>
<p>filename:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /lib/modules/3.10.0-957.el7.x86_64/kernel/drivers/net/tun.ko.xz<br>alias:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; devname:net/tun<br>alias:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; char-major-10-200<br>license:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GPL<br>author:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (C) 1999-2004 Max Krasnyansky &lt;maxk@qualcomm.com&gt;<br>description:&nbsp;&nbsp;&nbsp; Universal TUN/TAP device driver<br>retpoline:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Y<br>rhelversion:&nbsp;&nbsp;&nbsp; 7.6<br>srcversion:&nbsp;&nbsp;&nbsp;&nbsp; A215175F959FA6FE8B76ECD<br>depends:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br>intree:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Y<br>vermagic:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.10.0-957.el7.x86_64 SMP mod_unload modversions <br>signer:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CentOS Linux kernel signing key<br>sig_key:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B7:0D:CF:0D:F2:D9:B7:F2:91:59:24:82:49:FD:6F:E8:7B:78:14:27<br>sig_hashalgo:&nbsp;&nbsp; sha256<br><br></p>
<p><span style="font-family: tahoma, arial, &quot;‘宋体‘&quot;; font-size: 14px; line-height: 25.2px">加载内核模块</span></p>
<p>[...] $&nbsp;modprobe tun</p>
<p>[...] $ lsmod | grep tun</p>
<p>tun &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;27141&nbsp; 2 </p>
<p><span style="font-family: tahoma, arial, &quot;‘宋体‘&quot;; font-size: 14px; line-height: 25.2px">执行以上命令后,出现如上输出,说明模块加载成功。</span></p>
<p>&nbsp;</p>
<p><span style="font-family: tahoma, arial, &quot;‘宋体‘&quot;; font-size: 14px; line-height: 25.2px"><strong style="font-family: tahoma, arial, &quot;‘宋体‘&quot;; font-size: 14px; line-height: 25.2px">2.2.2
创建和配置虚拟网卡</strong></span></p>
<p><span style="font-family: tahoma, arial, &quot;‘宋体‘&quot;; font-size: 14px; line-height: 25.2px"><span style="font-family: tahoma, arial, &quot;‘宋体‘&quot;; font-size: 14px; line-height: 25.2px">确认是否有tunctl命令,如果没有则安装它。</span></span></p>
<p><span style="font-family: tahoma, arial, &quot;‘宋体‘&quot;; font-size: 14px; line-height: 25.2px">可直接装rpm包(参考的https://pkgs.org/centos-7/nux-misc-x86_64/tunctl-1.5-12.el7.nux.x86_64.rpm.html<span style="font-family: tahoma, arial, &quot;‘宋体‘&quot;; font-size: 14px; line-height: 25.2px">)</span></span></p>
<p>下载rpm源码,解压,并复制到相应的IDL安装目录内:</p>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 255, 1)"><span style="color: rgba(0, 0, 0, 1)">$ </span>wget</span> http:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">li.nux.ro/download/nux/misc/el7/x86_64/tunctl-1.5-12.el7.nux.x86_64.rpm</span>
<span style="color: rgba(0, 0, 0, 1)">$ </span><span style="color: rgba(0, 0, 255, 1)">sudo</span> rpm -ivh ./tunctl-<span style="color: rgba(128, 0, 128, 1)">1.5</span>-<span style="color: rgba(128, 0, 128, 1)">12</span>.el7.nux.x86_64.rpm</pre>
</div>
<p>&nbsp;</p>
<p>注意,虚拟网卡的MAC地址,要与步骤2.0中的license文件中的蓝色字段(<strong><span style="color: rgba(51, 102, 255, 1)">bc305bd94286</span></strong>)保持一致,即:</p>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 0, 1)">$ </span>tunctl -t eth1 -<span style="color: rgba(0, 0, 0, 1)">u root

$ sudo </span><span style="color: rgba(0, 0, 255, 1)">ifconfig</span> eth1 hw ether <span style="text-decoration: underline">bc:<span style="color: rgba(128, 0, 128, 1); text-decoration: underline">30</span>:5b:d9:<span style="color: rgba(128, 0, 128, 1); text-decoration: underline">42</span>:<span style="color: rgba(128, 0, 128, 1); text-decoration: underline">86</span></span><span style="color: rgba(0, 0, 0, 1)">&nbsp;

$ </span><span style="color: rgba(0, 0, 255, 1)">ifconfig</span> -a #查看你的虚拟网卡eth1的MAC地址是否已修改成功。</pre>
<pre>...
<span style="background-color: rgba(204, 153, 255, 1)">eth1</span>: flags=4098&lt;BROADCAST,MULTICAST&gt;mtu 1500
      ether <span style="text-decoration: underline; background-color: rgba(204, 153, 255, 1)">bc:30:5b:d9:42:86</span>txqueuelen 1000(Ethernet)
      RX packets 0bytes 0 (0.0 B)
      RX errors 0dropped 0overruns 0frame 0
      TX packets 0bytes 0 (0.0 B)
      TX errors 0dropped 0 overruns 0carrier 0collisions 0
...</pre>
</div>
<p>(注:下载的license文件,有可能不能使用,这就需要在安装完IDL文件,重复2.0这一步,具体可参考后文中 Bug.2 一小节的内容)</p>
<p>至此,IDL安装前的准备工作,就做好了。接下来,开始IDL的安装过程。</p>
<p>&nbsp;</p>
<h3>3. 安装IDL</h3>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 255, 1)">mkdir</span> /opt/<span style="color: rgba(0, 0, 0, 1)">idl

</span><span style="color: rgba(0, 0, 255, 1)">cp</span> ./idl82sp2linux.x86_64.<span style="color: rgba(0, 0, 255, 1)">tar</span>.gz /opt/<span style="color: rgba(0, 0, 0, 1)">idl

</span><span style="color: rgba(0, 0, 255, 1)">sudo</span> <span style="color: rgba(0, 0, 255, 1)">tar</span> -xopf idl82sp2linux.x86_64.<span style="color: rgba(0, 0, 255, 1)">tar</span><span style="color: rgba(0, 0, 0, 1)">.gz

</span><span style="color: rgba(0, 0, 255, 1)">sudo</span> ./<span style="color: rgba(0, 0, 255, 1)">install</span>.<span style="color: rgba(0, 0, 255, 1)">sh</span> </pre>
</div>
<p>安装过程,根据提示,有一个是要输入安装的目标路径,其余皆是yes/no的选项,一般yes即可。</p>
<p>&nbsp;</p>
<p>在弹出的license对话框中,首先选择第三项Install a license you have received,点Next<br><br>然后找到并选中之前更改并保存过的license.dat,点OK<br><br>然后同时选择Install license manager以及Start license manager,点Next(这一步默认两者都是选种的状态,小方框凹进去,所以到这一步直接点Next)<br><br>再点击Finish,结束​<br><br></p>
<h3>4. 开机自动执行</h3>
<p>以上操作,在重启或者断网之后,都会失效,需要重新进行license的相关操作才行。</p>
<p>将虚拟网卡的设置写入开机脚本,这样重启之后就不用重新进行license的相关操作就能使用idl了。</p>
<div class="cnblogs_code">
<pre>$ sudo vi /etc/rc.local</pre>
</div>
<p>在 /etc/rc.local 中,将以下代码加到 exit 0 (可能没有 "exit 0" 这一句)的前面,然后保存:</p>
<div class="cnblogs_code">
<pre>#create a vitual network card <span style="color: rgba(0, 0, 255, 1)">for</span> activation of idl8.<span style="color: rgba(128, 0, 128, 1)">2</span><span style="color: rgba(0, 0, 0, 1)">
ifconfig eth1 down<br>tunctl </span>-<span style="color: rgba(0, 0, 0, 1)">t eth1 -u root
</span><span style="color: rgba(0, 0, 255, 1)">ifconfig</span> eth1 hw ether bc:<span style="color: rgba(128, 0, 128, 1)">30</span>:5b:d9:<span style="color: rgba(128, 0, 128, 1)">42</span>:<span style="color: rgba(128, 0, 128, 1)">86</span>
<span style="color: rgba(0, 0, 255, 1)">ifconfig</span><span style="color: rgba(0, 0, 0, 1)"> eth1 up
</span></pre>
</div>
<p>要让这个文件开机自动执行,还需要增加可执行权限:&nbsp;<span class="cnblogs_code"> <span style="color: rgba(0, 0, 255, 1)">chmod</span> +x /etc/rc.d/rc.local</span>&nbsp;</p>
<p>&nbsp;</p>
<p>同时,系统的 license 文件变量,也需要在~/<span style="color: rgba(0, 0, 0, 1)">.bashrc</span>文件中同步更新,将idl的license文件一并添加到系统变量($LM_LICENSE_FILE)里:</p>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 255, 1)">$ echo</span><span style="color: rgba(0, 0, 0, 1)"> $LM_LICENSE_FILE# 查询已有的 license 文件列表
</span>/opt/pgi/<span style="color: rgba(0, 0, 0, 1)">license.dat
$ </span><span style="color: rgba(0, 0, 255, 1)">vi</span> ~/<span style="color: rgba(0, 0, 0, 1)">.bashrc         # 在文件内的 <span style="color: rgba(0, 0, 0, 1)">LM_LICENSE_FILE</span> 字段,增加 IDL 的 license 文件(红色字段,就是新增的IDL的license文件)
...<br>export LM_LICENSE_FILE=$PGI/license.dat<span style="text-decoration: underline; color: rgba(255, 0, 0, 1)">:/opt/idl/license/license.dat</span><br>...
$ </span><span style="color: rgba(0, 0, 255, 1)">echo</span><span style="color: rgba(0, 0, 0, 1)"> $LM_LICENSE_FILE<span style="color: rgba(0, 0, 0, 1)"># 再次查询 license 文件列表,看是否更新成功</span>
</span>/opt/pgi/license.dat:/opt/idl/license/license.dat</pre>
</div>
<p>之后,执行&nbsp;&nbsp;<span class="cnblogs_code"> source ~/.bashrc</span>&nbsp; ,使 ~/<span style="color: rgba(0, 0, 0, 1)">.bashrc</span> 中所作的修改立即生效。</p>
<p>&nbsp;</p>
<h3>Bug:可能遇到的各种问题</h3>
<h4>Bug.1:找不到libXp.so.6动态链接库</h4>
<p> 在终端下输入 idl 并回车,很可能会出现如下错误信息:</p>
<div class="cnblogs_code">
<pre>… /opt/idl/idl82/bin/bin.linux.x86_64/: libXp.so.6: <span style="color: rgba(255, 0, 0, 1)">cannot open shared object file: No such file or directory</span></pre>
</div>
<p> 该信息是因为没有安装64位的libXp.so.6动态链接库。</p>
<p>&nbsp;&nbsp;&nbsp; 解决办法是,到这里下载libXp-1.0.3-4.fc30.x86_64.rpm文件,然后双击打开,把里面的libXp.so.6和libXp.so.6.2.0拷贝出来,直接放到IDL的安装目录/opt/idl/idl82/bin/下面,命令如下:</p>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 255, 1)">wget https:<span style="color: rgba(0, 128, 0, 1)">//<span style="color: rgba(0, 128, 0, 1)">rpmfind.net/linux/fedora/linux/releases/30/Everything/x86_64/os/Packages/l/libXp-1.0.3-4.fc30.x86_64.rpm
<span style="color: rgba(0, 0, 0, 1)">
rpm2cpio libXp-<span style="color: rgba(128, 0, 128, 1)">1.0.<span style="color: rgba(128, 0, 128, 1)">3-<span style="color: rgba(128, 0, 128, 1)">4.fc30.x86_64.rpm | cpio -<span style="color: rgba(0, 0, 0, 1)">idv<span style="color: rgba(51, 153, 102, 1)"># 解压rpm文件

<span style="color: rgba(0, 0, 255, 1)">sudo <span style="color: rgba(0, 0, 255, 1)">cp /mnt/Disk2T/L/software/LINUX/libXp/usr/lib64/libXp.so.<span style="color: rgba(128, 0, 128, 1)">6 /opt/idl/idl82/bin/bin.linux.x86_64/

<span style="color: rgba(0, 0, 255, 1)">sudo <span style="color: rgba(0, 0, 255, 1)">cp /mnt/Disk2T/L/software/LINUX/libXp/usr/lib64/libXp.so.<span style="color: rgba(128, 0, 128, 1)">6.2.<span style="color: rgba(128, 0, 128, 1)">0 /opt/idl/idl82/bin/bin.linux.x86_64/</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></pre>
</div>
<p> 再次运行 idl,则不会出现上述错误信息。</p>
<h4><br>Bug.2:license文件没有生效</h4>
<p>如果选择的license文件不可用,则打开 idl 的时候,会出现如下信息:</p>
<div class="cnblogs_code">
<pre>$ idl
IDL Version 8.2.2 (linux x86_64 m64). (c) 2012, Exelis Visual Information Solutions, Inc.
% LICENSE MANAGER: No such feature exists.
Feature:       idl
License path:/opt/pgi/license.dat:/opt/idl/license/license.dat:/opt/idl/license/*.lic:
<span style="color: rgba(255, 0, 0, 1)">FLEXnet Licensing error<span style="color: rgba(0, 0, 0, 1)">:-5,357
For further information, refer to the FLEXnet Licensing documentation,
available at "www.acresso.com"..
License file: /opt/pgi/license.dat:/opt/idl/license/license.dat:/opt/idl/license/*.lic
% Entering timed demo mode. Each session is limited to 7 minutes of operation. Printing and file saving
   are disabled.

To learn more about our license options for this product, please contact your account manager or
   Exelis Visual Information Solutions, Inc. at info@exelisvis.com.

IDL&gt; exit</span></span></pre>
</div>
<p>出现这个问题的原因是,license文件已经失效,需要重新寻找新的可用的license文件。</p>
<p>解决办法是,继续搜索可用的license文件,重复步骤 2.0,然后在 idl 的安装目录下,使用 exelislicense 程序手动安装license。​</p>
<div class="cnblogs_code">
<pre>$ <span style="color: rgba(51, 102, 255, 1)">vi license.dat<br><br><span style="color: rgba(0, 0, 0, 1)">$</span> <span style="color: rgba(51, 102, 255, 1)">cd /opt/idl/idl82/bin<br>
<span style="color: rgba(0, 0, 0, 1)">$</span> <span style="color: rgba(51, 102, 255, 1)">sudo ./exelislicense
<span style="color: rgba(0, 0, 0, 1)">IDL Version 8.2.2 (linux x86_64 m64). (c) 2012, Exelis Visual Information Solutions, Inc.

% Embedded IDL: ITTVIS IDL floating licenses, 99999-1.
% Embedded IDL: ITTVIS IDL floating licenses, 99999-1.
% Loaded DLM: XML.
% Loaded DLM: URL.</span><br>
<span style="color: rgba(0, 0, 0, 1)">$</span> <span style="color: rgba(51, 102, 255, 1)">idl
<span style="color: rgba(0, 0, 0, 1)">IDL Version 8.2.2 (linux x86_64 m64). (c) 2012, Exelis Visual Information Solutions, Inc.
</span><span style="text-decoration: underline"><span style="color: rgba(0, 0, 0, 1); text-decoration: underline">Installation number: 705016.
Licensed for use by: TOHOKU
</span>
</span>IDL&gt; exit</span></span></span></span></pre>
</div>
<p>执行 exelislicense 程序,会弹出对话框,操作步骤如下:</p>
<p>(1)选择第三项Install a license you have received (<span style="color: rgba(0, 0, 255, 1)">小方框凹下表示选中),点Next;</span></p>
<p>(2)找到并选中用于激活的license.dat,点OK;</p>
<p>(3)同时选择Install license manager以及Start license manager,点Next(这一步,两者都默认已选中,所以到这一步直接点Next);</p>
<p>(4)点击Finish,结束​。&nbsp;</p>
<p>&nbsp;</p>
<h4>Bug.3: TCP 端口1700,被占用</h4>
<p>在执行 /opt/idl/idl82/bin/lmgrd 程序时,有时会遇到 “The TCP port number in the license, 1700, is already in use.”的报错。</p>
<p>解决办法:</p>
<p>(1)查看端口1700的进程 ,终端输入: &nbsp;<span class="cnblogs_code">lsof -i:<span style="color: rgba(128, 0, 128, 1)">1700 </span></span></p>
<p>(2)杀死进程:&nbsp;<span class="cnblogs_code"><span style="color: rgba(0, 0, 255, 1)">kill pid </span></span></p>
<p>(3)查看包含lmgrd的进程:&nbsp;<span class="cnblogs_code"><span style="color: rgba(0, 0, 255, 1)">ps -aux|<span style="color: rgba(0, 0, 255, 1)">grep lmgrd <br></span></span></span></p><br><br>
来源:https://www.cnblogs.com/snake553/p/11582268.html
頁: [1]
查看完整版本: CentOS 7下安装IDL 8.2