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

SQL Anywhere 12.0.1 » 中继服务器 » 中继服务器部署

 

将中继服务器组件部署到 Windows Server 2008/Windows Server 2008 R2 上的 Microsoft IIS 7.0 或 7.5

在中继服务器与 IIS 7.0 或 7.5 一起运行之前,需要将中继服务器文件部署到中继服务器群中的每个计算机上。

前提条件

Microsoft IIS ISAPI 扩展功能已安装。

使用 SQL Anywhere 安装程序安装中继服务器组件。所有文件缺省安装到 %SQLANY12%,且基于该计算机的位数:

  • %SQLANY12%\Bin32%SQLANY12%\Bin64 用于管理 DLL 和可执行文件。

  • %SQLANY12%\RelayServer\IIS\Bin32%SQLANY12%\RelayServer\IIS\Bin64 用于相应文件夹中的中继服务器特定文件(例如,AdminClientMonitorServer)。Server 文件夹包含 rshost.exers.config 文件。

上下文和注释

交互式快速设置功能

提供交互式快速设置功能 rs-setup.bat 作为此过程的一个替代方法(有关快速设置功能的更详细说明,请参阅自述文件)。rs-setup.bat 位于 %SQLANY12%/RelayServer/IIS/quicksetup_iis7 目录中,可执行以下任务:

  1. 安装 IIS7 和开启必需的 IIS7 功能

  2. 配置 IIS7 用于中继服务器

  3. 创建演示应用程序

  4. 生成快速参考指南

Windows 上的中继服务器包含以下可执行文件:

  • rs_client.dll
  • rs_server.dll
  • rs_monitor.dll
  • rshost.exe
  • dblgen12.dll
  • dbsvc.exe
  • dbfhide.exe
  • dbtool12.dll
  • dblib12.dll
  • dbicu12.dll
  • dbicudt12.dll
  • dbsupport.exe
  • dbghelp.dll

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

用于中继服务器的 IIS 7 安装脚本位于 %SQLANY12%\RelayServer\IIS\iis7_setup.txt 目录中。

 ♦ 将中继服务器组件部署到 Windows Server 2008/Windows Server 2008 R2 上的 Microsoft IIS 7.0 或 7.5
  1. 备份位于 c:\Windows\System32\inetsrv\config 文件夹的 IIS 配置文件 applicationHost.config

  2. 要为中继服务器添加应用程序池,请编辑 applicationHost.config 文件,将以下代码添加到 <system.applicationHost> » <applicationPools> 部分。



    <add name="RelayServer" queueLength="65535" autoStart="true" managedRuntimeVersion="" managedPipelineMode="Integrated">
       <processModel identityType="LocalSystem" idleTimeout="00:00:00" maxProcesses="20" pingingEnabled="false"
             pingInterval="00:00:30" pingResponseTime="00:01:30" />
       <recycling disallowOverlappingRotation="true">
         <periodicRestart time="00:00:00">
           <schedule>
             <clear />
           </schedule>
         </periodicRestart>
       </recycling>
       <failure rapidFailProtection="false" />
       <cpu resetInterval="00:00:00" />
    </add>
    
    注意

    剩下的步骤将 %SQLANY12%\RelayServer\IIS\BinXX 目录视为 applicationHost.config 文件中的 %rs_dir%。然而,并非 IIS 配置文件的每个部分都支持环境变量扩展,因此,将 %rs_dir% 变量添加到 applicationHost.config 文件中时需要进行完全扩展。

  3. 要将中继服务器应用程序添加至缺省站点,请编辑 applicationHost.config 文件,将以下代码添加到 <system.applicationHost> » <applicationPools> » <sites> » <site name="Default Web Site"> 部分。

    <application path="/rs" applicationPool="RelayServer">
      <virtualDirectory path="/" physicalPath="%rs_dir%"/>
    </application>
  4. 要添加中继服务器 ISAPI 扩展,请编辑 applicationHost.config 文件,将以下代码添加到 <system.webServer> » <security> » <isapiCgiRestriction> 部分。

    <add path="%rs_dir%\Admin\rs_admin.dll" allowed="true" />
    <add path="%rs_dir%\Client\rs_client.dll" allowed="true" />
    <add path="%rs_dir%\Monitor\rs_monitor.dll" allowed="true" />
    <add path="%rs_dir%\Server\rs_server.dll" allowed="true" />
  5. 要启用对中继服务器扩展的访问,请编辑 applicationHost.config 文件,将以下代码添加到 <configuration> 部分。



    <location path="Default Web Site/rs">
      <system.webServer>
        <security>
          <authentication>
            <anonymousAuthentication userName="" />
          </authentication>
          <requestFiltering>
            <requestLimits maxAllowedContentLength="2147483647" />
          </requestFiltering>
        </security>
        <handlers accessPolicy="Execute, Script" />
      </system.webServer>
    </location>
    注意

    中继服务器设置为基于这些说明进行匿名访问。IIS 和中继服务器需要根据业务要求配置相应的安全需求。

  6. 若出于安全考虑,要对中继服务器管理扩展强制执行 HTTPS 访问,请编辑 applicationHost.config 文件,将以下代码添加到 <configuration> 部分。

    <location path="Default Web Site/rs/Admin">
      <system.webServer>
        <security>
          <access sslFlags="Ssl" />
        </security>
      </system.webServer>
    </location>
  7. 将这些更改保存到 applicationHost.config 文件。

  8. [缺省 Web 站点] 的连接超时属性设置为至少 60 秒。缺省情况下,此值应为足够的 120 秒。

  9. 根据以下原则创建中继服务器配置文件 rs.config

    • 文件应包含四个部分:

      • 选项部分
      • 中继服务器部分
      • 后端群部分
      • 后端服务器部分
    • 各部分以部分标记开头,将标识部分名的关键字用方括号括起来。

    • 为各部分添加相应的属性。定义属性的方法是在等号左侧指定属性名称,在等号右侧指定属性值。例如,属性名称 =

    • 配置文件应只包含 7-字节 ASCII 字符。

  10. rs.config 文件复制到 %SQLANY12%\RelayServer\IIS\BinXX\Server 目录中。

  11. 请复查性能提示,确保最佳的性能。

  12. 使用与以下所示内容类似的命令行,将中继服务器状态管理器作为服务启动:

    dbsvc -a <administrator> -p <password> -s auto -t rshost -w RelayServer "%rs_dir%\Server\rshost.exe" -q -qc -f "%rs_dir%\Server\rs.config" -o "c:\temp\ias_relay_server.log"
    注意

    建议您将状态管理器作为服务启动。但也可由中继服务器自动启动。

  13. 为 Windows 上的 Microsoft IIS 更新中继服务器配置:

    1. 针对属于您正在更新的中继服务器群的每台计算机,将更新的配置文件复制到中继服务器 Web 站点主目录下的 %SQLANY12%\RelayServer\IIS\BinXX\Server 目录中。如果使用自动启动,则必须将配置文件命名为 rs.config。

    2. %SQLANY12%\RelayServer\IIS\BinXX\Server 目录中,运行以下命令行来应用配置更新:

      rshost -u -f rs.config
    3. 针对正在被更新的中继服务器群中的每台计算机重复上一步骤。

结果

将中继服务器配置文件部署到中继服务器群中的所有计算机。

下一步

无。

 另请参见