在 SharePoint Server 內部部署環境中設定商務用 OneDriveSet up OneDrive for Business in a SharePoint Server on-premises environment

摘要: 了解在 SharePoint Server 2016 或 SharePoint Server 2013 內部部署環境中設定商務用 OneDrive 所需的步驟。Summary: Learn the steps needed to set up OneDrive for Business in a SharePoint Server 2016 or a SharePoint Server 2013 on-premises environment.

注意

本文描述如何在 SharePoint Server 內部部署環境中設定 商務用 OneDrive,而不會描述 Office 365 環境中的 商務用 OneDrive。如需在 Office 365 中管理 商務用 OneDrive 的詳細資訊,請參閱商務用 OneDrive - 系統管理說明This article describes how to set up OneDrive for Business in a SharePoint Server on-premises environment, and does not describe OneDrive for Business in an Office 365 environment. For more information about administering OneDrive for Business in Office 365, see OneDrive for Business admin help.

在 SharePoint Server 內部部署環境中設定 商務用 OneDrive 時,IT 系統管理員需要採取下列步驟:When setting up OneDrive for Business in your SharePoint Server on-premises environment, an IT-administrator will need to go through the following steps:

繼續安裝之前,請檢閱在 SharePoint Server 中規劃商務用 OneDrive中所述可能需要解決的規劃考量。Before proceeding with setup, please review planning considerations you might need to address that are described in Plan for OneDrive for Business in SharePoint Server.

設定所需的服務Set up the required services

在 SharePoint Server 內部部署環境中設定 商務用 OneDrive,需要在您的伺服器陣列上執行下列服務:Setting up OneDrive for Business in a SharePoint Server on-premises environment requires the following services to be running on your farm:

  • Managed Metadata Service 應用程式Managed Metadata service application

  • 我的網站My Sites

  • User Profile Service 應用程式User Profile service application

我們將為您說明每個設定。Let's look at how to set up each.

注意

下列提供的基本步驟是有關設定 Managed Metadata Service 和 Users Profile Service 應用程式以在 SharePoint Server 中提供 商務用 OneDrive功能。如果您想要將這兩個服務用於 SharePoint Server 中的其他功能,則需要仔細規劃它們。如需受管理中繼資料的詳細資訊,請參閱在 SharePoint Server 中規劃受管理的中繼資料The following provides basic steps to configure the Managed Metadata and Users Profile service applications to provide OneDrive for Business functionality in SharePoint Server. Careful planning is required for both services if you intend to use them for additional functionality in SharePoint Server. For more information, about managed metadata, see Plan for managed metadata in SharePoint Server.

Managed Metadata ServiceManaged Metadata service

首先,建立 Managed Metadata Service 應用程式。First, let's create a Managed Metadata service application.

若要建立 Managed Metadata Service 應用程式To create a Managed Metadata service application

  1. 在管理中心中,按一下 [應用程式管理]**** 下的 [管理服務應用程式]*In Central Administration, in *Application Management section, click Manage service applications.

  2. 按一下 [新增]*,然後按一下 [受控中繼資料服務]Click **New, and then click **Managed Metadata Service*.

  3. 在 [名稱]**** 方塊中,輸入服務應用程式的名稱。Type a name for the service application in the Name box.

  4. 在 [資料庫名稱]**** 方塊中,輸入資料庫的名稱。In the Database Name box, type a name for the database.

  5. 在 [應用程式集區]**** 底下,從 [使用現有的應用程式集區]**** 清單中選擇 [SharePoint Web 服務預設值]*Under *Application Pool, choose SharePoint Web Services Default from the Use existing application pool list.

  6. 按一下 [確定]*Click *OK.

我的網站My Sites

我們要做的第一件事是為「我的網站」網站建立 Web 應用程式。雖然 Web 應用程式可能位在與其他共同作業網站共用的應用程式集區,或可能位於個別的應用程式集區,但是在共用的 IIS 網站中,我們建議「我的網站」使用個別的 Web 應用程式。The first thing we need to do is to create a web application for the My Sites site. We recommend that My Sites be in a separate web application, although the web application can be in an application pool that is shared with other collaboration sites, or it can be in a separate application pool but in a shared IIS website.

建立 Web 應用程式To create a web application

  1. 在管理中心的 [應用程式管理]**** 區段中,按一下 [管理 Web 應用程式]*In Central Administration, in the *Application Management section, click Manage web applications.

  2. 在功能區上,按一下 [新增]。On the ribbon, click New.

  3. 在 [建立新的 Web 應用程式]**** 頁面上,選取 [驗證]**** 區段中要用於此 Web 應用程式的驗證模式。On the Create New Web Application page, in the Authentication section, select the authentication mode that will be used for this web application.

  4. 您可以在 [IIS 網站]**** 區段中選取下列兩個選項之一,設定新 Web 應用程式的設定:In the IIS Web Site section, you can configure the settings for your new web application by selecting one of the following two options:

    • 按一下 [使用現有的 IIS 網站]*,然後選取要安裝新 Web 應用程式的網站。Click *Use an existing web site, and then select the website on which to install your new web application.

    • 按一下 [建立新的 IIS 網站]*,然後在 [名稱]* 方塊中輸入網站的名稱。Click Create a new IIS web site, and then type the name of the website in the Name box.

      您也可以提供連接埠號碼、主機標頭或新 IIS 網站的路徑。You can also provide the port number, host header, or path for the new IIS website.

  5. 在 [安全性設定]**** 區段中,選取驗證提供者、是否允許匿名存取,以及是否使用 Secure Sockets Layer (SSL)。In the Security Configuration section, select an authentication provider, whether to allow anonymous access, and whether to use Secure Sockets Layer (SSL).

  6. 在 [應用程式集區]**** 區段中,執行下列其中一項動作:In the Application Pool section, do one of the following:

    • 如果您要使用現有的應用程式集區,按一下 [使用現有的應用程式集區]*,然後從下拉式功能表中選取應用程式集區。If you want to use an existing application pool, click *Use existing application pool, and then select the application pool from the drop-down menu.

    • 如果您要建立新的應用程式集區,請按一下 [建立新的應用程式集區]*,然後輸入應用程式集區的名稱,再選取執行應用程式集區所使用的帳戶,或建立新的受管理帳戶,以執行應用程式集區。If you want to create a new application pool, click *Create a new application pool, type the name of the application pool, and either select the account that the application pool will run under or create a new managed account for the application pool to run under.

  7. 在 [資料庫名稱與驗證]**** 區段中,選取新 Web 應用程式的資料庫伺服器、資料庫名稱和驗證方法。In the Database Name and Authentication section, select the database server, database name, and authentication method for your new web application.

  8. 如果您使用資料庫鏡像,請在 [容錯移轉伺服器] 區段的 [容錯移轉資料庫伺服器] 方塊中,輸入您要與內容資料庫建立關聯的特定容錯移轉資料庫伺服器名稱。If you use database mirroring, in the Failover Server section, in the Failover Database Server box, type the name of a specific failover database server that you want to associate with a content database.

  9. 在 [服務應用程式連線] 區段中,選取要用於 Web 應用程式的服務應用程式連線。In the Service Application Connections section, select the service application connections that will be available to the web application.

  10. 在 [客戶經驗改進計畫] 區段中,按一下 [是] 或 [否]。In the Customer Experience Improvement Program section, click Yes or No.

  11. 按一下 [確定] 建立新的 Web 應用程式。Click OK to create the new web application.

  12. 當 [建立的應用程式]**** 頁面顯示時,按一下 [確定]*When the *Application Created page appears, click OK.

下一步,我們需要建立網站集合,託管使用者的 我的網站。Next, we need to create the site collection that will host users' My Sites.

建立「我的網站主機」網站集合To create a My Site Host site collection

  1. 在管理中心上,按一下 [應用程式管理]**** 區段中的 [建立網站集合]*On Central Administration, in the *Application Management section, click Create site collections.

  2. 在 [建立網站集合]**** 頁面的 [Web 應用程式]**** 區段中,選取剛剛為「我的網站」建立的 Web 應用程式。On the Create Site Collection page, in the Web Application section, select the web application that you just created for MySites_plural.

  3. 在 [標題與描述]**** 區段中,輸入網站集合的標題及描述。In the Title and Description section, type the title and description for the site collection.

  4. 在 [網站位址] 區段中,選取「My Site」主機 URL 的路徑。在大多數情況下,您可以使用根目錄 (/)。In the Web Site Address section, select the path of the URL for the My Site host. In most cases, you can use the root directory (/).

  5. 在 [範本選擇]**** 區段中,按一下 [企業]**** 索引標籤,然後選取 [我的網站主機]*In the *Template Selection section, click the Enterprise tab, and then select My Site Host.

  6. 在 [主要網站集合管理員]**** 區段中,輸入將擔任網站集合管理員之使用者的使用者名稱 (格式為<網域>\ <使用者名稱>)。In the Primary Site Collection Administrator section, type the user name (in the form <user name>) for the user who will be the site collection administrator.

  7. 在 [次要網站集合管理員]**** 區段中,輸入網站集合次要管理員的使用者名稱。 In the Secondary Site Collection Administrator section, type the user name for the secondary administrator of the site collection.

  8. 若使用配額管理網站集合的儲存,請在 [配額範本] 區段中,按一下 [選取配額範本] 清單中的範本。If you are using quotas to manage storage for site collections, in the Quota Template section, click a template in the Select a quota template list.

  9. 按一下 [確定]*Click *OK.

建立「我的網站主機」網站集合之後,[成功建立頂層網站]**** 頁面會隨即顯示。雖然您可以按一下連結瀏覽至網站集合的根目錄,但是這麼做會導致無法載入使用者設定檔的錯誤。這是預期的行為;此時尚未匯入使用者設定檔。The Top-Level Site Successfully Created page will appear when the MySite_singular Host site collection is created. Although you can click the link to browse to the root of the site collection, doing this results in an error because the user profile cannot be loaded. This behavior is to be expected; user profiles are not imported at this point.

User Profile ServiceUser Profile service

接下來,建立 User Profile Service 應用程式。Next, let's create a User Profile service application.

建立 User Profile Service 應用程式To create a User Profile service application

  1. 在管理中心中,按一下 [應用程式管理]**** 下的 [管理服務應用程式]*In Central Administration, in *Application Management section, click Manage service applications.

  2. 按一下 [新增]*,然後按一下 [User Profile Service 應用程式]Click **New, and then click **User Profile Service Application*.

  3. 在 [名稱]**** 方塊中,輸入服務應用程式的名稱。Type a name for the service application in the Name box.

  4. 在 [應用程式集區]**** 底下,從 [使用現有的應用程式集區]**** 清單中選擇 [SharePoint Web 服務預設值]*Under *Application Pool, choose SharePoint Web Services Default from the Use existing application pool list.

  5. 在 [我的網站主機 URL]**** 方塊中,輸入您建立的「我的網站主機」 URL。In the My Site Host URL box, type the URL of the My Site Host that you created.

  6. 選擇性地變更其他設定,以符合組織需求。預設設定可在混合式環境中正常運作。Optionally change other settings to meet the needs of your organization. The default settings work fine for hybrid environments.

  7. 按一下 [確定]*Click *OK.

啟用「最近的共用項目 (RSI)」快取以快速填入「與我共用」的檢視Enable the Recently Shared Items (RSI) cache to quickly populate the Shared with Me view

這個步驟可讓您的使用者在商務用 OneDrive [與我共用] 檢視中立即檢視與其明確共用的檔案。This step allows your users to immediately view files that are shared explicitly with them in their OneDrive for Business Shared with Me View.

商務用 OneDrive中的 [與我共用] 檢視可讓使用者查看使用者直接與其共用的文件和資料夾。根據預設,透過搜尋編目共用項目並對其進行重新檢索之後,會填入 [與我共用] 檢視。這表示在共用項目時與項目出現在使用者的 [與我共用] 檢視時之間,您的編目/檢索排程可能會造成一些延遲。The Shared with Me view in OneDrive for Business lets users to see which documents and folders that users have shared directly with them. By default, the Shared with Me view is populated once a shared item is crawled and re-indexed through search. This means that your crawling/indexing schedule may cause some latency between the when the item was shared and when the it appears in the user's Shared with Me View.

如果將連結傳送給您的使用者 (例如,透過電子郵件通知),則他們仍然可以開啟共用項目或資料夾,只是看不到 [與我共用] 檢視中所列的項目,除非已編目並檢索項目。如需有關如何在商務用 OneDrive 中共用檔案,請參閱共用 OneDrive 檔案及資料夾Your users will still be able to open the shared items or folder if they are sent a link (for example, through an email notification), they just won't be able to see the items listed in the Shared with me View until the items have been crawled and indexed. For more information about how files are shared in OneDrive for Business, see Share OneDrive files and folders.

若要在 SharePoint Server 環境中排除這項延遲,IT 系統管理員可以啟用最近共用項目 (RSI) 快取。RSI 快取是佈建在「我的網站」主機上,並且用來填入 [與我共用] 檢視,直到編目從共用動作所導致的檔案權限變更。在 SharePoint Server 中,預設會停用 RSI 快取。To eliminate this latency in your SharePoint Server environment, your IT administrator can enable the Recently Shared Items (RSI) cache. The RSI cache is provisioned on the My Site host and it is used to populate the Shared with Me view until the file permission changes resulting from the sharing action are crawled. The RSI cache is disabled by default in SharePoint Server.

RSI 不支援「我的網站主機」不在內容伺服器陣列上的多重伺服器陣列案例。此網站集合一般會有 http://<hostname>/my 這類 URL。如果「我的網站主機」不在內容伺服器陣列上,則會中斷共用。RSI doesn't support a multi-farm scenario where the My Site Host is not on the content farm. This site collection typically has a URL such as http://<hostname>/my. If the My Site Host is not on the content farm, sharing will be broken.

重要

RSI 清單包含可識別共用動作的資訊,包括共用檔案的名稱以及與其共用的使用者。如果您選擇啟用 RSI,則「我的網站主機」管理員以及已委派「我的網站主機」存取權的使用者將可檢視這項資訊。The RSI list contains information identifying the sharing action, including the name of the shared file and who it was shared with. If you choose to enable RSI, this information will be viewable by the My Site Host admin and those to whom My Site Host access has been delegated.

若要在「我的網站主機」中啟用 RSI 清單,請執行下列 PowerShell 命令:To enable the RSI list in the My Site Host, run the following PowerShell command:

$msh = Get-SPSite | where {$_.RootWeb.WebTemplateId -eq 54}
Enable-SPFeature "RecentlySharedItems" -Url $msh.Url

如果您需要在「我的網站主機」中停用 RSI 清單,請執行下列 PowerShell 命令:If you need to disable the RSI list in the My Site Host, run the following PowerShell command:

$msh = Get-SPSite | where {$_.RootWeb.WebTemplateId -eq 54}
Disable-SPFeature "RecentlySharedItems" -Url $msh.Url

確認使用者可以使用商務用 OneDriveVerify that OneDrive for Business is available to your users

請使用下列程序,檢查您的使用者是否可以使用商務用 OneDrive。Use the following procedure to check if OneDrive for Business is available to your users.

  1. 讓使用者開啟 SharePoint Server 網站 (例如,其自己的「我的網站」:http://<hostname>/my)。Have a user open a SharePoint Server site (for example, their own My Site: http://<hostname>/my).

  2. 在頁面左上角,按一下應用程式啟動器,這樣會顯示 OneDrive 磚。In the top left corner of the page, click on the app launcher, which will display the OneDrive tile.

  3. 按一下 OneDrive 磚,這樣應該會顯示 商務用 OneDrive文件頁面。Click on the OneDrive tile, which should display your OneDrive for Business documents page.

SharePoint Server 2016 中的商務用 OneDrive 動態磚