+

Search Tips | Advanced Search

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_name
Where 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:
  1. Run the following command, and keep track of the path returned:
    which sh
    For example, the path might be /usr/bin/sh
  2. As the system root user ID, create your own /etc/init.d/startmqmft file.
  3. 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
  4. Make the file executable, for example:
    chmod 755 /etc/init.d/startmqmft
  5. Symlink the file to the rc3.d directory:
    ln -s /etc/init.d/startmqmft /etc/rc3.d/S98startmqmft
    
    The prefix S means default state Started for Solaris. 98 is a sequence number. The suffix is the filename from init.d

HP-UX

On HP-UX, follow these steps:
  1. Create a file called /sbin/init.d/mqmft with contents:
    #!/bin/sh 
    su -l mqmft_user -c mq_install_root/bin/fteStartAgent agent_name
  2. Create a file called /etc/rc.config.d/mqmft with contents:
    MQMFT=1
  3. Symlink the file to the rc3.d directory and start the agent:
    ln -s /sbin/init.d/mqmft /sbin/rc3.d/S84mqmft

Linux

For Linux systems there are multiple ways that we can start applications during the system boot process. In general, consider following these steps:
  1. 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.
  2. Make the file executable, for example:
    chmod 755 /etc/rc.mqmft 
  3. Next add the following line to /etc/inittab:
    mqmft:5:boot:/etc/rc.mqmft

Other 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: