Control-M Post Installation Procedures on UNIX

The following procedures describe the required and optional steps after you install Control-M:

If you installed Control-M/Server on NFS, you can only use the Control-M/Server user on the same host where Control-M/Server was installed.

Enabling Control-M/Agent for Non-Root Mode

This procedure describes how to enable Control-M/Agent for non-root mode for jobs that are owned by a user that is different from the one running Control-M/Agent.

If the only jobs run are owned by the same user that runs the Control-M/Agent, it is not necessary to take any action to set up non-root operation mode.

Begin

  1. Log in as user root and run the set_agent_mode script using the enable non root mode option on each installed Control-M/Agent. The script need only be run once for each Control-M/Agent.

  2. From the Control-M Configuration Manager, define a job owner password for each job owner that is used by the Control-M/Agent.

  3. For an upgrade installation, you must replace the automatic startup script on each Control-M/Agent computer to reflect its root or non-root status.

    You can toggle between root mode and non-root mode on any Control-M/Agent by shutting down the Control-M/Agent from the user that is currently running the Control-M/Agent, and re-starting Control-M/Agent with the user necessary for the new mode.

Configuring the Automatic Startup/Shutdown Script for Control-M/EM on UNIX

This procedure describes how to configure the automatic startup/shutdown script for Control-M/EM on UNIX (optional).

If not all Control-M/EM server components are installed on one account, you need to include the startup and shutdown commands in operating system startup and shutdown scripts of the host computer.

Begin

  1. Log in as root.

  2. Navigate to /etc/

  3. In the inittab file, add the following commands to the start-up script of your operating system as needed:

    • <identifier>:<runlevel>:<action>:<command> - <em_account> "-c start_server"

    • <identifier>:<runlevel>:<action>:<command> - <em_account> "-c start_config_agent"

    • em:2:once:su - <em_account> "-c start_server"

    • em2:2:once:su - <em_account> "-c start_config_agent"

  4. In the rc.shutdown file, add the following commands to the shut-down script of your operating system as needed:

    • su - <em_account> -c "em ctl -mcs -C Config_Agent -M [Hostname] -cmd shutdown"

    • sleep 10

    • su - <em_account> -c "stop_server -U <<db_server_administrator_name>-P <db_server_administrator_name>"

  5. Restart the Control-M/EM host.

Configuring the Automatic Startup/Shutdown Procedure for Control-M/EM (RedHat and Oracle Linux 7 or Later)

This procedure describes how to configure the automatic startup procedure for Control-M/EM on RedHat 7 or later and Oracle Linux 7 or later.

If there is a High Availability installation, you need to start the non-active environment, after the active environment starts.

Begin

  1. Log in as root.

  2. Navigate to the following to location:

    /etc/systemd/system/

  3. Create a new unit service file with 644 permissions.

    The extension must be .service.

    EXAMPLE: EM.service

  4. Open the file and type the following:

    Copy
    [Unit]
    Description=Control-M/EM
    After=systemd-user-sessions.service multi-user.target network.target 
    [Service] 
    User=<unit_service> 
    ExecStart=/bin/sudo -u <user_account> /bin/csh -c "start_server;start_config_agent"
    Type=forking 
    RemainAfterExit=yes 
    ExecStop= 
    No High Availability: /bin/sudo -u <user_account> /bin/csh -c “[EM_home_dir]/bin/em ctl -mcs -C Config_Agent -M [hostname] -cmd shutdown"
    No High Availability with a dedicated PostgreSQL: /bin/sudo -u <user_account> /bin/csh -c “[EM_home_dir]/bin/em ctl -mcs -C Config_Agent -M [hostname] -cmd shutdown; [EM_home_dir]/bin/stop_server"
    High Availability: : /bin/sudo -u <user_account> /bin/csh -c “[EM_home_dir]/bin/em ctl -mcs -C Config_Agent -M [stand-by environment host name] -cmd shutdown; sleep 30; [EM_home_dir]/bin/em ctl -mcs -C Config_Agent -M [active environment host name] -cmd shutdown" 
    High Availability with a dedicated PosgreSQL: /bin/sudo -u <user_account> /bin/csh -c “[EM_home_dir]/bin/em ctl -mcs -C Config_Agent –M [stand-by environment host name] -cmd shutdown; sleep 30; [EM_home_dir]/bin/em ctl -mcs -C Config_Agent -M [active environment host name] -cmd shutdown; [EM_home_dir]/bin/stop_server"
    [Install]
    WantedBy=multi-user.target

    The option [Service] User=<unit_service> is optional.

  5. Save the file.

  6. Run the following commands:

    • systemctl daemon-reload

    • systemctl enable [unit service file].service

  7. Restart the Control-M/EM computer.

Automatic Startup/Shutdown Procedure for Control-M/Server on UNIX

The database server and Control-M/Server must be running at all times on the initial Control-M/Server installation. BMC Software recommends that they be started at system startup time.

You can modify the startup procedure to ensure that the database server, Control-M/Server, and the Control-M/Server Configuration Agent are started during system startup. The command to copy the necessary startup instructions to your system startup directory is listed below.

All commands shown below must be executed as the root user.

Depending on your operating system, modify the automatic startup procedure as described in the following table:

Operating system

Startup procedure

Shutdown procedure

AIX

cp <ctmHome>/ctm_server/data/rc.<controlmUser> /etc/

Open the /etc/inittab file in an editor, and append the following line at the end of the file.

<controlmUser>:2:once:/etc/rc.<controlmUser>

cp /home/controlm/ctm_server/data/rc.controlm /etc

In the file /etc/inittab add the following:

controlm:2:once:/etc/rc.controlm

If you want to use the automatic shutdown procedure, you cannot use the respawn command.

Open the /etc/rc.shutdown file in an editor, and append the following line at the end of the file.

/usr/bin/su - <controlmUser> -c '<ctmHome>/ctm_server/scripts/shut_ca; <ctmHome>/ctm_server/scripts/shut_ctm -CA; sleep 20; <ctmHome>/ctm_server/scripts/shutdb;'

  • If you are not performing a graceful shutdown, the sleep value needs to be higher.

  • If you want to perform a graceful shutdown, use the -r flag (shutdown -r).

usr/bin/su – controlm -c '/home/controlm/ctm_server/scripts/shut_ca; /home/controlm/ctm_server/scripts/shut_ctm -CA; sleep 20; /home/controlm/ctm_server/scripts/shutdb;'

Linux

cp <ctmHome>/ctm_server/data/rc.<controlmUser> /etc/rc.d/<controlmUser>

ln -s /etc/rc.d<controlmUser> /etc/rc.d/rc2.d/S98<controlmUser>

cp /home/controlm/ctm_server/data/rc.controlm/etc/rc.d/controlm

ln -s/etc/rc.d/controlm/etc/rc.d/rc2.d/S98controlm

SUSE Linux Enterprise Server 11

SuSEconfig

 

SUSE Linux Enterprise Server 12

See Configuring the Automatic Startup/Shutdown Procedure for Control-M/Server on UNIX

 

RedHat 7 or later

See Configuring the Automatic Startup/Shutdown Procedure for Control-M/Server on UNIX

 

Oracle Linux
7 or later

See Configuring the Automatic Startup/Shutdown Procedure for Control-M/Server on UNIX

 

Configuring the Automatic Startup/Shutdown Procedure for Control-M/Server on UNIX

This procedure describes how to configure the automatic startup procedure for Control-M/Server on RedHat 7, Oracle Linux 7, and SUSE Linux Enterprise Server 12.

Begin

  1. Log in as root.

  2. Navigate to the following to location:

    /etc/systemd/system/

  3. Create a new unit service file with 644 permissions.

    The extension must be .service.

    EXAMPLE: CtmServer.service

  4. Open the file and type the following:

    Copy
    [Unit]
    Description=Control-M Server
    After=systemd-user-sessions.service multi-user.target network.target
    [Service]
    ExecStart=/bin/sh -c [server_home_dir]/ctm_server/data/rc.<account name>
    Type=forking
    RemainAfterExit=yes
    ExecStop=/usr/bin/su - <account name> -c '[server_home_dir]/ctm_server/scripts/shut_ca ; [server_home_dir]/ctm_server/scripts/shut_ctm -CA; sleep 10 ; [server_home_dir]/ctm_server/scripts/shutdb;'
    [Install]
    WantedBy=multi-user.target
  5. Save the file.

  6. From a command line, run the following commands:

    • systemctl daemon-reload

    • systemctl enable [unit service file].service

  7. Restart the Control-M/Server computer.

Configuring the Automatic Startup Procedure for Control-M/Agent on UNIX (Optional)

This procedure describes how to configure the startup procedure for Control-M/Agents automatically at system startup time. Consult your system administrator for the correct commands with regard to Control-M/Agent on the platform you are using. During installation of Control-M/Agent, a ready-made startup script, rc.agent_user, is placed in <ctm_agentInstallFolder>/ctm/scripts.

Control-M/Agents that were shut down manually are not restarted by the automatic startup procedure during a shutdown-restart operation.

Begin

  1. Copy the startup script rc.agent_user to the OS specific init.d directory, as described in Control-M Post Installation Procedures on UNIX.

  2. Create a relative path to the rc2.d directory pointing to the script in the init.d directory.

  3. Run the startup procedure command as the root user.

Configuring the Automatic Startup/Shutdown Procedure for Control-M/Agent on Linux

This procedure describes how to configure the automatic startup procedure for Control-M/Agent on Linux.

Begin

  1. Log in as root.

  2. Navigate to the following to location:

    /etc/systemd/system/

  3. Create a new unit service file with 644 permissions.

    The extension must be .service.

    EXAMPLE: ctmag.service

  4. Open the file and type the following:

    Copy
    [Unit]
    Description=Control-M Agent
    [Service]
    Type=forking
    RemainAfterExit=yes
    ExecStart=[agent_home_dir]/ctm/scripts/rc.agent_user start
    ExecStop=[agent_home_dir]/ctm/scripts/rc.agent_user stop 
    [Install]
    WantedBy=multi-user.target
  5. Save the file.

  6. From a command line, run the following commands:

    • systemctl daemon-reload

    • systemctl enable [unit service file].service

  7. Restart the Control-M/Agent computer.

Configuring the Automatic Startup/Shutdown Procedure for Control-M/Agent on Solaris

This procedure describes how to configure the automatic startup procedure for Control-M/Agent on Solaris.

Begin

  1. Log in as root.

  2. Copy the rc.agent_user script to usr/local/bin/ and change ownership and permissions.

    cp $CONTROLM/scripts/rc.agent_user to /usr/local/bin/ctm_rc.agent_<account_name>

    chmod a+x /usr/local/bin/ctm_rc.agent_<account_name>

    chown root /usr/local/bin/ctm_rc.agent_<account_name>

  3. Navigate to the following to location:

    /etc/systemd/system/

  4. Create a new unit service file with 644 permissions.

    The extension must be .service.

    EXAMPLE: ctmag.service

  5. Open the file and type the following:

    Copy
    [Unit]
    Description=Control-M Agent
    [Service]
    Type=forking
    RemainAfterExit=yes
    ExecStart=/usr/local/bin/ctm_rc.agent_<account_name> start
    ExecStop=/usr/local/bin/ctm_rc.agent_<account_name> stop
    [Install]
    WantedBy=multi-user.target
  6. Save the file.

  7. From a command line, run the following commands:

    • systemctl daemon-reload

    • systemctl enable [unit service file].service

  8. Restart the Control-M/Agent computer.

Configuring the Automatic Startup Procedure for Control-M/Agent on AIX

This procedure describes how to configure the automatic startup procedure for Control-M/Agent on AIX.

Begin

  1. Log in as root privileged user.

  2. Run the following command:

    cp <agentHome>/ctm/scripts/rc.agent_user /etc/<agentUser>

  3. Verify execution permissions (-rwxr-xr-x):

    ls -la /etc/<agentUser>

    If the permissions are not set, execute as follows:

    chmod 755 /etc/<agentUser>

  4. Open the /etc/inittab file in an editor, and append the following line:

    <agentUser>:2:once:/etc/<agentUser>

    For user agent1, run the following command:
     cp /home/agent1/ctm/scripts/rc.agent_user /etc/agent1
    In the file /etc/inittab append the following line:
     agent1:2:once:/etc/agent1