Installing the Relay Server Components to Apache on Linux

After installing Sybase Unwired Platform, extract the relay server component files to the Apache modules directory, edit the main configuration file for the Apache HTTP server, and set the environment variables.

Prerequisites
Relay server binaries are included only in the deployment edition of Unwired Platform.
  1. Copy relayserver_linux_x86.tar.gz from /modules/relayserver on the installation media to the host machine. This file is only available on the installation media for the deployment edition of Unwired Platform.
  2. Extract the contents to the Apache modules directory.
    The file contains:
    • mod_rs_ap_client.so
    • mod_rs_ap_server.so
    • rs.config.sample
    • rshost
    • dblgen11.res
    • libdbtasks11_r.so
    • libdbicudt11.so
    • libdbicu11_r.so
    • libdblib11_r.so
    • dbsupport
  3. Copy the generated file from <UnwiredPlatform_InstallDir>\Servers\UnwiredServer\config\rs.config and save it to the Apache modules directory.

    The relay server module expects rs.config to be in the same directory as rshost.

  4. Set the PATH and LD_LIBRARY_PATH environment variables to include the Apache modules directory.
  5. Edit the Apache conf/httpd.conf file:
    1. Add these 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

      The client and server modules are invoked using different URLs. The client module explicitly looks for the string iarelayserver in the URL path.

    2. Add these lines to create a <location> section for the client module:
      <LocationMatch /cli/iarelayserver/* >
           SetHandler iarelayserver-client-handler
      </LocationMatch>
    3. Add these lines to create a <location> section for the server module:
      <Location /srv/iarelayserver/* >
           SetHandler iarelayserver-server-handler
           RSConfigFile "/<apache-install>/modules/rs.config"
      </Location>

      The RSConfigFile directive 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. For details about configuring this file, see System Administration > Environment Setup > Relay Server> Configuring a Relay Server in a Multinode Cluster.

  6. Determine if the following environment variables are set globally when Apache spawns a process: $TMP, $TMPDIR or $TEMP.

    Make sure the Apache user process has write permissions to the /tmp directory location.

    • If the environmental variables are set globally, you are finished.
    • If these variables are not set globally, or you want the default relay server log file to go in a specific temporary directory, edit the /<apache-dir>/bin/envvars file to set and then export TMP.
      set TMP="/tmp"
      export TMP

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