Control-M Post-installation Procedures on UNIX
The following procedures describe the required and optional steps after you install Control-M:
-
Configuring the Automatic Startup/Shutdown Script for Control-M/EM on UNIX
-
Configuring the Automatic Startup/Shutdown Procedure for Control-M/Server on UNIX
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.
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
-
Log in as root.
-
Navigate to /etc/.
-
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"
-
-
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>"
-
-
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 higher and Oracle Linux 7 or higher.
If there is a High Availability installation, you need to start the non-active environment, after the active environment starts.
Begin
-
Log in as root.
-
Navigate to the following to location:
/etc/systemd/system/
-
Create a new unit service file with 644 permissions.
The extension must be .service.
EM.service
-
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.targetThe option [Service] User=<unit_service> is optional.
-
Save the file.
-
Run the following commands:
-
systemctl daemon-reload
-
systemctl enable [unit service file].service
-
-
Restart the Control-M/EM computer.
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
-
Log in as root.
-
Navigate to the following to location:
/etc/systemd/system/ -
Create a new unit service file with 644 permissions.
The extension must be .service.
EXAMPLE: CtmServer.service
-
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; [server_home_dir]/ctm_server/scripts/shut_kafka'
[Install]
WantedBy=multi-user.target -
Save the file.
-
From a command line, run the following commands:
-
systemctl daemon-reload
-
systemctl enable [unit service file].service
-
-
Restart the Control-M/Server computer.