Install the Apache-based Subversion server in Windows

Source: Internet
Author: User
Tags apache error log svn update tortoisesvn
The most convenient way to install the package in Windows is to download the installation package. The detailed process is as follows:
1. Installation and download instructions
  Apache WebHttp://httpd.apache.org/download.cgi Server
(Apache2.0.x, I use version 2.0.59, and 2.2.x cannot be started after the configuration file is modified in windows !)
SubversionHttp://subversion.tigris.org/files/documents/15/35379/svn-1.4.2-setup.exe)
Tortoisesvn client ToolTortoiseSVN-1.4.1.7992-win32-svn-1.4.2.msi)
There are many networks, which are not provided here.
2. Program Installation
(1) install apache2.0.63
To prevent installation problems, if IIS is installed on the machine, change the IIS port to 8080 before installation, and then follow the prompts to complete the installation.
Open http: // loccalhost. If the content appears, your Apache installation is successful.
Note: If you install Apache as a service, it runs as a local system account. It is safer to create a separate user for Apache to run it. Because there are many commonly used port numbers, you can change the Apache port number to another one, such as 81.
Make sure that the user running Apache has full access to the version Library (right-click the version library directory and choose Properties> Security ). Otherwise, users cannot submit their changes. Even if Apache runs on a local system, you must set it to fully read and write the version library directory.
If this license is not configured for Apache, the user will get the error message "forbidden access", which is displayed as Error 500 in the Apache error log.

(2) run the Subversion Installer. If the installer can identify that you have installed Apache, your installation will be okay. If it cannot be (my machine cannot recognize it), you need to do the following manual Configuration:
Note: If you first install Apache and then install subversion, under normal circumstances the following work (before configuration 2.3) the Subversion installer has already helped you use the resource manager, go to the installation directory of sibversion (usually C:/program files/subversion), find the files httpd/mod_dav_svn.so and mod_authz_svn.so, and copy them to the modules directory of Apache (usually C: /program files/Apache Group/apache2/modules ).

Copy files from the Subversion installation directoryLibdb43.dllTo the modules directory of Apache.

Use a text editor such as NotePad to edit the Apache configuration file (usually C:/program files/Apache Group/apache2/CONF/HTTD. conf), Modify the following content:

Remove the comments from the following line (delete the beginning ):

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

Add the following two lines at the end of the loadmodule section:
Loadmodule dav_svn_module modules/mod_dav_svn.so
Loadmodule authz_svn_module modules/mod_authz_svn.so
 
Add the following lines at the end of the configuration file:

<Location/SVN>
Dav SVN
Svnparentpath D:/SVN
Authtype basic
Authname "Subversion repositories"
Authuserfile D:/passwd
# Authzsvnaccessfile D:/svnaccessfile
Require valid-user
</Location>
Configuration: all your version libraries will be located in the D:/SVN directory. to access your version library, you can use
URL: http: // yourip/SVN/. The access permission is restricted by the user name/password in the passwd file.
Details are as follows:
---------------------------------------------------------------------------
<Location/SVN>
This means that you can access the Subversion library through a URL like this (http: // myserver/SVN ).
Dav SVN
Tell apache which module is responsible for serving URLs like that-here it is the Subversion Module
Svnlistparentpath on
In subversion 1.3 and later, this indicator enables subversion to list all version libraries in the directory specified by svnparentpath.
Svnparentpath D:/SVN
Tell subversion to search for the version Library Under Directory D:/SVN # (change to your own directory)
Authtype basic
Enable basic authentication, such as user name/Password
Authname "Subversion repositories"
When a verification dialog box pops up, tell the user what the verification is.
Authuserfile D:/passwd # (password file, not a folder)
Specify D:/passwd as the password file to verify the user name and password
Authzsvnaccessfile D:/svnaccessfile
Specify D:/svnaccessfile to limit the access permissions of each user or group in the version library directory.
Require valid-user
Users must enter the correct user name and password before accessing this path.
-----------------------------------------------------------------------------
Create a passwd file
Open the command line (DOS window cmd ),
Switch the current directory to The apache2 directory (usually C:/program files/Apache Group/apache2/bin ),
Enter the following command:
Htpasswd.exe-C passwd Username
Automatically using MD5 format.
New Password: ****** (enter the password)
Re-type new password :******
Adding password for User Username
Copy passwd :/(The setting in httpd. conf is in D :)
Restart the apache service.
After the restart, open http: // yourip/SVN/after entering the password, or an error occurs (because no version library has been created)
Forbidden
You don't have permission to access/SVN on this server.
--------------------------------------------------------------------------------
Apache/2.0.59 (win32) SVN/1.4.2 Dav/2 server at 192.168.18.8 port 80
(3) tortoisesvn
Follow the prompts to restart your computer.
3. SVN Project Settings
(1) Open the resource manager and create a WWW directory under the D:/SVN directory.
(2) On the WWW folder, right-click tortoisesvn ---> Create repository here...
(You can also run the command to install the bin directory of SVN. Run: svnadmin create d:/SVN/WWW
D:/create the svn directory first. Do not make any mistakes:
Svnadmin: An error occurred while creating the archive.
Svnadmin: unable to create the top-level directory
(3). Then select native filesystem (fsfs)
(4). In the project folder, right-click tortoisesvn --> Import...
Enter http: // yourip/SVN/WWW in URL of repository:
(5). Project Members can create an empty project folder on their own machine. Right-click SVN checkout...
In the prompt user name and password dialog box, enter the user name and password configured by the server, and click OK. The following dialog box displays the files and directories added one by one, the last line shows "completed at version 1 ".
If it succeeds, you can see the corresponding code file in the local directory. Select a file or directory to perform "SVN Update" (update version from the server) and "SVN commit" (submit changes to the server) operations.
In addition, if you are using an integrated development environment such as netbeans, there may be SVN management tools or SVN support, you can directly import the project to SVN through these development environments. Here, I will attach some of my configuration files:

Passwd:
Eleven: $ apr1 $ xt2...... $ wnltr2fgiuc4bccjzfq/V/
Meteor :******
Syani :******
Evergreen :******
Here, xxx represents the password.
[Groups]
Admin = eleven
Developteam = syani, meteor, Evergreen

Svnaccessfile:
# Both administrators and developers have read and write permissions
[/]
@ Admin = RW
Danger =
@ Developteam = RW

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.