如何在Windows Server上设置SVN和Trac服务器

我需要在研究生院为我的实验室提供SVN和Trac。 我们有一台运行Windows Server 2003的机器,我希望能够使用它。 我们真正需要的一件事是通过login到Windows域进行身份validation。 学校使用AD在一个域上build立。 我从来没有做过这样的事情,所以有人可以告诉我这是多么困难/是否有可能/如何去做。

谢谢

虽然我不确定这是否正是您想要的,但是我之前已经使用了BitNami的一些自包含的独立堆栈来处理我自己的个人工作,而且他们在处理肮脏的工作方面做得很好。 他们有一个Subversion和Trac模块,所以你只需要安装两个模块,然后改变configuration文件来处理Windowsauthentication。 另外,由于BitNami堆栈使用Apache来提供Trac安装,所以很容易遵循上面给出的链接。

在这里解释整个事情可能是困难的。 看看这个链接设置svn和这个设置trac。 而对于有Windowsauthentication的Trac域你可以在这里查看这个链接。

已经很好的链接(特别是proy),但一个真实的例子可能会有所帮助。

这里是用于Windows(XP)服务器的httpd.conf的一些部分,带有旧的2.2.11 apache。

<...> # Dynamic Shared Object (DSO) Support <..> LoadModule dav_svn_module modules/mod_dav_svn.so LoadModule authz_svn_module modules/mod_authz_svn.so LoadModule sspi_auth_module modules/mod_auth_sspi.so <...> # provides list of repo with anonymous access <Location /svn> DAV svn SVNParentPath "C:/data/repositories/" SVNListParentPath on SVNIndexXSLT "/svnindex.xsl" SVNAutoversioning on </Location> <Location /svn/> # Checked access for a deeper look # for single repository configuration (access right, etc), use a more specific entry in 'Location', # and use 'SVNPath "<path to repository>"' instead of 'SVNParentPath DAV svn SVNParentPath "C:/data/repositories/" SVNListParentPath on # for web browsing SVNIndexXSLT "/svnindex.xsl" SVNAutoversioning on # --- windows authentication AuthName "a nice, friendly and informative message" AuthType SSPI SSPIAuth On SSPIAuthoritative On SSPIDomain <YOUR_DOMAIN> SSPIUsernameCase lower # let non-IE client authentification (YES) SSPIOfferBasic On # comment the next line if you want to keep domain name in userid string passed down to mod_authz_svn SSPIOmitDomain On Satisfy Any Require valid-user # specific access control policy enforced by mod_authz_svn AuthzSVNAccessFile "C:/controls/svnaccesspolicy.private" </Location> ... # And the config for a series of Trac sites # No authentication for read only <Location /bugs> SetHandler mod_python # Date and Time localization, with the standard (fast)cgi SetEnv LC_TIME "fr_CH" SetEnv PYTHON_EGG_CACHE "C:/cache/egg" # Date and Time localization, with the modpython PythonOption TracLocale "French_Switzerland" PythonHandler trac.web.modpython_frontend PythonOption TracEnvParentDir "C:/data/trac" PythonOption TracUriRoot /bugs </Location> <LocationMatch "/bugs/[^/]+/login"> SetEnv LC_TIME "fr_CH" SetEnv PYTHON_EGG_CACHE "C:/cache/egg" AuthName "Another nice and informative message" AuthType SSPI # NT Domain auth config SSPIAuth On SSPIAuthoritative On SSPIDomain <YourDomain> SSPIUsernameCase lower SSPIOfferBasic On SSPIOmitDomain On # following line squishes bug #1168 if IE has troubles editing wiki pages. SSPIBasicPreferred On BrowserMatch "MSIE 6\.0; Windows NT 5\." nokeepalive BrowserMatch "MSIE 7\.0; Windows NT 5\." nokeepalive # and this one is a tentative to solve some login issue with IE7 (http://trac.edgewall.org/ticket/4560#comment:22) SSPIOfferSSPI off SSPIPerRequestAuth On # Satisfy Any Require valid-user </LocationMatch> <snip> 

如您所见,这两个站点都可以使用相同的方式查询DC进行validation。

请注意,这是一个旧的服务器(WINXP)的configuration – 可能有点过时,而不是使用您的情况下可能需要的SSL。 而且,trac和subversion都是“手动”安装的(也就是说不是整合的environement) – 当发生一些问题的时候(如果你的手指放在哪里,你会更好)。

SVN – 使用VisualSVN Server,它是Windows上易用的终极解决scheme,集成Active Directory并在几秒钟内完成安装/升级。

Trac – VisualSVN的人有安装Trac的指南来处理它。 他们确实说“不支持”,“非官方”等,但他们仍然有代码和指导给你。