部署托管的缓存服务器(可选)Deploy Hosted Cache Servers (Optional)

适用于:Windows Server(半年频道)、Windows Server 2016Applies to: Windows Server (Semi-Annual Channel), Windows Server 2016

你可以使用此过程来安装和配置 BranchCache 托管缓存服务器,这些服务器位于要在其中部署 BranchCache 托管缓存模式的分支机构。You can use this procedure to install and configure BranchCache hosted cache servers that are located in branch offices where you want to deploy BranchCache hosted cache mode. 借助 Windows Server 2016 中的 BranchCache,你可以在一个分支机构中部署多个托管缓存服务器。With BranchCache in Windows Server 2016, you can deploy multiple hosted cache servers in one branch office.

重要

此步骤是可选的,因为分布式缓存模式不需要在分支机构中托管缓存服务器计算机。This step is optional because distributed cache mode does not require a hosted cache server computer in branch offices. 如果不打算在任何分支机构中部署托管缓存模式,则无需部署托管缓存服务器,并且无需执行此过程中的步骤。If you are not planning on deploying hosted cache mode in any branch offices, you do not need to deploy a hosted cache server, and you do not need to perform the steps in this procedure.

你必须是管理员的成员或等效于执行此过程。You must be a member of Administrators, or equivalent to perform this procedure.

安装和配置托管缓存服务器To install and configure a hosted cache server

  1. 在要配置为托管缓存服务器的计算机上,在 Windows PowerShell 提示符下运行以下命令以安装 BranchCache 功能。On the computer that you want to configure as a hosted cache server, run the following command at a Windows PowerShell prompt to install the BranchCache feature.

    Install-WindowsFeature BranchCache -IncludeManagementTools

  2. 使用以下命令之一将计算机配置为托管缓存服务器:Configure the computer as a hosted cache server by using one of the following commands:

    • 若要将未加入域的计算机配置为托管缓存服务器,请在 Windows PowerShell 提示符下键入以下命令,然后按 ENTER。To configure a non-domain joined computer as a hosted cache server, type the following command at the Windows PowerShell prompt, and then press ENTER.

      Enable-BCHostedServer

    • 若要将已加入域的计算机配置为托管缓存服务器,并在 Active Directory 中注册客户端计算机自动托管缓存服务器发现的服务连接点,请在 Windows PowerShell 提示符下键入以下命令,然后按 ENTER。To configure a domain joined computer as a hosted cache server, and to register a service connection point in Active Directory for automatic hosted cache server discovery by client computers, type the following command at the Windows PowerShell prompt, and then press ENTER.

      Enable-BCHostedServer -RegisterSCP

  3. 若要验证托管缓存服务器的配置是否正确,请在 Windows PowerShell 提示符下键入以下命令,然后按 ENTER。To verify the correct configuration of the hosted cache server, type the following command at the Windows PowerShell prompt, and then press ENTER.

    Get-BCStatus

    备注

    运行此命令后,在HostedCacheServerConfiguration节中, HostedCacheServerIsEnabled的值为TrueAfter you run this command, in the section HostedCacheServerConfiguration, the value for HostedCacheServerIsEnabled is True. 如果将已加入域的托管缓存服务器配置为在 Active Directory (SCP) 注册服务连接点,则HostedCacheScpRegistrationEnabled的值为TrueIf you configured a domain joined hosted cache server to register a service connection point (SCP) in Active Directory, the value for HostedCacheScpRegistrationEnabled is True.