SVN + Apache

Apache 2.2.15  win32

Supversion 1.6.5.msi 

 

1. 安装好 Apache 和 subversion

  启动Apache , http://localhost 应该显示 It works.

 

  命令行键入svn , 显示 “使用“svn help”得到用法。”

 

2.创建版本库 

E:\svn>svnadmin create repository

 

3.进入subversion安装目录, 找到文件 mod_dav_svn.so , mod_authz_svn.so , copy them to 

Apache's module directory.

 

4.修改Apache下的httpd.conf文件,找到以下两行 去掉注释

#LoadModule dav_module modules/mod_dav.so
#LoadModule dav_fs_module modules/mod_dav_fs.so

 

5. 添加:

 

LoadModule dav_svn_module modules/mod_dav_svn.so

LoadModule authz_svn_module modules/mod_authz_svn.so

 

6.#Configure svn access path:

<Location /svn>

  DAV svn

  SVNParentPath E:/svn

 

  # how to authenticate a user

  AuthType Basic

  AuthName "Subversion repository"

  AuthUserFile E:/svn/svn-auth-file

 

  # only authenticated users may access the repository

  Require valid-user 

  #Satisfy Any

</Location>


7. 用apche下的htpasswd命令创建用户验证文件,添加用户 
C:\apache\bin>htpasswd -cm D:\svn\svn-auth-file collin
New password: *****
Re-type new password: *****
Adding password for user collin
C:\apache\bin>htpasswd -m D:\svn\svn-auth-file collin2
New password: *****
Re-type new password: *****
Adding password for user collin

 

 

 

#Configure svn access path: <location> #告诉Apache哪个模块负责服务像那样的URL--在这里就是Subversion模块 DAV svn #1.3以上版本支持指示器使得Subversion列出由SVNParentPath指定的目录下所有的版本库 SVNListParentPath on SVNParentPath E:/svn # how to authenticate a user AuthType Basic AuthName "Subversion repository" AuthUserFile E:/svn/svn-auth-file #指定e:\svn-access-file 来限定各个用户或组在版本库中目录的访问权限 #AuthzSVNAccessFile e:\svn-access-file # only authenticated users may access the repository Require valid-user #Satisfy Any </location>

你可能感兴趣的:(apache,c,SVN,Access,subversion)