Windows IIS 配置Bonobo Git伺服器
要使用Bonobo Git Server,我們的Windows首先需要滿足這些條件:
- Internet Information Services 7 and higher
- How to Install IIS 8 on Windows 8
- Installing IIS 8 on Windows Server 2012
- Installing IIS 7 on Windows Server 2008 or Windows Server 2008 R2
- Installing IIS 7 on Windows Vista and Windows 7
- .NET Framework 4.5
- Windows Vista SP2, Windows 7, Windows 8 and higher
- Windows Server 2008 R2, Windows Server 2008 SP2, Windows Server 2012 and higher
- ASP.NET MVC 4
- You can use the standalone installer even though it says it requires VS 2010 and higher.
- Don’t forget to register MVC framework with your IIS
- Run %windir%/Microsoft.NET/Framework/v4.0.30319/aspnet_regiis.exe -ir with administrator privileges
針對這些條件,有一點需要注意的是如何配置IIS。
我使用的是windows7旗艦版,預設是不開啟IIS的。所以要先配置IIS。
1. 如圖在控制面版裡找到“開啟或關閉Windows功能”。
2. 在windows功能裡面按圖配置好。

3. 可以看到C盤多了一個inetpub檔案目錄。

這時,IIS伺服器就基本配置好了!
注意:當所有的前提條件都滿足之後,需要使用管理員執行cmd.exe,然後在cmd下執行%windir%/Microsoft.NET/Framework/v4.0.30319/aspnet_regiis.exe -ir來註冊.net框架。
在官網上可以看安裝教程。主要步驟如下:
1. 下載Bonobo Git Server, 然後解壓到C:/inetpub/wwwroot/Bonobo.Git.Server/路徑下。如下:
2. 給App_Data資料夾新增寫和修改的許可權。
3. 開啟Internet 資訊服務(IIS)管理器
4. 右擊Bonobo.Git.Server並點選轉換為應用程式
5. 把應用程式池設定為ASP.NET v4.0, 如果沒有該選項,那說明你沒有安裝.NET4.0或者安裝後沒有註冊,你需要執行%windir%/Microsoft.NET/Framework/v4.0.30319/aspnet_regiis.exe -ir來註冊.NET4.0
6. 前面步驟完成的,我們可以看到Bonobo.Git.Server的圖示變化了,這時,我們只需要執行瀏覽*:80(http)(如圖所標註的位置)就可以了。
執行的效果:
到這裡,我們的配置教程就結束了,如果你還不明白,可以結合官網來看,不過官網也並沒有講得太詳細。在windows使用IIS的過程中,可能會出現其它的問題,可以另外Google, 或者Baidu, 這些問題就是windows的範疇了。如果你嚴格按上面來配的話,應該是沒有什麼問題的。