在 Compute Engine 上部署 Microsoft SharePoint Server


本教程介绍如何在 Compute Engine 上部署 Microsoft SharePoint Server。本指南适用于 Microsoft SharePoint Server 2016 和 Microsoft SharePoint Server 2019。

SharePoint 部署将在两个地区中使用六台服务器。此设置对应于中高可用性(针对搜索优化的)MinRole 服务器场拓扑。

下图演示了该部署:

Microsoft Exchange 的部署

本文假定您已在 Google Cloud 上部署了 Active Directory 和 SQL Server,并且假定您已掌握 SharePoint Server、Active Directory 和 Compute Engine 的基础知识。

目标

  • 准备项目以部署 SharePoint Server。
  • 部署使用六台服务器的 MinRole SharePoint 服务器场

    • 两台具有分布式缓存的前端服务器
    • 两台应用服务器
    • 两台搜索服务器
  • 配置负载均衡和防火墙规则

费用

本教程使用 Google Cloud 的以下收费组件:

您可使用价格计算器根据您的预计使用情况来估算费用。

准备工作

如需完成本指南,您需要以下各项:

  • 至少具有一台网域控制器的现有 Active Directory 域。您可以使用 Managed Service for Microsoft Active Directory 或自行管理的 Active Directory 域。
  • 有权加入计算机、创建用户账号以及添加 DNS 记录的管理 Active Directory。
  • 连接到您的 Active Directory 域控制器的 Google Cloud 项目和 VPC。
  • 已加入 Active Directory 域并且可用于 SharePoint 的 SQL Server 实例。如需详细了解如何在 Google Cloud 上设置高可用性 SQL Server 部署,请参阅部署多子网 SQL Server 始终开启可用性组
  • SharePoint 虚拟机实例的子网。该子网必须至少跨越两个区域。

在开始部署之前,请先查看适用于 SharePoint Server 2016 和 2019 的系统要求

  1. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  2. 确保您的 Google Cloud 项目已启用结算功能

完成本文档中描述的任务后,您可以通过删除所创建的资源来避免继续计费。如需了解详情,请参阅清理

准备项目和网络

要准备 Google Cloud 项目和 VPC 以部署 SharePoint Server,请执行以下操作:

  1. 在 Google Cloud 控制台中切换到您的项目,然后打开 Cloud Shell。

    打开 Cloud Shell

  2. 初始化以下变量:

    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 是子网所在的地区。
  3. 设置默认项目 ID

    gcloud config set project PROJECT_ID
    

    PROJECT_ID 替换为您的 Google Cloud 项目的 ID。

创建防火墙规则

为了使 SharePoint 服务器场的各台服务器之间能够通信,您需要创建一些防火墙规则。如需简化这些防火墙规则的创建操作,您可以使用网络标记

  • 前端服务器由 sharepoint-frontend 标记注释。
  • 应用服务器由 sharepoint-application 标记注释。
  • 搜索服务器由 sharepoint-search 标记注释。
  • 此外,所有服务器还会由 sharepoint 标记注释。

创建使用这些网络标记并允许通过 SharePoint 所要求的端口进行通信的防火墙规则:

  1. 返回到现有的 Cloud Shell 会话。
  2. 为 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
    
  3. 创建一条允许所有服务器连接到 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 安装介质的磁盘。通过创建一个可挂接到多个虚拟机实例的磁盘,您不必将安装媒体单独下载到每个虚拟机实例上。

  1. 按照通过 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
    
  2. 使用新映像在第一个区域中创建磁盘:

    gcloud compute disks create sharepoint-media-1 \
      --zone=$SUBNET_ZONE_1 \
      --image-project=$GOOGLE_CLOUD_PROJECT \
      --image=IMAGE
    

    IMAGE 替换为您在上一步中创建的映像名称。

  3. 在第二个区域中创建磁盘:

    gcloud compute disks create sharepoint-media-2 \
      --zone=$SUBNET_ZONE_2 \
      --image-project=$GOOGLE_CLOUD_PROJECT \
      --image=IMAGE
    

    IMAGE 替换为您在第一步中创建的映像名称。

创建 SharePoint 映像

为了避免在所有服务器上重复地单独安装 SharePoint 组件,您现在可以创建自定义虚拟机映像。您稍后会将此虚拟机映像用作虚拟机模板来部署 SharePoint 服务器。

  1. 返回到现有的 Cloud Shell 会话。
  2. 为虚拟机实例创建专用脚本。该脚本将在虚拟机初始化期间运行并安装 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
    
  3. 创建虚拟机实例并为专用脚本值分配 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
     
  4. 通过查看虚拟机的串行端口输出来监控其初始化过程:

    gcloud compute instances tail-serial-port-output sp-template --zone=$SUBNET_ZONE_1
    

    等待大约 10 分钟,直到您看到输出 Instance setup finished,然后按 Ctrl+C。此时,必备项的安装已完成,虚拟机实例已准备就绪,可以使用了。

  5. 为虚拟机实例创建用户名和密码

  6. 使用远程桌面连接到虚拟机,然后使用上一步中创建的用户名和密码登录。

  7. 右键点击开始按钮(或者按 Win+X),然后点击 Windows PowerShell(管理员)

  8. 点击以确认升级权限提示。

  9. 启动 SharePoint 安装程序:

    & d:\setup.exe
    
  10. 按照向导的说明操作。当系统提示您输入产品密钥时,请使用 SharePoint 下载页面上的安装说明下列出的企业版试用产品密钥,或者使用您已拥有的密钥。

  11. 安装完成后,点击关闭

  12. 在 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
    
  13. 在 Chrome 中,下载并安装以下更新:

    SharePoint Server 2016

    1. Microsoft SharePoint Enterprise Server 2016 的安全更新 (KB4011127)
    2. Microsoft SharePoint Enterprise Server 2016 的更新 (KB4011053)

    3. 如果需要,请检查并安装其他更新

    SharePoint Server 2019

    1. 如果需要,请检查并安装更新
  14. 返回到 PowerShell 控制台并泛化映像

    & gcesysprep
    

    该命令会自动关停虚拟机。等待此过程完成,大约需要 5 分钟。

  15. 在 Cloud Shell 中,通过虚拟机的启动磁盘创建虚拟机映像:

    gcloud compute images create sharepoint \
      --source-disk=sp-template \
      --source-disk-zone=$SUBNET_ZONE_1
    
  16. 删除虚拟机实例:

    gcloud compute instances delete sp-template --zone=$SUBNET_ZONE_1
    

创建虚拟机并将其加入 Active Directory

按照以下步骤为 SharePoint 服务器场创建虚拟机实例,然后将这些实例加入现有的 Active Directory 域:

  1. 返回到现有的 Cloud Shell 会话。
  2. 为前端服务器创建两个虚拟机实例:

    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
    
  3. 为应用服务器创建两个虚拟机实例:

    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"
    
  4. 为搜索服务器创建两个虚拟机实例:

    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
    
  5. 通过查看最后一个虚拟机的串行端口输出来监控其初始化过程:

    gcloud compute instances tail-serial-port-output sp-search-2 --zone=$SUBNET_ZONE_2
    

    等待大约 2 分钟,直到您看到输出 Instance setup finished,然后按 Ctrl+C。此时,该虚拟机实例已准备就绪,可以使用了。

  6. 对于这六个虚拟机实例中的每个实例,请执行以下步骤:

    1. 为虚拟机实例创建用户名和密码
    2. 使用远程桌面连接到虚拟机,然后使用上一步中创建的用户名和密码登录。
    3. 右键点击开始按钮(或者按 Win+X),然后点击 Windows PowerShell(管理员)
    4. 点击以确认升级权限提示。
    5. 将该计算机加入您的 Active Directory 域:

      Add-Computer -Domain DOMAIN
      

      DOMAIN 替换为您的 Active Directory 域的 DNS 名称。

    6. 重启该计算机:

      Restart-Computer
      

      等待重启过程完成,大约需要 1 分钟。

创建 SharePoint 服务器

您现在可以使用自定义映像为 SharePoint 服务器场创建虚拟机实例。

虚拟机实例使用 n1-standard-8 机器类型。根据您计划使用 SharePoint 服务器场的方式,您可能需要使用较大的机器类型。请参阅硬件要求,详细分析您的需求及其系统要求:

设置负载均衡

如需使客户端能够使用单个虚拟 IP 地址访问 SharePoint,您可以使用内部负载均衡器。该负载均衡器会在两台前端服务器 sp-frontend-1sp-frontend-2 之间分配请求。

如需将这两台前端服务器与负载均衡器相关联,请先创建两个实例组,然后将这些实例组分配到负载均衡器:

  1. 返回到现有的 Cloud Shell 会话。
  2. 为每个区域创建一个非托管实例组

    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
    
  3. 将运行前端服务器的虚拟机实例添加到实例组:

    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
    
  4. 创建健康检查,用于探测 SharePoint 的 HTTP 路径:

    gcloud compute health-checks create tcp sp-health-check --port 80
    
  5. 创建一个负载均衡器后端并添加这两个实例组:

    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
    
  6. 为负载均衡器预留静态 IP 地址:\

    gcloud compute addresses create sp-frontend \
      --region=$SUBNET_REGION \
      --subnet=$SUBNET_NAME
    
  7. 为负载均衡器创建转发规则:

    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
    
  8. 创建防火墙规则,以允许从负载均衡器传入后端服务的流量:

    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 地址范围。如需了解详情,请参阅配置防火墙规则以允许内部负载均衡

  9. 查找负载均衡器的 IP 地址:

    gcloud compute addresses describe sp-frontend \
      --region=$SUBNET_REGION \
      --format=value\(address\)
    

    部署 SharePoint 服务器场后,您需要用到此 IP 地址。

在 DNS 中注册负载均衡器

如需允许客户端使用人类可读的网址访问 SharePoint,请在 DNS 中为负载均衡器注册一个名称:

  1. 使用远程桌面连接到 sp-app-1,然后以 DnsAdmins 群组成员用户的身份登录。
  2. 右键点击开始按钮(或者按 Win+X),然后点击 Windows PowerShell
  3. 创建一条记录,用于将名称 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 服务器中的账户权限和安全设置

如需在 Active Directory 中创建服务器场服务账号,请执行以下操作:

  1. sp-app-1 上返回到 PowerShell 提示符。
  2. 为服务器场服务账号定义密码:

    $FarmServicePassword = Read-Host -Prompt "Enter password for Farm service account" -AsSecureString
    
  3. 在 Active Directory 中创建服务器场服务账号:

    New-ADUser `
      -Name "SharePoint Service" `
      -SamAccountName sp-farm  `
      -UserPrincipalName "sp-farm@$((Get-ADDomain).DNSRoot)" `
      -AccountPassword $FarmServicePassword `
      -PassThru | Enable-ADAccount
    
  4. 通过为 sp-farm 创建登录信息,向服务器场服务账号授予对 SQL Server 的访问权限。请将登录信息配置为使用 Windows 身份验证,这样您就无需分配新密码。

配置第一台服务器

现在,您可以通过配置第一台服务器来创建 SharePoint 服务器场。第一台服务器是特殊的服务器,因为它托管核心管理网站。您稍后将使用此网站来配置服务器场。

  1. sp-app-1 上返回到 RDP 会话。
  2. 点击开始 > Microsoft SharePoint 产品 > SharePoint 产品配置向导
  3. 按照创建和配置服务器场中的步骤操作:
    1. 指定配置数据库设置页面上,指定您之前创建的 sp-farm 用户的名称和密码。
    2. 指定服务器角色页面上,选择应用程序
    3. 配置 SharePoint 管理中心 Web 应用程序页面上,指定端口 8000
    4. 配置完成后,系统会打开一个浏览器窗口。关闭窗口并跳过其余步骤。
  4. 点击开始 > Microsoft SharePoint 产品 > SharePoint Management Shell
  5. 应用尚未安装的 SharePoint 更新:

    PSConfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures
    

配置其余服务器

您现在可以将其余服务器添加到 SharePoint 服务器场。

虚拟机实例 角色
sp-app-2 应用
sp-frontend-1 具有分布式缓存的前端
sp-frontend-2 具有分布式缓存的前端
sp-search-1 搜索
sp-search-2 搜索

对于每个虚拟机,请执行以下操作:

  1. 使用远程桌面连接到虚拟机,然后以网域管理员用户的身份登录。
  2. 点击开始 > Microsoft SharePoint 产品 > SharePoint 产品配置向导
  3. 欢迎使用 SharePoint 产品页面上,点击下一步
  4. 在通知您某些服务在配置期间可能必须重启的对话框中,点击
  5. 连接到服务器场页面上,选择连接到现有服务器场
  6. 指定配置数据库设置页面上,指定您用于第一台服务器的数据库服务器和数据库名称。
  7. 在下一页上,输入您之前定义的密码。
  8. 指定服务器角色页面上,选择与虚拟机对应的角色,然后点击下一步
  9. 正在完成 SharePoint 产品配置向导页面上,确认您的配置,然后点击下一步
  10. 配置成功页面上,点击完成

  11. 关闭浏览器窗口。

  12. 点击开始 > Microsoft SharePoint 产品 > SharePoint Management Shell

  13. 应用尚未安装的 SharePoint 更新:

    PSConfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures
    

配置服务器场

您现在可以使用 SharePoint 配置向导完成服务器场的配置:

  1. 使用远程桌面连接到 sp-app-1
  2. 点击开始 > Google Chrome 以打开 Chrome 浏览器。
  3. 导航到 http://sp-app-1:8000/configurationwizards.aspx
  4. 以网域管理员用户身份登录。
  5. 选择 Launch the Farm Configuration Wizard
  6. Welcome 页面上,选择 Start the Wizard
  7. Service Applications and Services 页面上,点击 Use existing managed account,然后选择 sp-farm 用户。
  8. 验证要安装的服务列表,然后根据您的要求自定义选项。
  9. 选择 Next 以开始配置过程。

    该过程大约需要 10 到 15 分钟才能完成。

  10. Create Site Collection 页面上,指定标题并选择模板,然后点击 OK。如需详细了解如何创建网站,请参阅使用管理中心创建网站集

  11. This completes the Farm Configuration Wizard 页面上,选择 Finish

  12. 在“Central Administration”首页,选择 System Settings > Manage servers in farm

  13. 验证所有服务器是否已标记为 Compliant 以及状态是否已标记为 No Action Required

如需详细了解如何管理 SharePoint 服务器场,请参阅管理 SharePoint Server 2016 和 SharePoint Server 2019 中的 MinRole 服务器场

配置备用访问映射

如需允许用户使用负载均衡器的 DNS 名称访问 SharePoint 网站,您现在需要配置备用访问映射:

  1. 在“Central Administration”首页,选择 System Settings > Configure alternate access mappings
  2. Alternate Access Mapping Collection 旁边,选择 Show All > Change alternate access mapping collection
  3. Select alternate access mapping collection 对话框中,选择 SharePoint - 80
  4. 选择 Edit public URLs
  5. 配置以下映射:

    1. 默认

      http://sharepoint.DOMAIN
      

      其中 DOMAIN 是您的 Active Directory 域的 DNS 网域。

    2. 清除所有其他字段。

  6. 点击保存

  7. 右键点击开始按钮(或者按 Win+X),然后点击 Windows PowerShell(管理员)

  8. 如需使备用访问映射生效,请在所有服务器上重启 IIS:

    "sp-app-1", "sp-app-2", "sp-frontend-1", "sp-frontend-2", "sp-search-1", "sp-search-2" | %  { & iisreset $_ }
    

您的 SharePoint 服务器场现在已准备就绪,可以使用了。

测试 SharePoint 网站

如需验证您是否可以使用负载均衡器的 DNS 名称访问 SharePoint 网站,请按照以下步骤操作:

  1. 在 Chrome 中,导航到以下地址:

    http://sharepoint.DOMAIN
    

    DOMAIN 替换为您的 Active Directory 域的 DNS 网域。

  2. 以网域管理用户身份登录。

    由于这是您第一次打开该网站,因此该网站需要花费几分钟时间来完成初始化过程。

  3. 验证您是否看到自己的 SharePoint 网站首页。

  4. 文档下,选择上传

  5. 选择要上传到该网站的测试文档。如果您没有可供测试的文档,可以使用空的富文本文档 (.rtf)。

  6. 点击确定以上传文档。

SharePoint 会定期抓取文档以更新其搜索索引。如需避免等待 SharePoint 抓取文档,请手动启动抓取操作:

  1. sp-app-1 上,点击开始 > Microsoft SharePoint 产品 > SharePoint Management Shell
  2. 启动完整抓取操作:

    $Crawler = (Get-SPEnterpriseSearchServiceApplication |Get-SPEnterpriseSearchCrawlContentSource)
    $Crawler.StartFullCrawl()
    

等待抓取过程在后台完成,大约需要 5 分钟。

您现在可以通过搜索之前上传的文档来验证 SharePoint 搜索功能是否正常:

  1. 返回到 Chrome 和 SharePoint 网站。
  2. 使用搜索框搜索您上传的文件的文件名。
  3. 验证该文件是否显示在搜索结果中。

清理

学完本教程后,请删除您创建的实体,避免日后再为这些资源付费。

删除 Google Cloud 项目

  1. In the Google Cloud console, go to the Manage resources page.

    Go to Manage resources

  2. In the project list, select the project that you want to delete, and then click Delete.
  3. In the dialog, type the project ID, and then click Shut down to delete the project.

后续步骤

  • 探索有关 Google Cloud 的参考架构、图表和最佳做法。查看我们的 Cloud 架构中心