Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » Relay Server » Relay Server deployment


Deploying the Relay Server components to Apache on Linux

Before running the Relay Server with Apache, you need to deploy Relay Server files to each computer in the Relay Server farm.


The Relay Server components are installed using the SQL Anywhere install. On Linux, the Relay Server files are installed to the /opt/sqlanywhere16 directory as part of the SQL Anywhere installation.

Contexte et remarques

Interactive quick setup feature

An interactive quick setup feature is provided as an alternative to this procedure. The quick setup feature:

  1. Configures the web server for Relay Server

  2. Creates a demo application

  3. Generates a quick reference guide

The quick setup is comprised of two main steps:

  1. Configure the Apache web server for Relay Server. This step can be accomplished by running script in the install-dir/relayserver/quicksetup_apache directory.

  2. Create and start Relay Server test services This step can be accomplished by running script in the install-dir/relayserver/quicksetup_apache directory.

The Relay Server for Apache consists of the following executables:

  • rshost
  • dblgen16.res
  • dbsupport
  • dbfhide
  1. Create the Relay Server configuration file rs.config.

  2. Copy rs.config into the install-dir/relayserver/apache??/bin64 directory.

  3. Edit the Relay Server configuration file rs.config using the following guidelines.

    • The file should have four sections:

      • Relay server section
      • Backend farm section
      • Backend server section
      • Options section
    • Each section starts with a section tag that encloses a keyword that identifies the section name in square brackets.

    • Add the appropriate properties to each section. A property is defined by specifying the property name on the left side of an equal sign and its value on the right side of the equal sign. For example, property name = value.

    • The configuration file should contain only 7-bit ASCII characters.

  4. The LD_LIBRARY_PATH environment variable needs to include the Apache install-dir/lib64 and install-dir/relayserver/apache??/bin64 directories. Edit the /<apache-dir>/bin/envvars file to set and then export LD_LIBRARY_PATH.

  5. Edit the Apache conf/httpd.conf file.

    1. Add the following lines to load the Relay Server client and server modules:

      LoadModule iarelayserver_client_module install-dir/relayserver/apache??/bin64/
      LoadModule iarelayserver_server_module install-dir/relayserver/apache??/bin64/

      All modules are invoked using different URLs and all modules explicitly look for the string iarelayserver in the URL path. That part of the URL need not change.

    2. Add the following line to load the SQL Anywhere Monitor support module:

      LoadModule iarelayserver_monitor_module install-dir/relayserver/apache??/bin64/
    3. Add the following line to load the Remote Administration support module:

      LoadModule iarelayserver_admin_module install-dir/relayserver/apache??/bin64/
    4. Add the following line to create a <LocationMatch> section for the client module:

      <LocationMatch /cli/iarelayserver/* >
          SetHandler iarelayserver-client-handler
    5. Add the following line to create a <LocationMatch> section for the server module:

      <LocationMatch /srv/iarelayserver/* >
          SetHandler iarelayserver-server-handler
          RSConfigFile "/install-dir/relayserver/apache??/bin64/rs.config"

      You must specify an RSConfigFile directive which specifies the location of the Relay Server configuration file, rs.config.

    6. Add the following line to create a <LocationMatch> section for the SQL Anywhere Monitor module:

       <LocationMatch  /mon/iarelayserver/* >
          SetHandler iarelayserver-monitor-handler
    7. Add the following line to create a <LocationMatch> section for the Remote Administration module:

      <LocationMatch /admin/iarelayserver/* >
        SetHandler iarelayserver-admin-handler
    8. If the TimeOut directive is set, ensure it is set to at least 60 seconds.

  6. On Linux, if any of the following environment variables are set globally when Apache spawns a process, then there is nothing further needed for the configuration of Apache: $TMP, $TMPDIR or $TEMP.

    If any of the above environment variables are not set globally, or if you want the default Relay Server log file to go in a specific temporary directory (for example, when the State Manager is started automatically but without customizations), then edit the file /<apache-dir>/bin/envvars to set and then export TMP.

    For example, to edit $TMP in the envvars file, do the following:

    set TMP="/tmp"
    export TMP

    This sets the environment variable in the shell that Apache creates before it spawns its processes.


    The Apache user process must have write permissions to the specified tmp directory.

  7. To update the Relay Server configuration while it is started:

    1. Copy the updated configuration file to the install-dir/relayserver/apache??/bin64 directory.

    2. From the install-dir/relayserver/apache??/bin64 directory, run the following command line to apply the configuration update:

      rshost -u -f rs.config
    3. If the Relay Server is set up as a farm with more than one server, repeat the previous steps for each computer in the Relay Server farm.


The Relay Server configuration file is deployed to all computers in the Relay Server farm.

For information about which versions of Apache on Linux are supported, see [external link]

 See also

Concurrent connections