建立 Content 網頁和檔案伺服器資料套件內容(可省略)Create Content Server Data Packages for Web and File Content (Optional)

適用於:Windows Server(以每年次管道)、Windows Server 2016、Windows Server 2012 R2、Windows Server 2012Applies To: Windows Server (Semi-Annual Channel), Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

您可以使用此程序 prehash content 網頁和檔案伺服器,並建立匯入裝載快取伺服器上的資料套件。You can use this procedure to prehash content on Web and file servers, and then create data packages to import on your hosted cache server.

此程序是選擇性的因為您不需要 content prehash 和預先載入您裝載快取的伺服器上。This procedure is optional because you are not required to prehash and preload content on your hosted cache servers. 如果您未進行預先載入 content,資料會裝載快取自動新增為戶端 WAN 連接到下載。If you do not preload content, data is added to the hosted cache automatically as clients download it over the WAN connection.

此程序提供 prehashing content 檔案伺服器和網頁伺服器上的指示。This procedure provides instructions for prehashing content on both file servers and Web servers. 如果您尚未其中一種內容伺服器,您不必執行該內容伺服器類型的指示操作。If you do not have one of those types of content servers, you do not have to perform the instructions for that content server type.

重要

在執行此程序之前,您必須安裝並設定 BranchCache 內容伺服器上。Before you perform this procedure, you must install and configure BranchCache on your content servers. 此外,如果您打算變更內容伺服器上的伺服器密碼,這樣之前 pre\ hashing 內容 – 修改伺服器機密失效 previously\ 自訂 hashes。In addition, if you plan on changing the server secret on a content server, do so before pre-hashing content – modifying the server secret invalidates previously-generated hashes.

若要執行此程序,您必須是系統管理員群組成員。To perform this procedure, you must be a member of the Administrators group.

若要建立內容伺服器資料套件To create content server data packages

  1. 在每個內容伺服器,找出您想要 prehash 新增至資料套件檔案與資料夾。On each content server, locate the folders and files that you want to prehash and add to a data package. 找出,或建立的資料夾要稍後此程序中儲存您的資料的套件。Identify or create a folder where you want to save your data package later in this procedure.

  2. 伺服器在電腦上,請以系統管理員權限開放 Windows PowerShell。On the server computer, open Windows PowerShell with Administrator privileges.

  3. 執行下列一或兩個動作,根據您所內容伺服器的類型:Do one or both of the following, depending on the types of content servers that you have:

    注意

    值 – 路徑參數是您的所在位置的資料夾。The value for the –Path parameter is the folder where your content is located. 您必須具有有效的資料夾位置取代範例值下方的命令中,包含您想要 prehash 新增至套件的資料內容伺服器上。You must replace the example values in the commands below with a valid folder location on your content server that contains data that you want to prehash and add to a package.

    • 如果您想要 prehash content 檔案伺服器上,輸入下列命令,,然後按 ENTER 鍵。If the content that you want to prehash is on a file server, type the following command, and then press ENTER.

      Publish-BCFileContent -Path D:\share -StageData
      
    • 如果您想要 prehash content 網頁伺服器上,輸入下列命令,,然後按 ENTER 鍵。If the content that you want to prehash is on a Web server, type the following command, and then press ENTER.

      Publish-BCWebContent –Path D:\inetpub\wwwroot -StageData
      
  4. 執行下列命令,每個您內容伺服器上建立的資料套件。Create the data package by running the following command on each of your content servers. 取代範例值 (D:\temp) – 目的地參數的位置,您辨識或建立在此程序的開頭。Replace the example value (D:\temp) for the –Destination parameter with the location that you identified or created at the beginning of this procedure.

    Export-BCDataPackage –Destination D:\temp
    
  5. 從內容伺服器,存取您想要 content,預先載入您裝載快取伺服器上的共用並將資料套件複製到裝載快取的伺服器上的共用。From the content server, access the share on your hosted cache servers where you want to preload content, and copy the data packages to the shares on the hosted cache servers.

若要繼續使用此快速入門,請查看上裝載快取伺服器與 #40; 選用和 #41; 匯入的資料套件.To continue with this guide, see Import Data Packages on the Hosted Cache Server (Optional).