![[UNIX]](ngunix.gif)
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 you have created and configured an agent using one of these Managed File Transfer commands; fteCreateAgent, fteCreateCDAgent, or fteCreateBridgeAgent, you 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]](ngsolaris.gif)
Solaris
On Solaris, follow these steps:- Run the following command, and keep track of the path returned:
For example, the path might be /usr/bin/shwhich 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:
The prefixln -s /etc/init.d/startmqmft /etc/rc3.d/S98startmqmftSmeans default state Started for Solaris. 98 is a sequence number. The suffix is the filename frominit.d
![[Linux]](nglinux.gif)
Linux
- Create a file called /etc/rc.mqmft with contents:
Where#!/bin/sh su -l mqmft_user"-c mq_install_root/bin/fteStartAgent agent_name"mqmft_useris 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.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:
- 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.rclocalfile. - Add the following lines to the
rc.rclocalfile:#!/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
- As the system root user ID, create your own