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

SQL Anywhere 11.0.1 (中文) » MobiLink - 服务器管理 » 使用 MobiLink 服务器技术 » 重定向器(不建议使用)

 

M-Business Anywhere 重定向器(不建议使用)

注意

现已不建议使用重定向器。可以使用中继服务器代替重定向器。请参见中继服务器

以下是在 Windows、Solaris 或 Linux 上设置 M-Business Anywhere 的说明。

有关所支持版本的信息,请参见 [external link] http://www.sybase.com/detail?id=1062632

♦  配置 M-Business Anywhere 重定向器
  1. 完成配置重定向器属性(适用于不支持服务器组的重定向器)中的步骤。

  2. 将文件 mod_iaredirect.dllmod_iaredirect.so 复制到 Web 服务器所在计算机上的 M-Business Anywhere \bin 目录。此文件位于 install-dir\MobiLink\redirector\MBusinessAnywhere 中。

  3. 如果 Web 服务器不是位于重定向器所在的计算机,则必须将以下文件复制到该计算机,并确保这些文件位于路径 (Windows) 或共享路径 (Unix) 中。您所需的文件视所使用的加密方式(如果有)而定。

    以下文件位置相对于 install-dir

    Setup 所需文件
    ECC 加密
    • Windows:bin32\mlcecc11.dll
    • Unix:lib32/libmlcecc11_r.so
    RSA 加密
    • Windows:bin32\mlcrsa11.dll
    • Unix:lib32/libmlcrsa11_r.so
    经 FIPS 认可的 RSA 加密
    • Windows:bin32\mlcrsafips11.dllbin32\sbgse2.dll
    • Unix:lib32/libmlcrsafips11_r.solibsbgse2_r.so
  4. 如果使用的是 Windows,请按以下步骤更新 M-Business Anywhere 的 Web 服务器的配置文件 sync.conf.default

    • 在 LoadModule 区段中添加以下行:

      LoadModule iaredirect_module @@ServerRoot@@/bin/mod_iaredirect.dll
    • 在 SyncLoadFile 部分,添加以下行:

      SyncLoadFile @@ServerRoot@@/bin/mod_iaredirect.dll
    • 在该文件中添加以下区段:

      <Location /iaredirect/ml>
         SetHandler iaredirect-handler
         iaredirectorConfigFile @@ServerRoot@@/conf/redirector.config
      </Location>
    • 运行 setup_defaults.bat 命令文件,将这些更改构建到 sync.conf 文件中。

  5. 如果使用的是 Solaris 和 Linux,请按以下步骤更新 M-Business Anywhere Web 服务器的配置文件 sync.conf

    • 在 LoadModule 区段中添加以下行:

      LoadModule iaredirect_module path/bin/mod_iaredirect.so

      其中 path 是 M-Business Anywhere bin 目录的位置。

    • 在该文件中添加以下区段:

      <Location /iaredirect/ml>
         SetHandler iaredirect-handler
         iaredirectorConfigFile location/redirector.config
      </Location>

      其中 /iaredirect/ml 是在调用重定向器时使用的相对 URL 路径,locationredirector.config 所在的目录。

    • 您可能还需要将以下可选指令添加到刚创建的 <Location> 区段中:

      • MaxSyncUsers n   通过重定向器进行同步的 MobiLink 用户数量上限。此数量用于给重定向器分配必要的资源。此数量不能小于 60,其缺省值是 1000。请仅在缺省用户数量小于实际数量时再更改此设置。

      • ShmemDiagnosis on|off   如果设置为 on,则允许对内存资源进行调试。缺省值是 off。

  6. 为便于调试,最好增加重定向器输出的记录信息量。要执行此操作,请修改 sync.conf 中的 LogLevel 指令,将其设置为 LogLevel info。日志级别可以是(按详细程度由高到低的顺序):debug、info、notice、warn、error、crit、alert 和 emerg。

  7. 重新启动 M-Business 同步服务器,以使更改生效。

示例

以下是 sync.conf 区段的示例,这些示例将 M-Business Anywhere Web 服务器配置为把请求路由到 MobiLink 服务器。

此示例在 Windows 上运行:

LoadModule iaredirect_module "c:\program files\M-Business Anywhere/bin/mod_iaredirect.dll"
...
SyncLoadFile "c:\program files\M-Business Anywhere/bin/mod_iaredirect.dll"
...
<Location \iaredirect\ml>
    SetHandler iaredirect-handler
    iaredirectorConfigFile "c:\AvantGoServer\conf/redirector.config"
</Location>

以下示例适用于 Unix 和 Linux:

LoadModule iaredirect_module modules/mod_iaredirect.so
...
<Location /iaredirect/ml>
    SetHandler iaredirect-handler
    iaredirectorConfigFile "/redirector.config"
</Location>
♦  测试您的配置
  1. 使用以下语法调用重定向器:

    http://host:port/iaredirect/ml/

    其中 iaredirect 是您在 sync.conf 的 <Location> 标记内指定的路径。

  2. 检查日志文件 sync_access.logsync_error.log 以验证重定向器记录了请求。

    注意:此测试不会建立到 MobiLink 服务器的连接。