Published on InterSystems Developer Community (https://community.intersystems.com)

Home > Starting IRIS as a service on CentOS7 startup ( autostart )

Article
Udo Leimberger · Nov 22, 2019 1m read

Starting IRIS as a service on CentOS7 startup ( autostart )

If you want to start IRIS as a service on CentOS7 you can use systemd.

Login as root and create a new file iris.service in /etc/systemd/system.

# vi /etc/systemd/system/iris.service
[Unit]
Description=Intersystem IRIS Service
After=network.target
[Service]
Type=forking
WorkingDirectory=<iris-install-dir>
User=root
ExecStart=<iris-inst-dir>/bin/iris start "<instance>"
ExecStop=<iris-inst-dir>/bin/iris stop "<instance>" quietly
Restart=on-abort
[Install]
WantedBy=default.target

<iris-install-dir> = Directory where you installed IRIS on Centos7 i.e. /iris

<instance> = The IRIS instance you want to manage.

After creating the file set the correct permission

# chmod 664 /etc/systemd/system/iris.service

Reload all Unit files of the service

# systemctl daemon-reload

  Finally start the service ( if IRIS was already started then stop it )

# systemctl start iris.service

  or

# systemctl stop iris.service

If everything works fine you can enable the service at startup:

# systemctl enable iris.service

Hope this helps.

#InterSystems IRIS

Source URL:https://community.intersystems.com/post/starting-iris-service-centos7-startup-autostart