For practical reasons, it may be desirable that after a Linux server restart, the IRIS instance is automatically started.
Below you will find the steps to follow to automate the startup of IRIS during a reboot of the Linux server, via systemd :
1. Create an iris.service file in /etc/systemd/system/iris.service containing the following information
[Unit]
Description=InterSystems IRIS Data Platform
After=network.target
[Service]
Type=forking
User=irisusr
ExecStart=/usr/bin/iris start iris
ExecStop=/usr/bin/iris stop iris quietly
Restart=on-failure
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
NB : the User should correspond to the one you've used during IRIS installation while answering to the question "What user should be the owner of this instance?"
2. Reload systemd configuration manager
sudo systemctl daemon-reload
3. Enable the iris service to automate its startup
sudo systemctl enable iris
This activation creates the symbolic links to automate the startup of IRIS:
Synchronizing state of iris.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable iris
Created symlink /etc/systemd/system/multi-user.target.wants/iris.service → /etc/systemd/system/iris.service.
4. Restart the Linux server
sudo reboot
5. Reconnect to check that IRIS is started
ssh guilbaud@192.168.102.130
guilbaud@192.168.102.130's password:
Welcome to Ubuntu 24.04 LTS (GNU/Linux 6.8.0-36-generic x86_64)
$ iris all
Instance Name Version ID Port Directory
---------------- ---------------- ----- --------------------------------
up >IRIS 2024.1.0.267.2 1972 /usr/irissys