手动安装 Windows Server 2012 2013 所需的角色SharePoint功能。 为此,请使用下列方法之一,具体取决于SharePoint服务器是连接到 Internet 还是处于脱机状态。
联机方法:服务器已连接到 Internet
在 Windows PowerShell 服务器上打开提升SharePoint提示 (即"以管理员) 运行",并执行以下命令:
Import-Module ServerManager
Add-WindowsFeature NET-WCF-HTTP-Activation45,NET-WCF-TCP-Activation45,NET-WCF-Pipe-Activation45
Add-WindowsFeature Net-Framework-Features,Web-Server,Web-WebServer,Web-Common-Http,Web-Static-Content,Web-Default-Doc,Web-Dir-Browsing,Web-Http-Errors,Web-App-Dev,Web-Asp-Net,Web-Net-Ext,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Health,Web-Http-Logging,Web-Log-Libraries,Web-Request-Monitor,Web-Http-Tracing,Web-Security,Web-Basic-Auth,Web-Windows-Auth,Web-Filtering,Web-Digest-Auth,Web-Performance,Web-Stat-Compression,Web-Dyn-Compression,Web-Mgmt-Tools,Web-Mgmt-Console,Web-Mgmt-Compat,Web-Metabase,Application-Server,AS-Web-Support,AS-TCP-Port-Sharing,AS-WAS-Support, AS-HTTP-Activation,AS-TCP-Activation,AS-Named-Pipes,AS-Net-Framework,WAS,WAS-Process-Model,WAS-NET-Environment,WAS-Config-APIs,Web-Lgcy-Scripting,Windows-Identity-Foundation,Server-Media-Foundation,Xps-Viewer
运行此代码后,服务器需要重新启动Windows PowerShell代码。
当您使用 PrerequisiteInstaller.exe时,它将执行此 Windows PowerShell 代码以安装必要的角色和功能以配置 Windows Server 2012 for SharePoint 2013。 用于安装Windows PowerShell代码的Add-WindowsFeature会安装 Windows NET-Framework-Core 功能,该功能是 Microsoft .NET Framework 3.5。 此功能安装需要二进制文件和其他文件,而这些文件未包含在默认安装的 Windows Server 2012。 使用此方法时,以及为了继续安装,PrerequisiteInstaller.exe 应用程序会通过联机连接从 Windows Update 下载这些二进制文件和其他文件。
备注
如果服务器没有 Internet 连接,PrerequisiteInstaller.exe将无法继续通过"配置应用程序服务器角色、Web 服务器 (IIS 角色) "阶段,您可能会收到以下错误消息:
Add-WindowsFeature:在指定的服务器上添加或删除功能的请求失败。一个或多个角色、角色服务或功能的安装失败。无法下载源文件。使用"源"选项指定还原功能所需的文件的位置。有关指定源位置详细信息,请参阅 https://go.microsoft.com/fwlink/?LinkId=243077 。错误:0x800f0906
错误0x800F0906指示计算机无法从更新中下载Windows文件。
为什么收到此错误?
在Windows Server 2012和Windows 8中,.NET Framework 3.5 是按需功能。 按需功能的元数据包含在Windows Server 2012和Windows 8。 但是,不包含二进制文件和与功能关联的其他文件。 启用此功能时,Windows尝试联系 Windows Update 以下载缺少的信息以安装该功能。
网络配置和如何配置计算机以在环境中安装更新可能会影响这一过程。 因此,首次安装此类功能时可能会遇到错误。
有关尝试在 Windows 8 或 Windows Server 2012 中安装 .NET Framework 3.5 时Windows Server 2012错误代码的详细信息,请参阅以下 Microsoft 知识库文章。
2734782尝试在 .NET Framework 或 Windows 8 安装 3.5 时Windows Server 2012
脱机方法:服务器未连接到 Internet
若要在脱机环境中SharePoint 2013 Windows Server 2012 2013 所需的角色和功能,必须有权访问 Windows Server 2012 安装媒体。 然后,您可以运行在Windows PowerShell 2 中使用的相同命令,但必须使用 -source 参数指定安装媒体上所需文件的位置。
例如,假定你已使用 ISO Windows Server 2012安装媒体 (ISO) 驱动器 D。 然后,为 -source 参数提供的路径如下所示:
D:\sources\sxs
注意 请注意,还可以本地复制文件或指定存储安装文件的 UNC 路径。
在 Windows PowerShell 服务器上打开提升SharePoint提示 (即"以管理员) 运行",并执行以下命令:
Import-Module ServerManager
Add-WindowsFeature NET-WCF-HTTP-Activation45,NET-WCF-TCP-Activation45,NET-WCF-Pipe-Activation45 -Source D:\Sources\sxs
Add-WindowsFeature Net-Framework-Features,Web-Server,Web-WebServer,Web-Common-Http,Web-Static-Content,Web-Default-Doc,Web-Dir-Browsing,Web-Http-Errors,Web-App-Dev,Web-Asp-Net,Web-Net-Ext,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Health,Web-Http-Logging,Web-Log-Libraries,Web-Request-Monitor,Web-Http-Tracing,Web-Security,Web-Basic-Auth,Web-Windows-Auth,Web-Filtering,Web-Digest-Auth,Web-Performance,Web-Stat-Compression,Web-Dyn-Compression,Web-Mgmt-Tools,Web-Mgmt-Console,Web-Mgmt-Compat,Web-Metabase,Application-Server,AS-Web-Support,AS-TCP-Port-Sharing,AS-WAS-Support, AS-HTTP-Activation,AS-TCP-Activation,AS-Named-Pipes,AS-Net-Framework,WAS,WAS-Process-Model,WAS-NET-Environment,WAS-Config-APIs,Web-Lgcy-Scripting,Windows-Identity-Foundation,Server-Media-Foundation,Xps-Viewer **-Source D:\Sources\sxs**
运行此代码后,服务器需要重新启动Windows PowerShell代码。