![[AIX]](ngaix.gif)
![[Linux]](nglinux.gif)
在 AIX and Linux 系统启动时启动 MFT 代理程序
可以将 Managed File Transfer Agent 配置为在 AIX® and Linux®上的系统启动时启动。 注销时,代理将继续运行,并且可以接收文件传输。
使用下列其中一个 Managed File Transfer 命令; fteCreateAgent, fteCreateCDAgent或 fteCreateBridgeAgent创建和配置代理程序时,可以使用仅执行以下命令的脚本文件将其配置为在 AIX and Linux 机器上重新引导期间自动启动:
su -l mqmft_user -c mq_install_root/bin/fteStartAgent agent_name其中 mq_install_root 是必需 Managed File Transfer 安装的根目录,缺省值为: /opt/mqm , agent_name 是要启动的 Managed File Transfer Agent 的名称。 此脚本文件的使用因特定操作系统而异。 例如,在 Linux下提供了其他选项。![[Linux]](nglinux.gif)
Linux
对于 Linux 系统,有多种在系统引导过程中启动应用程序的方式。 通常,请考虑以下步骤:
- 创建一个名为 /etc/rc.mqmft 的文件,包含以下内容:
其中,#!/bin/sh su -l mqmft_user"-c mq_install_root/bin/fteStartAgent agent_name"mqmft_user是将作为代理进程运行身份的用户标识。 该用户标识必须是 mqm 组的成员。 - 使该文件可执行,例如:
chmod 755 /etc/rc.mqmft - 接下来,将以下行添加到 /etc/inittab:
mqmft:5:boot:/etc/rc.mqmft
在 Linux 引导期间启动代理的其他方式包括将脚本行添加到 /etc/rc.d/rc.local 文件中,或在 Linux SuSe 上,将脚本行添加到 /etc/init.d/boot.local 文件中。 您应选择最适合自己环境的方法。 以下是有关在受支持的特定 Linux 分发版启动期间启动代理的其他方式的更多信息:
- SLES 10 和 11
- 对于 SUSE Linux Enterprise Server (SLES) 10 和 11 系统,请执行以下步骤:
- 以系统 root 用户标识身份创建您自己的
/etc/init.d/rc.rclocal文件。 - 将以下行添加到
rc.rclocal文件:#!/bin/sh ### BEGIN INIT INFO # Provides: rc.rclocal # Required-Start: $network $syslog # Required-Stop: $network $syslog # Default-Stop: 0 1 2 6 # Description: MQMFT agent startup ### END INIT INFO su -l mqmft_user"-c mq_install_root/bin/fteStartAgent agent_name" - 运行以下命令:
chmod 755 rc.rclocal chkconfig --add rc.rclocal
- 以系统 root 用户标识身份创建您自己的
![[Linux]](nglinux.gif)
在具有 systemd 的 Linux 上启动 Managed File Transfer 代理程序
执行以下过程:
- 在 /etc/systemd/ 系统文件夹中创建文件并对其进行命名,例如,
<agentname>.service。 添加以下内容,其中<agentname>是MFT_AGT_LNX_0。# vi /etc/systemd/system/MFT_AGT_LNX_0.service [Unit] Description=IBM MQ MFT MFT_AGT_LNX_0 [Service] ExecStart=/opt/mqm/bin/fteStartAgent MFT_AGT_LNX_0 ExecStop=/opt/mqm/bin/fteStopAgent MFT_AGT_LNX_0 Type=forking User=mqm Group=mqm KillMode=none - 要启用服务,请运行以下命令:
# systemctl enable MFT_AGT_LNX_0 # systemctl daemon-reload - 要启动代理程序并检查其状态,请运行以下命令:
# systemctl start MFT_AGT_LNX_0 # systemctl status MFT_AGT_LNX_0