本教學課程說明如何在 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 網域控制站的專案和 VPC。
- 已加入 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.
-
Make sure that billing is enabled for your Google Cloud project.
完成本文件所述工作後,您可以刪除已建立的資源,避免繼續計費。詳情請參閱「清除所用資源」。
準備專案和網路
如要為 SharePoint Server 部署作業準備 Google Cloud 專案和虛擬私有雲,請執行下列操作:
在 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 替換為您的 Google Cloud 專案 ID。
建立防火牆規則
如要讓 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.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 的序列埠輸出內容,監控 VM 的初始化程序:
gcloud compute instances tail-serial-port-output sp-template --zone=$SUBNET_ZONE_1
請等候約 10 分鐘,直到您看到輸出
Instance setup finished
為止,然後按下 Ctrl+C。此時,安裝必備條件已完成,VM 執行個體也已準備就緒,可供使用。為 VM 執行個體建立使用者名稱和密碼
使用遠端桌面連線至 VM,然後使用上一步中建立的使用者名稱和密碼登入。
在「開始」按鈕上按一下滑鼠右鍵 (或按下 Win + X 鍵),然後按一下「Windows PowerShell (系統管理員)」。
按一下「是」,確認權限提升提示。
啟動 SharePoint 安裝程式:
& d:\setup.exe
按照精靈中的操作說明操作。系統提示輸入產品金鑰時,請使用 Sharepoint 下載頁面「安裝說明」下方列出的「Enterprise 試用版產品金鑰」,或使用您已擁有的金鑰。
安裝完成後,按一下「關閉」。
在 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 伺服器叢集,您必須建立叢集服務帳戶。叢集服務帳戶是用來執行 SharePoint 服務及存取 SQL Server 的 Active Directory 使用者帳戶。
如要進一步瞭解服務帳戶,請參閱「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 產品設定精靈」。
- 請按照「建立及設定農場」一文中的步驟操作:
- 在「指定設定資料庫設定」頁面中,指定您先前建立的
sp-farm
使用者名稱和密碼。 - 在「指定伺服器角色」頁面中,選取「應用程式」。
- 在「Configure SharePoint Central Administration Web Application」(設定 SharePoint 中央管理員網站應用程式) 頁面中指定
8000
連接埠。 - 設定完成後,系統會開啟瀏覽器視窗。關閉視窗並略過其餘步驟。
- 在「指定設定資料庫設定」頁面中,指定您先前建立的
- 依序按一下「開始」 >「Microsoft SharePoint 產品」 >「SharePoint 管理員 Shell」。
套用待處理的 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 產品設定精靈」。
- 在「歡迎使用 SharePoint 產品」頁面中,按一下「下一步」。
- 在通知您在設定期間可能需要重新啟動部分服務的對話方塊中,按一下「是」。
- 在「連線至伺服器叢集」頁面上,選取「連線至現有的伺服器叢集」。
- 在「指定設定資料庫設定」頁面中,指定與第一個伺服器相同的資料庫伺服器和資料庫名稱。
- 在下一頁中,輸入先前定義的密碼短句。
- 在「指定伺服器角色」頁面中,選取與 VM 相對應的角色,然後按一下「Next」。
- 在「完成 SharePoint 產品設定精靈」頁面上,確認設定,然後按一下「下一步」。
在「設定成功」頁面中,按一下「完成」。
關閉瀏覽器視窗。
依序按一下「開始」 >「Microsoft SharePoint 產品」 >「SharePoint 管理員 Shell」
套用待處理的 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
- 使用網域管理員使用者登入。
- 選取「Launch the Farm Configuration Wizard」。
- 在「歡迎」頁面中,選取「啟動精靈」。
- 在「Service Applications and Services」頁面中,按一下「Use existing managed account」,然後選取
sp-farm
使用者。 - 確認要安裝的服務清單,並根據需求自訂選項。
選取「下一步」開始設定程序。
整個程序大約需要 10 到 15 分鐘才能完成。
在「Create Site Collection」頁面中,指定標題並選取範本,然後按一下「OK」。如要進一步瞭解如何建立網站,請參閱「使用中央管理工具建立網站集合」。
在「This completes the Farm Configuration Wizard」頁面上,選取「Finish」。
在「中央管理」首頁上,依序選取「系統設定」 >「管理農場中的伺服器」。
確認所有伺服器都已標示為「符合規定」,且狀態標示為「無須採取任何行動」。
如要進一步瞭解如何管理 SharePoint 伺服器叢集,請參閱「在 SharePoint Server 2016 和 2019 中管理 MinRole 伺服器叢集」
設定其他存取對應
如要讓使用者使用負載平衡器的 DNS 名稱存取 SharePoint 網站,請現在設定替代存取對應項目:
- 在「中央管理」首頁上,依序選取「系統設定」 >「設定其他存取權限對應」。
- 在「Alternate Access Mapping Collection」旁邊,依序選取「Show All」 >「Change 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
)。按一下「確定」上傳文件。
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 的參考架構、圖表和最佳做法。歡迎瀏覽我們的雲端架構中心。