Overview
The MDS is capable to run as a Linux service. This means that the MDS can automatically be started at system boot time and can automatically be stopped at sytem shutdown. The output of the MDS can be directed to a logfile or can be disabled. When the MDS is started as a service, no user interaction can take place through a console window.
Enabling the MDS service
In order to successfully run the MDS as a service, the output that is normally directed to the MDS console window should be directed to a file or should be disabled. Also, the input for the MDS must be disabled. To do this, edit the mds.lax config file. It is located at /opt/mds/mds.lax for a default installation. Set the following variables to the correct values:
lax.stderr.redirect=/var/log/mds/stderr.txt
lax.stdin.redirect=
lax.stdout.redirect=/var/log/mds/stdout.txt
With the above settings, the output will be directed to logfiles. To disable the output, set the variables to the following values:
lax.stderr.redirect=
lax.stdin.redirect=
lax.stdout.redirect=
On a RedHat or SuSE System, run the following command to enable the MDS service:
/sbin/chkconfig --add mds
On a SuSE system, you need to configure the startup of the MDS so that it takes place after your database has started. Also, upon shutdown, the MDS needs to be stopped before your database stops. To do this, change the symlinks in /etc/init.d/rc3.d and in /etc/init.d/rc5.d to a higher start number and a lower stop number. To do this, change into these two directories and type:
mv S01mds S16mds
mv K20mds K05mds
On a Debian system, run the following command to enable the MDS service:
/usr/sbin/update-rc.d mds defaults 95 07
This will enable the MDS service to start at system boot and to stop at system reboot/shutdown.
Change service settings
The MDS service assumes you installed the MDS with default values. To change the directory where the MDS is installed, or to change the user under which the MDS runs, enter the correct values in the file /etc/init.d/mds.
Manually Starting the MDS as a service
Run the following command to start the MDS as a service:
/etc/init.d/mds start
The MDS will be started as a service. It will run as a background process and it will continue to run, even after you log out.
Manually Stop the MDS as a service
Run the following command to stop the MDS service:
/etc/init.d/mds stop
The MDS service will be stopped.