Linux operating systems

Linux: Automatically starting servers on Linux systems

To automatically start a server on a Linux operating system, use the dsmserv.rc script.

Before you begin

Ensure that kernel parameters are set correctly. For instructions, see Tuning kernel parameters for Linux systems.

Ensure that the server instance runs under the instance owner user ID.

Ensure that access rights and user limits are set correctly. For instructions, see Verifying access rights and user limits.

About this task

The dsmserv.rc script is in the server installation directory, for example, /opt/tivoli/tsm/server/bin.

The dsmserv.rc script can be used either to start the server manually or to start the server automatically by adding entries to the /etc/rc.d/init.d directory. The script works with Linux utilities such as CHKCONFIG and SERVICE.

Procedure

For each server instance that you want to automatically start, complete the following steps:

  1. Place a copy of the dsmserv.rc script in the /init.d directory, for example, /etc/rc.d/init.d.

    Ensure that you change only the copy of the script. Do not change the original script.

  2. Rename the script copy so that it matches the name of the server instance owner, for example, tsminst1.

    The script was created under the assumption that the server instance directory is home_directory/tsminst1, for example: /home/tsminst1/tsminst1.

  3. If the server instance directory is not home_directory/tsminst1, locate the following line in the script copy:
    instance_dir="${instance_home}/tsminst1"
    Change the line so that it points to your server instance directory, for example:
    instance_dir="/tsminst1"
  4. In the script copy, locate the following line:
    # pidfile: /var/run/dsmserv_instancename.pid
    Change the instance name value to the name of the server instance owner. For example, if the server instance owner is tsminst1, update the line as shown:
    # pidfile: /var/run/dsmserv_tsminst1.pid
  5. Configure the run level in which the server automatically starts. By using tools such as the CHKCONFIG utility, specify a value that corresponds to a multiuser mode, with networking turned on. Typically, the run level to use is 3 or 5, depending on the operating system and its configuration. For more information about multiuser mode and run levels, see the documentation for your operating system.
  6. To start or stop the server, issue one of the following commands:
    • To start the server:
      service tsminst1 start
    • To stop the server:
      service tsminst1 stop

Example

This example uses the following values:
  • The instance owner is tsminst1.
  • The server instance directory is /home/tsminst1/tsminst1.
  • The dsmserv.rc script copy is named tsminst1.
  • The CHKCONFIG utility is used to configure the script to start at run levels 3, 4, and 5.
cp /opt/tivoli/tsm/server/bin/dsmserv.rc /etc/rc.d/init.d/tsminst1
sed -i 's/dsmserv_instancename.pid/dsmserv_tsminst1.pid/' /etc/rc.d/init.d/tsminst1
chkconfig --list tsminst1
service tsminst1 supports chkconfig, but is not referenced in
any runlevel (run 'chkconfig --add tsminst1')
chkconfig --add tsminst1
chkconfig --list tsminst1
tsminst1 0:off 1:off 2:off 3:off 4:off 5:off 6:off
chkconfig --level 345 tsminst1 on
chkconfig --list tsminst1
tsminst1 0:off 1:off 2:off 3:on 4:on 5:on 6:off