RHEL7 and systemd start files for EM.
search cancel

RHEL7 and systemd start files for EM.

book

Article ID: 225689

calendar_today

Updated On:

Products

CA Application Performance Management (APM / Wily / Introscope)

Issue/Introduction

Our site is installing CA Application Performance Management Enterprise Manager (APM/Wily/Introscope) on Redhat Enterprise 7.x and would like to use systemd startup scripts to control the start/stop status. Is this supported and are there examples using this?

Environment

All RedHat/CentOS EMs running systemd.

Resolution

To start the Enterprise Manager automatically on reboot, create the below file under:
/etc/systemd/system/emctrl.service

# File location:
# /etc/systemd/system/emctrl.service
[Unit]
Description=Start Introscope Enterprise Manager
After=syslog.target network.target
ConditionFileIsExecutable=/opt/CA/Introscope/bin/EMCtrl.sh

[Service]
Type=forking

Environment=JAVA_HOME="/opt/CA/Introscope/jre/bin"

ExecStart=/opt/CA/Introscope/bin/EMCtrl.sh start
ExecStop=/opt/CA/Introscope/bin/EMCtrl.sh stop

[Install]
WantedBy=multi-user.target 

Once the file is created, test the Enterprise Manager can be started with:

~# systemctl start emctrl

If it works, enable it for system-startup using:

~# systemctl enable emctrl

You can stop the Enterprise manager with:

~# systemctl stop emctrl

You can remove the Enterprise Manager from autostart with:

~# systemctl disable emctrl