在Windows 8上架設SharePoint 2010開發環境

在Windows 8上架設SharePoint 2010開發環境

準備安裝SharePoint環境

  1. 以管理員權限執行Command Line
    
    start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;^
    IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;^
    IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;^
    IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-HealthAndDiagnostics;^
    IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-ManagementScriptingTools;^
    IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-DigestAuthentication;^
    IIS-RequestFiltering;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic;^
    IIS-WebServerManagementTools;IIS-ManagementConsole;IIS-IIS6ManagementCompatibility;^
    IIS-Metabase;IIS-WMICompatibility;WAS-WindowsActivationService;WAS-ProcessModel;^
    WAS-NetFxEnvironment;WAS-ConfigurationAPI;WCF-HTTP-Activation;^
    WCF-NonHTTP-Activation
  2. 
    啟用.NET Framework 3.5及Windows Identity Foundation 3.5
    
    imageSNAGHTML2c825c6
  3. 
    安裝MSChart Control
    
    http://www.microsoft.com/zh-tw/download/details.aspx?id=14422
  4. 
    設定IIS預設應用程式集區的.NET Framework版本為2.0
    
    image

安裝SharePoint 2010

  1. 
    建立資料夾,將SharePoint安裝程式複製到此資料夾
  2. 
    修改安裝目錄下的config.xml,加入AllowWindowsClientInstall為true(<Setting Id="AllowWindowsClientInstall" Value="True"/>),路徑:[SharePointSetupFiles]\Files\Setup
  3. 
    接下來就可以照著MSDN的解說安裝SharePoint
    http://msdn.microsoft.com/en-us/library/ee554869.aspx
  4. 
    執行SharePoint設定精靈初始化

SharePoint PowerShell啟動方式

Windows 8的PowerShell預設會以CLR 4.0執行,因此SharePoint PowerShell會執行出錯,如果要啟動SharePoint的PowerShell SnapIn,需要先執行舊版PowerShell再載入SnapIn,

舊版PowerShell執行方式:


PowerShell -version 1

可以利用以下的Script來載入SnapIn:


$snapin = Get-PSSnapin | Where-Object {$_.Name -eq 'Microsoft.SharePoint.Powershell'}
if ($snapin -eq $null) 
{
    Write-Host "Loading SharePoint Powershell Snapin"
    Add-PSSnapin "Microsoft.SharePoint.Powershell"
}

 

參考連結