本教學課程說明如何在 Compute Engine 上部署 Microsoft SharePoint Server。本指南適用於 Microsoft SharePoint Server 2016 和 Microsoft SharePoint Server 2019。
SharePoint 部署作業會在兩個可用區使用六部伺服器。這個設定對應於中高可用性 (搜尋最佳化) MinRole 伺服器陣列拓撲。
下圖說明部署作業:
本文假設您已在 Google Cloud 上部署 Active Directory 和 SQL Server,並具備 SharePoint Server、Active Directory 和 Compute Engine 的基本知識。
目標
- 準備專案,以部署 SharePoint Server。
部署使用六部伺服器的 MinRole SharePoint 伺服器陣列:
- 兩個前端伺服器,具有分散式快取
- 兩個應用程式伺服器
- 兩個搜尋伺服器
設定負載平衡和防火牆規則
費用
本教學課程使用 Google Cloud的計費元件,包括:
使用 Pricing Calculator 可根據您的預測使用量來產生費用預估。
事前準備
如要完成本指南,請先確認:
- 現有的 Active Directory 網域,且至少有一個網域控制器。 您可以使用 Managed Service for Microsoft Active Directory,也可以使用自行管理的 Active Directory 網域。
- 具備加入電腦、建立使用者帳戶及新增 DNS 記錄權限的管理 Active Directory。
- Google Cloud 專案和虛擬私有雲,可連線至 Active Directory 網域控制站。
- 已加入 Active Directory 網域的 SQL Server 執行個體,可用於 SharePoint。如要進一步瞭解如何在 Google Cloud上設定高可用性 SQL Server 部署作業,請參閱「在多個子網路上部署 SQL Server Always On 可用性群組」。
- SharePoint VM 執行個體的子網路。子網路必須涵蓋至少兩個可用區。
開始部署前,請先參閱 SharePoint Server 2016 和 2019 的系統需求。
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
-
Verify that billing is enabled for your Google Cloud project.
完成本文所述工作後,您可以刪除已建立的資源,避免繼續計費。詳情請參閱清除所用資源一節。
準備專案和網路
如要準備 Google Cloud 專案和虛擬私有雲,以便部署 SharePoint Server,請完成下列步驟:
在 Google Cloud 主控台中切換至您的專案,然後開啟 Cloud Shell。
初始化下列變數:
VPC_NAME=VPC_NAME SUBNET_NAME=SUBNET_NAME SUBNET_REGION=SUBNET_REGION SUBNET_ZONE_1=$SUBNET_REGION-a SUBNET_ZONE_2=$SUBNET_REGION-b
其中:
- VPC_NAME 是您的 VPC 名稱。
- SUBNET_NAME 是子網路的名稱。
- SUBNET_REGION 是子網路的地區。
設定預設的專案 ID:
gcloud config set project PROJECT_ID
將 PROJECT_ID 替換為專案 ID。 Google Cloud
建立防火牆規則
如要啟用 SharePoint 伺服器陣列的伺服器間通訊,您需要建立多項防火牆規則。如要簡化這些防火牆規則的建立程序,請使用網路標記:
- 前端伺服器會加上
sharepoint-frontend
標記。 - 應用程式伺服器會加上
sharepoint-application
標記。 - 搜尋伺服器會加上
sharepoint-search
標記。 - 所有伺服器也都會加上
sharepoint
標記。
建立使用這些網路標記的防火牆規則,並允許透過 SharePoint 要求的通訊埠進行通訊:
- 返回現有的 Cloud Shell 工作階段。
為 SharePoint 伺服器建立防火牆規則:
gcloud compute firewall-rules create allow-http-between-sharepoint-servers \ --direction=INGRESS \ --action=allow \ --rules=tcp:80,tcp:443,tcp:32843,tcp:32844 \ --enable-logging \ --source-tags=sharepoint \ --target-tags=sharepoint \ --network=$VPC_NAME \ --priority=10000 gcloud compute firewall-rules create allow-search-between-sharepoint-servers \ --direction=INGRESS \ --action=allow \ --rules=tcp:16500-16519 \ --enable-logging \ --source-tags=sharepoint \ --target-tags=sharepoint \ --network=$VPC_NAME \ --priority=10000 gcloud compute firewall-rules create allow-rpc-between-sharepoint-servers \ --direction=INGRESS \ --action=allow \ --rules=tcp:135,tcp:49152-65535 \ --enable-logging \ --source-tags=sharepoint \ --target-tags=sharepoint \ --network=$VPC_NAME \ --priority=10000 gcloud compute firewall-rules create allow-wcf-between-sharepoint-servers \ --direction=INGRESS \ --action=allow \ --rules=tcp:808 \ --enable-logging \ --source-tags=sharepoint \ --target-tags=sharepoint \ --network=$VPC_NAME \ --priority=10000 gcloud compute firewall-rules create allow-appfabric-from-sharepoint-servers \ --direction=INGRESS \ --action=allow \ --rules=tcp:22233-22236 \ --enable-logging \ --source-tags=sharepoint \ --target-tags=sharepoint-frontend \ --network=$VPC_NAME \ --priority=10000
建立防火牆規則,允許所有伺服器連線至 SQL Server 執行個體。如果 SQL Server 執行個體使用網路標記
sql-server
,您可以使用下列指令建立防火牆規則:gcloud compute firewall-rules create allow-sql-from-sharepoint-servers \ --direction=INGRESS \ --action=allow \ --rules=tcp:1433 \ --enable-logging \ --source-tags=sharepoint \ --target-tags=sql-server \ --network=$VPC_NAME \ --priority=10000
如果 SQL Server 執行個體未使用網路標記,請參閱建立防火牆規則,瞭解建立防火牆規則的替代方法。
專案和 VPC 現在已可部署 SharePoint。
建立安裝磁碟
下一步是建立包含 SharePoint Server 安裝媒體的磁碟。建立可連結至多個 VM 執行個體的磁碟,即可避免個別下載安裝媒體至每個 VM 執行個體。
請按照「透過 ISO 檔案建立映像檔」一節的指示操作。請使用下列網址做為下載網址:
SharePoint Server 2016
https://download.microsoft.com/download/0/0/4/004EE264-7043-45BF-99E3-3F74ECAE13E5/officeserver.img
SharePoint Server 2019
https://download.microsoft.com/download/C/B/A/CBA01793-1C8A-4671-BE0D-38C9E5BBD0E9/officeserver.img
使用新映像檔在第一個區域中建立磁碟:
gcloud compute disks create sharepoint-media-1 \ --zone=$SUBNET_ZONE_1 \ --image-project=$GOOGLE_CLOUD_PROJECT \ --image=IMAGE
將 IMAGE 替換為您在上一步建立的映像檔名稱。
在第二個可用區中建立磁碟:
gcloud compute disks create sharepoint-media-2 \ --zone=$SUBNET_ZONE_2 \ --image-project=$GOOGLE_CLOUD_PROJECT \ --image=IMAGE
將 IMAGE 替換為您在第一個步驟中建立的映像檔名稱。
建立 SharePoint 圖片
為避免在所有伺服器上個別安裝 SharePoint 元件的重複性工作,您現在要建立自訂 VM 映像檔。您稍後會將這個 VM 映像檔做為虛擬機器範本,用來部署 SharePoint 伺服器。
- 返回現有的 Cloud Shell 工作階段。
為 VM 執行個體建立專屬指令碼。指令碼會在 VM 初始化期間執行,並安裝 SharePoint 必要條件:
cat << "EOF" > specialize.ps1 $ErrorActionPreference = "stop" # Allow HTTP/HTTPS redirects so that the prerequisite installer can run Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name WarnonZoneCrossing -Value 0 -Type DWord # Install prerequisites & d:\prerequisiteinstaller.exe /unattended | Out-Default # Install logging agent (New-Object Net.WebClient).DownloadFile( "https://dl.google.com/cloudagents/windows/StackdriverLogging-v1-10.exe", "$env:Temp\StackdriverLogging-v1-10.exe") & $env:Temp\StackdriverLogging-v1-10.exe /S | Out-Default # Disable Windows firewall (because VPC firewall rules are used instead) & netsh advfirewall set allprofiles state off | Out-Default EOF
建立 VM 執行個體,並為 specialize 指派
specialize.ps1
指令碼值。以唯讀模式附加 SharePoint 安裝磁碟,以便從這個磁碟啟動 SharePoint 安裝程式:gcloud compute instances create sp-template \ --image-family=windows-2019 \ --image-project=windows-cloud \ --machine-type=n1-standard-2 \ --boot-disk-type=pd-ssd \ --subnet=$SUBNET_NAME \ --zone=$SUBNET_ZONE_1 \ --tags=sharepoint \ --disk=name=sharepoint-media-1,auto-delete=no,mode=ro \ --metadata-from-file=sysprep-specialize-script-ps1=specialize.ps1
查看 VM 的序列埠輸出內容,監控初始化程序:
gcloud compute instances tail-serial-port-output sp-template --zone=$SUBNET_ZONE_1
等待約 10 分鐘,直到看到
Instance setup finished
輸出內容,然後按下 Ctrl+C。此時,必備條件安裝作業已完成,VM 執行個體也已準備就緒。使用遠端桌面連線至 VM,並使用上一步建立的使用者名稱和密碼登入。
以滑鼠右鍵按一下「開始」按鈕 (或按 Win+X 鍵),然後按一下「Windows PowerShell (系統管理員)」。
按一下「是」,確認提升權限提示。
啟動 SharePoint 安裝程式:
& d:\setup.exe
按照精靈的指示操作。系統提示您輸入產品金鑰時,請使用 SharePoint 下載頁面「安裝說明」下方列出的企業試用版產品金鑰,或使用您已有的金鑰。
安裝完成後,按一下「Close」。
在 PowerShell 中下載並安裝 Chrome:
Start-BitsTransfer ` -Source 'https://dl.google.com/chrome/install/latest/chrome_installer.exe' ` -Destination "$env:Temp\chrome_installer.exe" & $env:Temp\chrome_installer.exe
在 Chrome 中下載並安裝下列更新:
SharePoint Server 2016
SharePoint Server 2019
- 視需要檢查並安裝更新。
返回 PowerShell 主控台,然後一般化映像檔:
& gcesysprep
這項指令會自動關閉 VM。等待約 5 分鐘,讓這項程序完成。
在 Cloud Shell 中,從 VM 的開機磁碟建立 VM 映像檔:
gcloud compute images create sharepoint \ --source-disk=sp-template \ --source-disk-zone=$SUBNET_ZONE_1
刪除 VM 執行個體:
gcloud compute instances delete sp-template --zone=$SUBNET_ZONE_1
建立 VM 並加入 Active Directory
請按照下列步驟為 SharePoint 伺服器陣列建立 VM 執行個體,並將這些執行個體加入現有的 Active Directory 網域:
- 返回現有的 Cloud Shell 工作階段。
為前端伺服器建立兩個 VM 執行個體:
gcloud compute instances create sp-frontend-1 \ --zone=$SUBNET_ZONE_1 \ --machine-type=n1-standard-8 \ --boot-disk-size=200 \ --boot-disk-type=pd-ssd \ --subnet=$SUBNET_NAME \ --tags=sharepoint,sharepoint-frontend \ --image=sharepoint \ --image-project=$GOOGLE_CLOUD_PROJECT gcloud compute instances create sp-frontend-2 \ --zone=$SUBNET_ZONE_2 \ --machine-type=n1-standard-8 \ --boot-disk-size=200 \ --boot-disk-type=pd-ssd \ --subnet=$SUBNET_NAME \ --tags=sharepoint,sharepoint-frontend \ --image=sharepoint \ --image-project=$GOOGLE_CLOUD_PROJECT
為應用程式伺服器建立兩個 VM 執行個體:
gcloud compute instances create sp-app-1 \ --zone=$SUBNET_ZONE_1 \ --machine-type=n1-standard-8 \ --boot-disk-size=200 \ --boot-disk-type=pd-ssd \ --subnet=$SUBNET_NAME \ --tags=sharepoint,sharepoint-application \ --image=sharepoint \ --image-project=$GOOGLE_CLOUD_PROJECT \ "--metadata=sysprep-specialize-script-ps1=Add-WindowsFeature RSAT-AD-PowerShell;Add-WindowsFeature RSAT-DNS-Server" gcloud compute instances create sp-app-2 \ --zone=$SUBNET_ZONE_2 \ --machine-type=n1-standard-8 \ --boot-disk-size=200 \ --boot-disk-type=pd-ssd \ --subnet=$SUBNET_NAME \ --tags=sharepoint,sharepoint-application \ --image=sharepoint \ --image-project=$GOOGLE_CLOUD_PROJECT \ "--metadata=sysprep-specialize-script-ps1=Add-WindowsFeature RSAT-AD-PowerShell;Add-WindowsFeature RSAT-DNS-Server"
為搜尋伺服器建立兩個 VM 執行個體:
gcloud compute instances create sp-search-1 \ --zone=$SUBNET_ZONE_1 \ --machine-type=n1-standard-8 \ --boot-disk-size=200 \ --boot-disk-type=pd-ssd \ --subnet=$SUBNET_NAME \ --tags=sharepoint,sharepoint-search \ --image=sharepoint \ --image-project=$GOOGLE_CLOUD_PROJECT gcloud compute instances create sp-search-2 \ --zone=$SUBNET_ZONE_2 \ --machine-type=n1-standard-8 \ --boot-disk-size=200 \ --boot-disk-type=pd-ssd \ --subnet=$SUBNET_NAME \ --tags=sharepoint,sharepoint-search \ --image=sharepoint \ --image-project=$GOOGLE_CLOUD_PROJECT
查看最後一個 VM 的序列埠輸出內容,監控初始化程序:
gcloud compute instances tail-serial-port-output sp-search-2 --zone=$SUBNET_ZONE_2
等待約 2 分鐘,直到看到輸出內容
Instance setup finished
,然後按下 Ctrl+C。此時,VM 執行個體已可供使用。針對六個 VM 執行個體,分別執行下列步驟:
- 建立 VM 執行個體的使用者名稱和密碼。
- 使用遠端桌面連線至 VM,並使用上一步建立的使用者名稱和密碼登入。
- 以滑鼠右鍵按一下「開始」按鈕 (或按下 Win+X 鍵),然後按一下「Windows PowerShell (系統管理員)」。
- 按一下「是」,確認提升權限提示。
將電腦加入 Active Directory 網域:
Add-Computer -Domain DOMAIN
將 DOMAIN 換成 Active Directory 網域的 DNS 名稱。
重新啟動電腦:
Restart-Computer
等待約 1 分鐘,讓裝置完成重新啟動。
建立 SharePoint 伺服器
現在,您可以使用自訂映像檔,為 SharePoint 伺服器陣列建立 VM 執行個體。
VM 執行個體使用 n1-standard-8
機器類型。視您打算如何使用 SharePoint 伺服器陣列而定,您可能需要使用較大的機器類型。請參閱硬體需求,進一步分析您的需求和系統需求:
設定負載平衡
如要讓用戶端使用單一虛擬 IP 位址存取 SharePoint,請使用內部負載平衡器。負載平衡器會將要求分配至兩個前端伺服器 sp-frontend-1
和 sp-frontend-2
。
如要將兩個前端伺服器與負載平衡器建立關聯,請先建立兩個執行個體群組,然後將這些執行個體群組指派給負載平衡器:
- 返回現有的 Cloud Shell 工作階段。
在每個區域中建立一個非代管執行個體群組:
gcloud compute instance-groups unmanaged create sp-frontend-1 --zone=$SUBNET_ZONE_1 gcloud compute instance-groups unmanaged create sp-frontend-2 --zone=$SUBNET_ZONE_2
將執行前端伺服器的 VM 執行個體新增至執行個體群組:
gcloud compute instance-groups unmanaged add-instances sp-frontend-1 \ --instances sp-frontend-1 \ --zone=$SUBNET_ZONE_1 gcloud compute instance-groups unmanaged add-instances sp-frontend-2 \ --instances sp-frontend-2 \ --zone=$SUBNET_ZONE_2
建立健康狀態檢查,探測 Sharepoint 的 HTTP 路徑:
gcloud compute health-checks create tcp sp-health-check --port 80
建立負載平衡器後端,並新增兩個執行個體群組:
gcloud compute backend-services create sp-backend \ --load-balancing-scheme internal \ --region=$SUBNET_REGION \ --health-checks sp-health-check \ --protocol=tcp gcloud compute backend-services add-backend sp-backend \ --instance-group=sp-frontend-1 \ --instance-group-zone=$SUBNET_ZONE_1 \ --region=$SUBNET_REGION gcloud compute backend-services add-backend sp-backend \ --instance-group=sp-frontend-2 \ --instance-group-zone=$SUBNET_ZONE_2 \ --region=$SUBNET_REGION
為負載平衡器保留靜態 IP 位址:\
gcloud compute addresses create sp-frontend \ --region=$SUBNET_REGION \ --subnet=$SUBNET_NAME
為負載平衡器建立轉寄規則:
gcloud compute forwarding-rules create sp-frontend \ --load-balancing-scheme=internal \ --ports=80 \ --network=$VPC_NAME \ --subnet=$SUBNET_NAME \ --region=$SUBNET_REGION \ --address=sp-frontend \ --backend-service=sp-backend
建立防火牆規則,允許流量從負載平衡器傳入後端服務:
gcloud compute firewall-rules create allow-http-health-checks \ --network=$VPC_NAME --allow tcp:80 \ --source-ranges=130.211.0.0/22,35.191.0.0/16 \ --target-tags="sharepoint-frontend"
來源範圍是內部負載平衡器的 IP 範圍。詳情請參閱設定防火牆規則以允許內部負載平衡。
查詢負載平衡器的 IP 位址:
gcloud compute addresses describe sp-frontend \ --region=$SUBNET_REGION \ --format=value\(address\)
部署 SharePoint 伺服器陣列後,您會需要這個 IP 位址。
在 DNS 中註冊負載平衡器
如要允許用戶端使用使用者可讀取的網址存取 SharePoint,請在 DNS 中為負載平衡器註冊名稱:
sp-app-1
使用遠端桌面連線,並以DnsAdmins
群組成員的身分登入。- 在「開始」按鈕上按一下滑鼠右鍵 (或按下 Win+X 鍵),然後按一下「Windows PowerShell」。
建立記錄,將名稱
sharepoint
對應至負載平衡器的 IP 位址:Add-DnsServerResourceRecordA ` -ComputerName (Get-ADDomainController).Hostname ` -Name "sharepoint" ` -ZoneName "DOMAIN" ` -IPv4Address LOADBALANCER-IP
其中:
- LOADBALANCER-IP 是負載平衡器的 IP 位址。
- DOMAIN 是 Active Directory 網域的 DNS 網域。
建立 SharePoint 伺服器陣列
雖然這六部伺服器都已安裝所有必要軟體套件,但尚未加入 SharePoint 伺服器陣列。現在請建立伺服器群組,並指派角色,將伺服器新增至伺服器群組。
建立農場服務帳戶
如要建立 SharePoint 伺服器陣列,請建立伺服器陣列服務帳戶。伺服器陣列服務帳戶是 Active Directory 使用者帳戶,用於執行 SharePoint 服務及存取 SQL Server。
如要進一步瞭解伺服器陣列服務帳戶,請參閱「SharePoint Server 中的帳戶權限和安全性設定」。
如要在 Active Directory 中建立伺服器陣列服務帳戶,請按照下列步驟操作:
- 返回
sp-app-1
的 PowerShell 提示。 為伺服器陣列服務帳戶定義密碼:
$FarmServicePassword = Read-Host -Prompt "Enter password for Farm service account" -AsSecureString
在 Active Directory 中建立伺服器陣列服務帳戶:
New-ADUser ` -Name "SharePoint Service" ` -SamAccountName sp-farm ` -UserPrincipalName "sp-farm@$((Get-ADDomain).DNSRoot)" ` -AccountPassword $FarmServicePassword ` -PassThru | Enable-ADAccount
為
sp-farm
建立登入帳戶,授予伺服器陣列服務帳戶 SQL Server 存取權。設定登入時使用 Windows 驗證,這樣就不必指派新密碼。
設定第一個伺服器
現在請設定第一個伺服器,建立 SharePoint 伺服器陣列。第一個伺服器很特別,因為它代管中央管理網站。稍後您會使用這個網站設定伺服器陣列。
- 返回
sp-app-1
的 RDP 工作階段。 - 依序點選「開始」 >「Microsoft SharePoint 產品」 >「SharePoint 產品設定精靈」。
- 請按照「建立及設定伺服器陣列」一文中的步驟操作:
- 在「Specify Configuration Database Settings」(指定設定資料庫設定) 頁面中,指定您先前建立的
sp-farm
使用者名稱和密碼。 - 在「Specify Server Role」(指定伺服器角色) 頁面中,選取「Application」(應用程式)。
- 在「Configure SharePoint Central Administration Web Application」(設定 SharePoint 中央管理中心 Web 應用程式) 頁面中,指定連接埠
8000
。 - 設定完成後,瀏覽器視窗會開啟。關閉視窗,並略過其餘步驟。
- 在「Specify Configuration Database Settings」(指定設定資料庫設定) 頁面中,指定您先前建立的
- 依序點選「開始」 >「Microsoft SharePoint 產品」 >「SharePoint 管理命令介面」。
套用待處理的 SharePoint 更新:
PSConfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures
設定其餘伺服器
現在,您可以將其餘伺服器新增至 SharePoint 伺服器陣列。
VM 執行個體 | 角色 |
---|---|
sp-app-2 |
應用程式 |
sp-frontend-1 |
前端與分散式快取 |
sp-frontend-2 |
前端與分散式快取 |
sp-search-1 |
搜尋 |
sp-search-2 |
搜尋 |
針對每個 VM 執行下列操作:
- 使用遠端桌面連線至 VM,然後以網域管理員使用者身分登入。
- 依序點選「開始」 >「Microsoft SharePoint 產品」 >「SharePoint 產品設定精靈」。
- 在「Welcome to SharePoint Products」(歡迎使用 SharePoint 產品) 頁面中,按一下「Next」(下一步)。
- 在對話方塊中,按一下「是」,確認設定期間可能需要重新啟動部分服務。
- 在「連線至伺服器群組」頁面中,選取「連線至現有伺服器群組」。
- 在「Specify configuration database settings」(指定設定資料庫設定) 頁面中,指定您用於第一個伺服器的資料庫伺服器和資料庫名稱。
- 在下一頁中,輸入先前定義的密碼片語。
- 在「Specify server role」(指定伺服器角色) 頁面中,選取與 VM 對應的角色,然後按一下「Next」(下一步)。
- 在「Completing the SharePoint products configuration wizard」頁面,確認設定並按一下「Next」。
在「設定成功」頁面中,按一下「完成」。
關閉瀏覽器視窗。
依序點選「開始」 >「Microsoft SharePoint 產品」 >「SharePoint 管理中心」
套用待處理的 SharePoint 更新:
PSConfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures
設定伺服器陣列
現在請使用 SharePoint 設定精靈,完成伺服器陣列的設定:
sp-app-1
使用遠端桌面連線。- 依序點選「開始」 >「Google Chrome」,開啟 Chrome 瀏覽器。
- 前往「
http://sp-app-1:8000/configurationwizards.aspx
」 - 使用網域管理員使用者登入。
- 選取「啟動伺服器陣列設定精靈」。
- 在「歡迎」頁面中,選取「啟動精靈」。
- 在「Service Applications and Services」(服務應用程式和服務) 頁面中,按一下「Use existing managed account」(使用現有受管理帳戶),然後選取
sp-farm
使用者。 - 確認要安裝的服務清單,並根據需求自訂選取項目。
選取「下一步」,開始設定程序。
整個程序大約需要 10 到 15 分鐘才能完成。
在「建立網站集合」頁面中,指定標題並選取範本,然後按一下「確定」。如要進一步瞭解如何建立網站,請參閱「使用管理中心建立網站集合」。
在「This completes the Farm Configuration Wizard」(這表示 Farm 設定精靈已完成) 頁面中,選取「Finish」(完成)。
在中央管理首頁上,依序選取「系統設定」 >「管理伺服器陣列中的伺服器」。
確認所有伺服器都標示為「符合規定」,且狀態標示為「不須採取任何行動」。
如要進一步瞭解如何管理 SharePoint 伺服器陣列,請參閱「在 SharePoint Server 2016 和 2019 中管理 MinRole 伺服器陣列」
設定替代存取對應
如要允許使用者透過負載平衡器的 DNS 名稱存取 SharePoint 網站,請設定替代存取對應:
- 在中央管理首頁上,依序選取「系統設定」 >「設定替代存取對應」。
- 在「Alternate Access Mapping Collection」(替代存取對應集合) 旁邊,依序選取「Show All」(顯示全部) >「Change alternate access mapping collection」(變更替代存取對應集合)。
- 在「Select alternate access mapping collection」(選取替代存取對應集合) 對話方塊中,選取「SharePoint - 80」。
- 選取「編輯公開網址」。
設定下列對應:
預設:
http://sharepoint.DOMAIN
其中 DOMAIN 是 Active Directory 網域的 DNS 網域。
清除所有其他欄位。
按一下 [儲存]。
以滑鼠右鍵按一下「開始」按鈕 (或按下 Win+X 鍵),然後按一下「Windows PowerShell (系統管理員)」。
如要讓替代存取對應生效,請在所有伺服器上重新啟動 IIS:
"sp-app-1", "sp-app-2", "sp-frontend-1", "sp-frontend-2", "sp-search-1", "sp-search-2" | % { & iisreset $_ }
SharePoint 伺服器陣列現在已可使用。
測試 SharePoint 網站
如要確認您可以使用負載平衡器的 DNS 名稱存取 SharePoint 網站,請按照下列步驟操作:
在 Chrome 中前往下列網址:
http://sharepoint.DOMAIN
將 DOMAIN 替換為 Active Directory 網域的 DNS 網域。
使用管理網域使用者登入。
由於這是您第一次開啟網站,網站初始化作業需要幾分鐘才能完成。
確認您看到 SharePoint 網站的首頁。
在「文件」下方,選取「上傳」。
選取要上傳至網站的測試文件。如果沒有可供測試的文件,可以使用空白的 RTF 文件 (
.rtf
)。按一下「確定」上傳文件。
SharePoint 會定期檢索文件,更新搜尋索引。如要避免等待系統執行檢索,請手動啟動檢索:
- 在
sp-app-1
上,依序點選「開始」 >「Microsoft SharePoint 產品」 >「SharePoint 管理命令介面」。 開始完整檢索:
$Crawler = (Get-SPEnterpriseSearchServiceApplication |Get-SPEnterpriseSearchCrawlContentSource) $Crawler.StartFullCrawl()
請等待約 5 分鐘,讓系統在背景完成檢索程序。
現在您可以搜尋先前上傳的文件,確認 SharePoint 搜尋功能是否正常運作:
- 返回 Chrome 和 SharePoint 網站。
- 使用搜尋框搜尋您上傳的檔案名稱。
- 確認檔案會顯示在搜尋結果中。
清除所用資源
如要避免在完成本教學課程後繼續產生費用,請刪除您已建立的實體。
刪除 Google Cloud 專案
- In the Google Cloud console, go to the Manage resources page.
- In the project list, select the project that you want to delete, and then click Delete.
- In the dialog, type the project ID, and then click Shut down to delete the project.
後續步驟
- 探索 Google Cloud 的參考架構、圖表和最佳做法。 歡迎瀏覽我們的雲端架構中心。