可以通过apache来配置一个SVN服务。
基于 Apache 的服务器
1、安装 Apache2、安装 Subversion
下载http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=8100
运行Subversion安装程序,并根据指导安装,如果Subversion认识到你安装了Apache,你就几乎完成了工作,如果它没有找到Apache服务器,你还有额外的步骤。
使用Windwos资源管理器,来到Subversion的安装目录(通常是
c:\program files\Subversion),找到文件/httpd/mod_dav_svn.so和mod_authz_svn.so,复制这些文件到Apache的模块目录(通常是c:\program files\apache group\apache2\modules)。- 从 Subversion 安装目录将
/bin/libdb*.dll和/bin/intl3_svn.dll复制到 Apache 的 bin 目录。 使用记事本之类的文本编辑器修改Apache的配置文件(通常是
C:\Program Files\Apache Group\Apache2\conf\httpd.conf),做出如下修改:去掉以下几行的注释(删除 '
#'标记):#LoadModule dav_fs_module modules/mod_dav_fs.so
#LoadModule dav_module modules/mod_dav.so将以下两行到
LoadModule节的末尾。LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
At the end of the config file add the following lines:
DAV svn
SVNListParentPath on
SVNParentPath D:\SVN
#SVNIndexXSLT "/svnindex.xsl"
AuthType Basic
AuthName "Subversion repositories"
AuthUserFile passwd
#AuthzSVNAccessFile svnaccessfile
Require valid-userThis configures Apache so that all your Subversion repositories are physically located below
D:\SVN. The repositories are served to the outside world from the URL:. Access is restricted to known users/passwords listed in thepasswdfile.To create the
passwdfile, open the command prompt (DOS-Box) again, change to theapache2folder (usuallyc:\program files\apache group\apache2) and create the file by enteringbin\htpasswd -c passwd
This will create a file with the name
passwdwhich is used for authentication. Additional users can be added withbin\htpasswd passwd
再次重启Apache服务。
将浏览器指向
MyNewRepository(MyNewRepository是你此前创建的版本库名),如果一切正常,你会被提示输入用户名和密码,然后你会看到版本库的内容。