Deploying the Relay Server components to Apache on Linux

On Linux, the Relay Server files are installed to the /opt/sqlanywhere12 as part of the SQL Anywhere installation. See the following topics for deployment information.

For information about which versions of Apache on Linux are supported, see [external link] http://www.sybase.com/detail?id=1061806.

 To deploy the Relay Server files
  1. Copy the following executables and shared objects from the to the /opt/sqlanywhere12 directory to the <apache-install-dir>\modules directory:

    • mod_rs_ap_client.so
    • mod_rs_ap_server.so
    • rshost
    • dblgen12.res
    • libdbtasks12.so
    • libdbicudt12.so
    • libdbicu12_r.so
    • libdblib12_r.so
    • dbsupport
    • dbfhide
    • libdblib12.so
    • mod_rs_ap_monitor.so
    • mod_rs_ap_admin.so
  2. Create the Relay Server configuration file rs.config. See Relay Server configuration file.

  3. Copy rs.config into the <apache-install-dir>\modules directory. The server module expects the rshost executable to be in the same directory where you copied the rs.config file.

  4. 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, made by enclosing 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-hand side of an equal sign and its value on the right-hand side of the equal sign. For example, property name = value.

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

    See Relay Server configuration file.

  5. Set the PATH and LD_LIBRARY_PATH environment variables to include the Apache <apache-install-dir>\modules directory.

  6. 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 modules/mod_rs_ap_client.so
      LoadModule iarelayserver_server_module modules/mod_rs_ap_server.so
      Note

      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 modules/mod_rs_ap_monitor.so
    3. Add the following line to load the Remote Administration support module:

      LoadModule iarelayserver_admin_module modules/mod_rs_ap_admin.so
    4. Add the following line to create a <locationMatch> section for the client module:

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

      <Location /srv/iarelayserver/* >
          SetHandler iarelayserver-server-handler
          RSConfigFile "/<apache-install>/modules/rs.config"
      </Location>
      
      Note

      You must specify an RSConfigFile directive which specifies the location of the Relay Server configuration file, rs.config. The rs.config file must reside in the same directory where the rshost executable is deployed.

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

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

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

  7. 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.

    Note

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

  8. If you want to update the Relay Server configuration while it is started:

    1. Copy the updated configuration file to the <apache-install-dir>\modules directory under the Apache install directory. The configuration file must be called rs.config if auto start is used.

    2. From the /<Apache-install>/modules 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.

 See also