Azure 中的 SharePoint Intranet 服务器场,第 1 阶段:配置 Azure

适用于:no-img-132013 yes-img-162016 no-img-192019 no-img-seSubscription Edition no-img-sopSharePoint in Microsoft 365

在将 Intranet 专用 SharePoint Server 2016 场部署到 Azure 这一阶段中,可以构建 Azure 基础结构。 必须先完成这一阶段,然后才能移至Azure 中的 SharePoint Intranet 服务器场,第 2 阶段:配置域控制器。 有关所有阶段,请参阅在 Azure 中使用 SQL Server Always On 可用性组部署 SharePoint Server

必须为 Azure 设置这些基础的网络和存储组件:

  • 资源组

  • 使用子网托管 Azure 虚拟机的跨界虚拟网络

  • 执行子网隔离的网络安全组

  • 可用性集

  • 适用于 SharePoint 前端、分布式缓存以及 SQL Server 虚拟机的负载均衡器实例

配置 Azure 组件

开始配置 Azure 组件之前,请填写下表。 为了帮助你完成配置 Azure 的过程,请打印此部分并记下所需的信息,或将此部分复制到文档中进行填写。 有关 Azure 虚拟网络 (VNet) 的设置,请填写表 V。

项目 配置设置 说明
1. VNet 名称 要分配给 Azure 虚拟网络的名称(例如,SPFarmNet)。
2. VNet 位置 将包含虚拟网络的 Azure 数据中心。
3. VPN 设备 IP 地址 Internet 上 VPN 设备接口的公共 IPv4 地址。
4. VNet 地址空间 虚拟网络的地址空间。 与 IT 部门协作,以确定该地址空间。
5. IPsec 共享的密钥 一组 32 位字符的随机字母数字字符串,用于对站点间 VPN 连接的两端进行身份验证。 与 IT 或安全部门协作来确定此密钥值。 或者,请参阅创建 IPsec 预共享密钥的随机字符串

表 V:跨部署虚拟网络配置

接下来,填写针对此解决方案的子网的表 S。 所有地址空间应为无类别域际路由选择 (CIDR) 格式,也称为网络前缀格式。 例如,10.24.64.0/20。

对于前四个子网,请指定名称和基于虚拟网络地址空间的单个 IP 地址空间。 对于网关子网,请通过以下过程为 Azure 网关子网确定 27 位地址空间(带有 /27 前缀长度):

  1. 将 VNet 地址空间的可变位设置为 1,直到用于网关子网的位,然后将剩余位设置为 0。

  2. 将生成位转换为十进制并表示为一个地址空间,其中将前缀长度设置为网关子网的大小。

请参阅 Address space calculator for Azure gateway subnets(Azure 网关子网的地址空间计算器),了解执行此计算的 PowerShell 命令块和 C# 控制台应用程序。

与 IT 部门协作以确定这些虚拟网络地址空间中的地址空间。

项目 子网名称 子网地址空间 用途
1. Windows Server Active Directory (AD) VM 使用的子网。
2. SQL Server 群集中的 VM 使用的子网。
3. SharePoint 应用程序服务器和搜索服务器使用的子网。
4. 前端服务器和分布式缓存服务器使用的子网。
5. GatewaySubnet Azure 网关虚拟机使用的子网。

表 S:虚拟网络中的子网

下一步,针对分配给虚拟机和负载平衡器实例的静态 IP 地址填写表 I。

项目 用途 子网的 IP 地址
1. 第一个域控制器的静态 IP 地址 在表 S 的项目 1 中定义的子网地址空间的第四个可能的 IP 地址。
2. 第二个域控制器的静态 IP 地址 在表 S 的项目 1 中定义的子网地址空间的第五个可能的 IP 地址。
3. 针对前端服务器和分布式缓存 SharePoint 服务器的内部负载均衡器的静态 IP 地址 在表 S 的项目 4 中定义的子网地址空间的第六个可能的 IP 地址。
4. SQL Server 群集的监听器地址的内部负载平衡器的静态 IP 地址 在表 S 的项目 2 中定义的子网地址空间的第四个可能的 IP 地址。
5. 第一个 SQL Server 的静态 IP 地址 在表 S 的项目 2 中定义的子网地址空间的第五个可能的 IP 地址。
6. 第二个 SQL Server 的静态 IP 地址 在表 S 的项目 2 中定义的子网地址空间的第六个可能的 IP 地址。
7. 少数节点服务器的静态 IP 地址
请注意,如果使用的是云见证,则不需要使用它。
在表 S 的项目 2 中定义的子网地址空间的第七个可能的 IP 地址。
8. 第一个应用程序服务器和搜索 SharePoint 服务器的静态 IP 地址 在表 S 的项目 3 中定义的子网地址空间的第四个可能的 IP 地址。
9. 第二个应用程序服务器和搜索 SharePoint 服务器的静态 IP 地址 在表 S 的项目 3 中定义的子网地址空间的第五个可能的 IP 地址。
10. 第一个前端服务器和分布式缓存 SharePoint 服务器的静态 IP 地址 在表 S 的项目 4 中定义的子网地址空间的第四个可能的 IP 地址。
11. 第二个前端服务器和分布式缓存 SharePoint 服务器的静态 IP 地址 在表 S 的项目 4 中定义的子网地址空间的第五个可能的 IP 地址。

表 I:虚拟网络中的静态 IP 地址

对于本地网络中最初设置域控制器时要使用的两个域名系统 (DNS) 服务器,请填写表 D。请注意,列出了两个空白条目,但可以添加更多条目。 请与 IT 部门协作确定此列表。

项目 DNS 服务器的友好名称 DNS 服务器的 IP 地址
1.
2.

表 D:本地 DNS 服务器

注意

如果使用 Microsoft Entra 域服务 作为作为域副本运行的虚拟机,则不需要这些 DNS 服务器 IP 地址。

若要通过站点到站点 VPN 连接将数据包从跨界网络路由到组织网络,必须使用本地网络配置虚拟网络,该网络包含以 CIDR 表示法 (地址空间列表,) 组织本地网络上的所有可访问位置。 定义本地网络的地址空间列表必须是唯一的,并且不得与其他虚拟网络或其他本地网络使用的地址空间重叠。

对于本地网络地址空间集,请填写表 L。请注意,列出了三个空白条目,但通常需要更多条目。 请与 IT 部门协作,确定此地址空间列表。

项目 本地网络地址空间
1.
2.
3.

表 L:本地网络的地址前缀

现在让我们开始构建 Azure 基础结构来托管你的 SharePoint 服务器场。

注意

[!注意] 下面的命令集使用最新版 Azure PowerShell。 请参阅 Get started with Azure PowerShell cmdlets(Azure PowerShell cmdlet 使用入门)。

首先,启动 Azure PowerShell 提示符并登录到你的帐户。

Connect-AzAccount

使用以下命令获得订阅名称。

Get-AzSubscription | Sort Name | Select Name

设置 Azure 订阅。 使用正确的名称替换引号内的所有内容(包括 < 和 > 字符)。

$subscr="<subscription name>"
Select-AzSubscription -SubscriptionName $subscr

接下来,为 Intranet SharePoint 服务器场创建新的资源组。 要确定唯一的一组资源组名称,请使用此命令列出现有的资源组。

Get-AzResourceGroup | Sort ResourceGroupName | Select ResourceGroupName

为一组唯一资源组名称填写下表。

项目 资源组名称 用途
1. 域控制器
2. 数据库群集服务器
3. 应用程序服务器和搜索服务器
4. 前端服务器和分布式缓存服务器
5. 基础结构元素

表 R:资源组

使用这些命令创建新的资源组。

$locName="<an Azure location, such as West US>"
$rgName="<Table R - Item 1 - Name column>"
New-AzResourceGroup -Name $rgName -Location $locName
$rgName="<Table R - Item 2 - Name column>"
New-AzResourceGroup -Name $rgName -Location $locName
$rgName="<Table R - Item 3 - Name column>"
New-AzResourceGroup -Name $rgName -Location $locName
$rgName="<Table R - Item 4 - Name column>"
New-AzResourceGroup -Name $rgName -Location $locName
$rgName="<Table R - Item 5 - Name column>"
New-AzResourceGroup -Name $rgName -Location $locName

接下来,创建 Azure 虚拟网络和其子网来托管你的 Intranet SharePoint 服务器场。

$rgName="<Table R - Item 5 - Resource group name column>"
$locName="<Azure location>"
$locShortName="<the location of the resource group in lowercase with spaces removed, example: westus>"
$vnetName="<Table V - Item 1 - Value column>"
$vnetAddrPrefix="<Table V - Item 4 - Value column>"
$dnsServers=@( "<Table D - Item 1 - DNS server IP address column>", "<Table D - Item 2 - DNS server IP address column>" )
# Create the subnets
$spSubnet1Name="<Table S - Item 1 - Subnet name column>"
$spSubnet1Prefix="<Table S - Item 1 - Subnet address space column>"
$spSubnet1=New-AzVirtualNetworkSubnetConfig -Name $spSubnet1Name -AddressPrefix $spSubnet1Prefix
$spSubnet2Name="<Table S - Item 2 - Subnet name column>"
$spSubnet2Prefix="<Table S - Item 2 - Subnet address space column>"
$spSubnet2=New-AzVirtualNetworkSubnetConfig -Name $spSubnet2Name -AddressPrefix $spSubnet2Prefix
$spSubnet3Name="<Table S - Item 3 - Subnet name column>"
$spSubnet3Prefix="<Table S - Item 3 - Subnet address space column>"
$spSubnet3=New-AzVirtualNetworkSubnetConfig -Name $spSubnet3Name -AddressPrefix $spSubnet3Prefix
$spSubnet4Name="<Table S - Item 4 - Subnet name column>"
$spSubnet4Prefix="<Table S - Item 4 - Subnet address space column>"
$spSubnet4=New-AzVirtualNetworkSubnetConfig -Name $spSubnet4Name -AddressPrefix $spSubnet4Prefix
$gwSubnet5Prefix="<Table S - Item 5 - Subnet address space column>"
$gwSubnet=New-AzVirtualNetworkSubnetConfig -Name "GatewaySubnet" -AddressPrefix $gwSubnet5Prefix
# Create the virtual network
New-AzVirtualNetwork -Name $vnetName -ResourceGroupName $rgName -Location $locName -AddressPrefix $vnetAddrPrefix -Subnet $gwSubnet,$spSubnet1,$spSubnet2,$spSubnet3,$spSubnet4 -DNSServer $dnsServers

接下来,为每个包含虚拟机的子网创建网络安全组。 若要执行子网隔离,可以添加规则,指定允许或拒绝进入子网的网络安全组的特定类型流量。

# Create network security groups
$vnet=Get-AzVirtualNetwork -ResourceGroupName $rgName -Name $vnetName
New-AzNetworkSecurityGroup -Name $spSubnet1Name -ResourceGroupName $rgName -Location $locShortName
$nsg=Get-AzNetworkSecurityGroup -Name $spSubnet1Name -ResourceGroupName $rgName
Set-AzVirtualNetworkSubnetConfig -VirtualNetwork $vnet -Name $spSubnet1Name -AddressPrefix $spSubnet1Prefix -NetworkSecurityGroup $nsg
New-AzNetworkSecurityGroup -Name $spSubnet2Name -ResourceGroupName $rgName -Location $locShortName
$nsg=Get-AzNetworkSecurityGroup -Name $spSubnet2Name -ResourceGroupName $rgName
Set-AzVirtualNetworkSubnetConfig -VirtualNetwork $vnet -Name $spSubnet2Name -AddressPrefix $spSubnet2Prefix -NetworkSecurityGroup $nsg
New-AzNetworkSecurityGroup -Name $spSubnet3Name -ResourceGroupName $rgName -Location $locShortName
$nsg=Get-AzNetworkSecurityGroup -Name $spSubnet3Name -ResourceGroupName $rgName
Set-AzVirtualNetworkSubnetConfig -VirtualNetwork $vnet -Name $spSubnet3Name -AddressPrefix $spSubnet3Prefix -NetworkSecurityGroup $nsg
New-AzNetworkSecurityGroup -Name $spSubnet4Name -ResourceGroupName $rgName -Location $locShortName
$nsg=Get-AzNetworkSecurityGroup -Name $spSubnet4Name -ResourceGroupName $rgName
Set-AzVirtualNetworkSubnetConfig -VirtualNetwork $vnet -Name $spSubnet4Name -AddressPrefix $spSubnet4Prefix -NetworkSecurityGroup $nsg
$vnet | Set-AzVirtualNetwork

下一步,请使用这些命令来创建站点间 VPN 连接的网关。

$rgName="<Table R - Item 5 - Resource group name column>"
$locName="<Azure location>"
$vnetName="<Table V - Item 1 - Value column>"
$vnet=Get-AzVirtualNetwork -Name $vnetName -ResourceGroupName $rgName
$subnet=Get-AzVirtualNetworkSubnetConfig -VirtualNetwork $vnet -Name "GatewaySubnet"
# Attach a virtual network gateway to a public IP address and the gateway subnet
$publicGatewayVipName="SPPublicIPAddress"
$vnetGatewayIpConfigName="SPPublicIPConfig"
New-AzPublicIpAddress -Name $vnetGatewayIpConfigName -ResourceGroupName $rgName -Location $locName -AllocationMethod Dynamic
$publicGatewayVip=Get-AzPublicIpAddress -Name $vnetGatewayIpConfigName -ResourceGroupName $rgName
$vnetGatewayIpConfig=New-AzVirtualNetworkGatewayIpConfig -Name $vnetGatewayIpConfigName -PublicIpAddressId $publicGatewayVip.Id -Subnet $subnet
# Create the Azure gateway
$vnetGatewayName="SPAzureGateway"
$vnetGateway=New-AzVirtualNetworkGateway -Name $vnetGatewayName -ResourceGroupName $rgName -Location $locName -GatewayType Vpn -VpnType RouteBased -IpConfigurations $vnetGatewayIpConfig
# Create the gateway for the local network
$localGatewayName="SPLocalNetGateway"
$localGatewayIP="<Table V - Item 3 - Value column>"
$localNetworkPrefix=@( <comma-separated, double-quote enclosed list of the local network address prefixes from Table L, example: "10.1.0.0/24", "10.2.0.0/24"> )
$localGateway=New-AzLocalNetworkGateway -Name $localGatewayName -ResourceGroupName $rgName -Location $locName -GatewayIpAddress $localGatewayIP -AddressPrefix $localNetworkPrefix
# Define the Azure virtual network VPN connection
$vnetConnectionName="SPS2SConnection"
$vnetConnectionKey="<Table V - Item 5 - Value column>"
$vnetConnection=New-AzVirtualNetworkGatewayConnection -Name $vnetConnectionName -ResourceGroupName $rgName -Location $locName -ConnectionType IPsec -SharedKey $vnetConnectionKey -VirtualNetworkGateway1 $vnetGateway -LocalNetworkGateway2 $localGateway

接下来,从此命令的显示内容中,记录用于虚拟网络的 Azure VPN 网关的公用 IPv4 地址。

Get-AzPublicIpAddress -Name $publicGatewayVipName -ResourceGroupName $rgName

接下来,请将本地 VPN 设备配置为连接到 Azure VPN 网关。 有关详细信息,请参阅配置 VPN 设备

若要配置本地 VPN 设备,需要以下各项:

  • Azure VPN 网关的公用 IPv4 地址。

  • 站点到站点 VPN 连接的 IPsec 预共享密钥(表 V - 第 5 项 - 值列)。

接下来,请确保虚拟网络的地址空间是可以从本地网络访问。 这通常是通过以下操作完成:将对应于虚拟网络地址空间的路由添加到 VPN 设备中,然后将该路由公布到组织网络中其余的路由基础结构。 与 IT 部门协作,以确定如何完成上述操作。

接下来,定义四个可用性集的名称。 填写表 A。

项目 用途 可用性集的名称
1. 域控制器
2. SQL Server
3. 应用程序服务器和搜索服务器
4. 前端服务器和分布式缓存服务器

表 A:可用性集

在第 2、3 和 4 阶段中创建虚拟机时,将需要这些名称。

通过这些 Azure PowerShell 命令创建可用性集。

$locName="<the Azure location of your resource group>"
$rgName="<Table R - Item 1 - Resource group name column>"
$avName="<Table A - Item 1 - Availability set name column>"
New-AzAvailabilitySet -ResourceGroupName $rgName -Name $avName -Location $locName -Sku Aligned  -PlatformUpdateDomainCount 5 -PlatformFaultDomainCount 2
$rgName="<Table R - Item 2 - Resource group name column>"
$avName="<Table A - Item 2 - Availability set name column>"
New-AzAvailabilitySet -ResourceGroupName $rgName -Name $avName -Location $locName -Sku Aligned  -PlatformUpdateDomainCount 5 -PlatformFaultDomainCount 2
$rgName="<Table R - Item 3 - Resource group name column>"
$avName="<Table A - Item 3 - Availability set name column>"
New-AzAvailabilitySet -ResourceGroupName $rgName -Name $avName -Location $locName -Sku Aligned  -PlatformUpdateDomainCount 5 -PlatformFaultDomainCount 2
$rgName="<Table R - Item 4 - Resource group name column>"
$avName="<Table A - Item 4 - Availability set name column>"
New-AzAvailabilitySet -ResourceGroupName $rgName -Name $avName -Location $locName -Sku Aligned  -PlatformUpdateDomainCount 5 -PlatformFaultDomainCount 2

这是该阶段成功完成后生成的配置。

第 1 阶段:适用于高可用性 SharePoint Server 2016 场的Azure 基础结构

Phase 1 of the SharePoint Server 2016 highly-available farm in Azure with the Azure infrastructure

后续步骤

使用 Azure 中的 SharePoint Intranet 服务器场,第 2 阶段:配置域控制器 继续配置此工作负载。

另请参阅

其他资源

在 Azure 中为 SharePoint Server 部署 SQL Server“始终启用”可用性组

Microsoft Azure 中的 SharePoint Server

在 Azure 中设计 SharePoint Server 场

安装 SharePoint Server