- 在启动licence manager之前,必须确保eslm已经启动
$ export COBDIR=/opt/microfocus/cobol5.1
$ cd $COBDIR/bin
$ sudo ./eslm
- 启动license manager
$ sudo /opt/microfocus/mflmf5.1/mflmrcscript
或者
$ sudo /etc/mflmrcscript
上述两个文件是同一个。
- 停止
$ sudo /opt/microfocus/mflmf5.1/lmfgetpv k
- 检查状态
$ sudo /opt/microfocus/mflmf5.1/lmfgetpv
- 自动启动
$ cat /etc/systemd/system/mflm.service
[Unit]
Description=Micro Focus License Manager
[Service]
Type=forking
ExecStart=/bin/bash /etc/mflmrcscript
ExecStop=/opt/microfocus/mflmf5.1/lmfgetpv k
[Install]
WantedBy=default.target
$ sudo systemctl daemon-reload
$ sudo systemctl start mflm
$ sudo systemctl enable mflm
$ sudo systemctl status mflm
注意这地方/etc/systemd/system/mflm.service
- Type=forking因为/etc/mflmrcscript启动服务之后,脚本自己会退出,不会长留。
- ExecStart=/bin/bash ...因为/etc/mflmrcscript是一个shell脚本而且没有shebang属性。
网友评论