[Go:
Http://blog.csdn.net/castellan/article/details/2451063
]
Because I don't like the working mechanism of VSS, I tried to implement subversion for Version Management in my development team. There are already many installation examples on the network. Here, I just recorded my own experiences. I will try again later.
System Environment: Windows XP
Installation Software: apache_2.0.63, svn-1.4.6
Installation path: Apache uses the default installation path: C:/program files/Apache Group/apache2; subversion uses the default path: C:/program files/subver.
Steps:
1. install Apache
This is relatively simple. After step by step execution, the installation is successful. Note that we need to use subversion under Apache, so we need the mod_dav_svn module. Currently, mod_dav_svn does not support Apache 2.2 or later versions. So I chose apache_2.0.63 of version 2.0. Http://httpd.apache.org/download.cgi page.
2. Install Subversion
Download a http://subversion.tigris.org-like installation to the svn-x.x.x-setup.exeProgram. The installation is also performed step by step.
3. Create a subversion Library
Run the command in the Subversion installation path, for example, C:/program files/subversion/bin.
Svnadmin create d:/XXX/SVN/first
In this way, we have created a subversion library named first. The default configuration is used for the moment. You can query the Subversion document and customize the required libraries.
4. create user files used for basic verification
Because we use Apache to access the Subversion library, Apache authentication is required for user authentication. Here we use the local password file. In the Apache installation path, for example, C:/program files/Apache Group/apache2/bin, run the htpasswd command to create the password file:
Htpasswd-c d:/XXX/SVN/CONF/http_passwd Admin
Admin is our first authenticated user. Then enter the password as prompted, and the user password file will be created.
5. Edit httpd. conf to add the virtual path we want to access.
Httpd. conf is in the Apache installation path, for example, C:/program files/Apache Group/apache2/CONF/httpd. conf.
Use the text editing software to open httpd. conf.
5.1 remove the comments of mod_dav.
Find # loadmodule dav_module modules/mod_dav.so
This line. Remove the # At the beginning of the line #.
5.2 add mod_dav_svn and mod_authz_svn loading configurations
Add the following at the end of the httpd. conf file:
Loadmodule dav_svn_module "C:/program files/subversion/bin/mod_dav_svn.so"
Loadmodule authz_svn_module "C:/program files/subversion/bin/mod_authz_svn.so"
5.3 add our virtual path Configuration
<Location/SVN>
Dav SVN
Svnparentpath "D:/XXX/SVN"
Authtype basic
Authname "Subversion repositories"
Authuserfile "D:/XXX/SVN/svnconf/http_passwd"
Authzsvnaccessfile "D:/XXX/SVN/svnconf/authz"
Satisfy any
Require valid-user
</Location>
6. Edit the authorization File
Modify D:/projectfolder/SVN/MAS/CONF/authz
We set the absolute address of the svn parent directory in Apache. In this way, we can create multiple subversion Libraries under D:/XXX/, and use a set of authentication and authorization files for centralized management.
[Groups]
Admin = Admin
Developer = zlx
[/]
@ Admin = RW
[First:/]
[Second:/]
@ Developer = RW