Linux安装micro focus 5.1

假设micro focus的安装路径是/opt/microfocus/cobol5.1, license manager的安装路径是/opt/microfocus/mflmf5.1

下面使用root权限操作。

  1. 解包
$ mkdir -p /opt/microfocus/cobol5.1
$ cd /opt/microfocus/cobol5.1
$ tar -zxvf /path/to/sx51_wp9_redhat_x86_64_dev.tar.gz

解开包之后要对/opt/microfocus/cobol5.1/install对一点修改:

  1. 检查本地gcc的版本
    $ ls /usr/lib/gcc/x86_64-redhat-linux/
    确认gcc的版本;例如,4.8.5
  2. 把这个版本信息更新到install内
    在大约275行左右:
$ cat -n install
...
272 BLTLIBDIR=/usr/lib/gcc/x86_64-redhat-linux/3.4.6
273 BLTLIBDIR32=$BLTLIBDIR/32
274
275 if [ -d "/usr/lib/gcc/x86_64-redhat-linux/4.8.5" ]; then
276     GCCINCDIR=/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include
277     GCCLIBDIR=/usr/lib/gcc/x86_64-redhat-linux/4.8.5/32
278     GCCLIBDIR64=/usr/lib/gcc/x86_64-redhat-linux/4.8.5
279 elif [ -d "/usr/lib/gcc/x86_64-redhat-linux/4.4.4" ]; then
...
  1. 安装microfocus
$ cd /opt/microfocus/cobol5.1
$ ./install

期间会有交互,大致参考如下:

Do you wish to continue (y/n): y
Do you agree to the terms of the License Agreement? (y/n): y
Please confirm that you want to continue with this installation (y/n): y
Please press return when you are ready:
Please confirm your understanding of the above reference environment details (y/n): y
Do you want to make use of COBOL and Java working together? (y/n): n
Would you like to install LMF now? (y/n): y
(Press Enter for default directory /opt/microfocus/mflmf) /opt/microfocus/mflmf5.1
do you wish to create it ? (y/n) y
Do you want only superuser to be able to access the License Admin System? (y/n) n
Do you want license manager to be automatically started at boot time? (y/n) y
Please enter either 32 or 64 to set the system default mode: 64
Do you wish to configure Enterprise Server now? (y/n): y
Do you want the Enterprise Server License Manager to be automatically started at boot time? (y/n): y
Press 'q' to quit or return to continue:
Do you want error/warning messages to be displayed via the syslog daemon? (y/n): y
Enter the alphanumeric user ID of the Enterprise Server System Administrator.: root
Please enter the absolute path. Do not use environment variables. Press return to use /var/mfcobol/es
Do you want to install XDB? (y/n): n
  1. 安装license
$ cd /opt/microfocus/mflmf5.1
$ ./mflmcmd

Micro Focus License Manager Command Line Interface
--------------------------------------------------
Select the function you require from the list:
License Install   - Enter 'I'
License Uninstall - Enter 'U'

Ready to install license
Enter the Serial Number part of the License Key:

Enter the License Number part of the License Key:

License added ok
Note that the license database cannot be moved, copied,
or restored without reloading the license keys
  1. 启动license
$ export COBDIR=/opt/microfocus/cobol5.1
$ export PATH=$COBDIR/bin:$PATH
$ export LD_LIBRARY_PATH=$COBDIR/lib:$LD_LIBRARY_PATH

$ cd /opt/microfocus/cobol5.1/bin
$ ./eslm
$ ps -ef | grep eslm | grep -v grep  # checking ESLM is running

$ cd /opt/microfocus/mflmf5.1
$ ./mflmman
$ ps -ef | grep mflm_manager | grep -v grep  # checking LMF is running
  1. 测试cobol
$ cat hello-world.cbl
      * run cobc -x hello-world.cbl to compile.
      * run ./hello-world to run the compile program.
            Identification Division.
            Program-ID. sampleCOBOL.

            Procedure Division.
            Main-Paragraph.
                Display "Hello World!"
                Stop Run.

$ cob -x hello-world.cbl
$ ./hello-world
Hello World!

你可能感兴趣的:(Linux安装micro focus 5.1)