Top
Symfoware Server V12.1.0  Installation and Setup Guide for Server
FUJITSU Software

4.5.2 Configuring Automatic Start and Stop of an Instance

You can automatically start or stop an instance when the operating system on the database server is started or stopped.

Use the following procedure to configure automatic start and stop of an instance.

Note that, if an instance is activated in a failover operation, the cluster system will control the start or stop, therefore this feature should not be used. Also, when performing database multiplexing, refer to "Enabling Automatic Start and Stop of Mirroring Controller and Multiplexed Instances" in the Cluster Operation Guide.

If using an rc script
  1. Set the OS user account of the instance administrator

    If you logged in using the OS user account of the instance administrator, set the environment variables required for starting the instance.

  2. Copy the shell script and set access permissions

    Copy the sample shell script (stored in the location shown below) to /etc/rc.d/init.d, then set and register the access rights. After that, revise the shell script according to the target instance.

    symfowareServerInstallDir/share/rc_symfosvoi.sample
    

    The content to be revised is as follows:

    • In the "SYMDATA" variable, set the data storage destination.

    • In the "SYMUSER" variable, set the OS user account of the instance administrator mentioned in step 1.

    • Ensure that the file name in "/var/lock/subsys" of the "LOCKFILE" variable is the same as the shell script name.

    Example

    In the following example, the installation directory is "/opt/symfoserver64", and the shell script has been created as "rc_symfosvoi_inst1".

    # cp /opt/symfoserver64/share/rc_symfosvoi.sample /etc/rc.d/init.d/rc_symfosvoi_inst1
    # chmod 755 /etc/rc.d/init.d/rc_symfosvoi_inst1
  3. Register and enable automatic start and stop

    As the OS superuser, execute the chkconfig command to register and enable the script.

    Execute "chkconfig --add" to register the script, and execute "chkconfig --level" to set the run level and enable the script.

    Example
    # chkconfig --add rc_symfosvoi_inst1
    # chkconfig --level 35 rc_symfosvoi_inst1 on
If using systemd
  1. Create a unit file

    Copy the unit file sample stored in the directory below, and revise it to match the target instance.

    symfowareServerInstallDir/share/symfosvoi.service.sample
    
    Example

    In the following example, the installation directory is "/opt/symfoserver64", and the instance name is "inst1".

    # cp /opt/symfoserver64/share/symfosvoi.service.sample /usr/lib/systemd/system/symfosvoi_inst1.service

    Revise the underlined portions of the options below in the unit file.

    Section

    Option

    Specified value

    Description

    Unit

    Description

    Symfoware Server (Open Interface) instanceName

    Specifies the feature overview.

    Specifies the name of the target instance. (*1)

    Service

    ExecStart

    '/bin/bash -c 'installDir/bin/symfosvoi.sh start installDir dataStorageDestinationDir'

    Command to be executed when the service is started.

    ExecStop

    '/bin/bash -c 'installDir/bin/symfosvoi.sh stop installDir dataStorageDestinationDir'

    Command to be executed when the service is stopped.

    ExecReload

    '/bin/bash -c 'installDir/bin/symfosvoi.sh reload installDir dataStorageDestinationDir'

    Command to be executed when the service is reloaded

    User

    User

    OS user account of the instance administrator.

    Group

    Group

    Group to which the instance administrator user belongs.

    *1: The instance name should be as follows:

    If WebAdmin is used to create the instance: instanceName

    If the initdb command is used to create the instance: nameThatIdentifiesTheInstance
    The naming conventions for the instance name or for identifying the instance are as follows:

    • Up to 16 bytes

    • The first character must be an ASCII alphabetic character

    • The other characters must be ASCII alphanumeric characters

  2. Enable automatic start and stop

    As the OS superuser, use the systemctl command to enable automatic start and stop.

    Example
    # systemctl enable symfosvoi_inst1.service