Starting an MFT agent at UNIX and Linux system startup
A Managed File Transfer Agent can be configured to start at system startup on UNIX. When you log off a UNIX system your agent continues running and can receive file transfers.
When we have created and configured an agent using one of these Managed File Transfer commands; fteCreateAgent, fteCreateCDAgent, or fteCreateBridgeAgent, we can configure it to start automatically during a reboot on UNIX machines by using a script file that simply executes:
su -l mqmft_user -c mq_install_root/bin/fteStartAgent agent_nameWhere mq_install_root is the root directory of the required Managed File Transfer installation, the default is: /opt/mqm and agent_name is the name of the Managed File Transfer Agent to be started. The usage of this script file varies depending on the specific UNIX operating system.Solaris
On Solaris, follow these steps:
- Run the following command, and keep track of the path returned:
which shFor example, the path might be /usr/bin/sh- As the system root user ID, create your own /etc/init.d/startmqmft file.
- Edit this file and add the script lines to it, using the returned path from step 1 as the first line in the script:
#!/usr/bin/sh su mqmft_user mq_install_root/bin/fteStartAgent agent_name- Make the file executable, for example:
chmod 755 /etc/init.d/startmqmft- Symlink the file to the rc3.d directory:
ln -s /etc/init.d/startmqmft /etc/rc3.d/S98startmqmftThe prefix S means default state Started for Solaris. 98 is a sequence number. The suffix is the filename from init.dHP-UX
On HP-UX, follow these steps:
- Create a file called /sbin/init.d/mqmft with contents:
#!/bin/sh su -l mqmft_user -c mq_install_root/bin/fteStartAgent agent_name- Create a file called /etc/rc.config.d/mqmft with contents:
MQMFT=1- Symlink the file to the rc3.d directory and start the agent:
ln -s /sbin/init.d/mqmft /sbin/rc3.d/S84mqmftLinux
For Linux systems there are multiple ways that we can start applications during the system boot process. In general, consider following these steps:
- Create a file called /etc/rc.mqmft with contents:
#!/bin/sh su -l mqmft_user"-c mq_install_root/bin/fteStartAgent agent_name"Where mqmft_user is the user ID under which the agent process is to run. This user ID must be a member of the mqm group.- Make the file executable, for example:
chmod 755 /etc/rc.mqmft- Next add the following line to /etc/inittab:
mqmft:5:boot:/etc/rc.mqmftOther ways to start an agent during boot on Linux include adding the script lines to the /etc/rc.d/rc.local file, or on Linux SuSe, adding the script lines to the /etc/init.d/boot.local file. You should select the method that works best for your environment. Here is some more information on other ways to start an agent during startup on specific Linux distributions that are supported:
- SLES 10 and 11
- For SUSE Linux Enterprise Server (SLES) 10 and 11 systems, follow these steps:
- As the system root user ID, create your own /etc/init.d/rc.rclocal file.
- Add the following lines to the rc.rclocal file:
#!/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"- Run the following commands:
chmod 755 rc.rclocal chkconfig --add rc.rclocal