Automatically start the Remote Agent when your operating system is being restarted by
configuring it as a system service.
About this task
The
systemctl process manager is a standard process manager on
Linux® to manage service startup when your system is
restarting. The following steps assume that you are using
systemctl. If you are
using a different process manager, then you might need to change the paths and commands.
Note: The installation prefix for IBM Java and Data Virtualization Remote
Agent in the examples is /home/<Operating system user>/wqAgent
.
Procedure
-
As the root user, run the following command to enable user processes for
systemctl. Enter the name of the operating system user.
loginctl enable-linger <Operating system user>
- As the system user who runs the service, complete the following steps.
- Run the following command to create the directory for
systemctl:
mkdir -p ${HOME}/.config/systemd/user/
- Create a file with the following content and use a meaningful file name and description for your
ongoing system administration.
For example:
.config/systemd/user/wqAgent.service
Description=Start Data Virtualization Remote Agent at Boot
After=network.target
[Service]
Type=simple
user=<Operating system user>
WorkingDirectory=/home/<Operating system user>/wqAgent
ExecStart=/home/<Operating system user>/wqAgent/datavirtualization_start.sh
TimeoutStartSec=0
[Install]
WantedBy=default.target
- Run the following command to enable the service:
systemctl --user enable wqAgent
- Run the following command to start the service:
systemctl --user start wqAgent
- Run the following command to validate that the service is running:
ps -axf | grep DATAVIRTUALIZATION | grep -v grep | wc -l
If you are running one remote connector, this command returns a value of 1. The
returned value is higher if you are running multiple remote connectors.
- To validate and view that the Remote Agent is running,
navigate to the Data Sources page from the Data Virtualization web client.
Each connected remote connector is displayed on a new line.