Build a Win32 + apaceh + subversion + tortoisesnv Environment

Source: Internet
Author: User
Tags svn client svn update apache log tortoisesvn
ArticleDirectory
    • 1. Download the installer
    • 2. Installation
Environment

Windows
2003

Setup-Subversion-1.6.17.msi SVN Server

Apache httpd-2.2.19-win32-x86-no_ssl.msi

TortoiseSVN-1.6.7.18415-win32-svn-1.6.9.msi SVN Client

Installation Step 1 Program Download

Apache Web Server: http://httpd.apache.org/download.cgi (I downloaded a httpd-2.2.19-win32-x86-no_ssl.msi)
Subversion http://subversion.tigris.org/, find it here)
Tortoisesvn client tools (TortoiseSVN-1.6.7.18415-win32-svn-1.6.9.ms)

 

2. Installation

1. ApacheInstall: The installation steps are simple. Note that the local IIS port number should not conflict with Apache. The default port of this Apache package is 80. Stop the IIS service before installation. After the installation is complete, modify the listening port. Open the file c: \ Program Files \ Apache Software
Foundation \ apache2.2 \ conf \ httpd.

Conf, set the listen
Change 80 to listen 88. Then openHttp: // loccalhost: 88If the content appears, your Apache installation is successful.
2.Run SubversionInstallerAfter the installation is complete, perform the following manual Configuration:

(1) If you first install Apache and then install subversion, go to the Subversion installation directory (default: C: \ Program Files \ subversion), find the files httpd/mod_dav_svn.so, mod_authz_svn.so, libdb44.dll, copy them to the modules directory of Apache (my directory is c: \ Program Files \ Apache Software Foundation \ apache2.2 \ modules ).

(2) edit the Apache configuration file (my file is c: \ Program Files \ Apache Software Foundation \ apache2.2conf \ HTTD. conf) and 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 c: \ SVN

Authtype basic

Authname "test"

Authzsvnaccessfile c: \ SVN \ test \ conf \ authz

Authuserfile "C: \ Program Files \ apache
Software Foundation \ apache2.2 \ bin \ passwd"

Require valid-user

</Location>


Configuration: all your version libraries will be located in the C: \ SVN directory. to access your version library, you can use the URL: http: // localhost/SVN /, the access permission is restricted by the user name/password in the passwd file.
Description:

Explanation ---------------------------------------------------------------------------
<Location/SVN>
This means that you can access the Subversion library through a URL like this (http: // localhost/SVN ).
Dav SVN tells apache which module is responsible for serving URLs like that-here it is the Subversion Module
Svnlistparentpath on is in Subversion 1.3 and later. This indicator enables subversion to list all version libraries in the directory specified by svnparentpath.
Svnparentpath c: \ SVN tells subversion to find the version Library Under directory G: \ SVN # (change to your own directory)
Authtype basic enables basic authentication, such as user name/Password
Authname "Subversion
Repositories
Authuserfile "C: \ Program
Files \ apache softwarefoundation \ apache2.2 \ bin \ passwd"
# User and password files, not folders
Specify c: \ Program Files \ Apache Software Foundation \ apache2.2 \ bin \ passwd as the password file to verify the user name and password
Authzsvnaccessfile c: \ SVN \ test \ conf \ authz specify c: \ SVN \ test \ conf \ authz to limit the access permissions of each user or group in the version library directory
Require valid-user indicates that users can access this path only after entering the correct user name and password.
Explanation -----------------------------------------------------------------------------

(3)Create passwdFile

Open the command line (DOS window cmd ),
Switch the current directory to the apache2.2 directory (usually c: \ Program Files \ apache
Software Foundation \ apache2.2 \ bin \),
Enter the following command:
Htpasswd.exe-C passwd Admin
Automatically using MD5 format.
New Password: ****** (enter the password)
Re-type new password :******

Adding password for user admin
Restart the apache service.
After the restart, enable http: // localhost/SVN/after entering the password, an error occurs. (because no version library has been created, we will mention it in tortoisesvn project management)
Forbidden
You don't have permission to access
/SVN on this server.
--------------------------------------------------------------------------------

(4) tortoisesvnInstall
Follow the prompts to restart your computer.

(5) SVNProject Settings
(1) Open the resource manager and create the test directory under the c: \ SVN directory.
(2) Right-click tortoisesvn ---> Create repository here on the test folder...
(You can also run the command to install the bin directory of SVN. Run: svnadmin create c: \ SVN \ test

The c: \ SVN directory must be created first, so there is no error: svnadmin: file library creation failed svnadmin: The top directory cannot be created)
(3) maintain the version of the fsfs)
(4). Go to the project folder (test) and right-click tortoisesvn --> Import...
Enter http: // localhost/SVN/test 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 correspondingCodeFile. Select a file or directory to perform "SVN Update" (update version from the server) and "SVN commit" (submit changes to the server) operations.

(6)Permission Configuration

(1) modify the three files in the svn repository directory


Authz file:

### This file is
Example authorization file for svnserve.
### Its format is identical to that of mod_authz_svn authorization
### Files.
### As shown below each section defines authorizations for the path and
### (Optional) repository specified by the section name.
### The authorizations follow. An authorization line can refer:
###-A single user,
###-A group of users defined in a special [groups] section,
###-An alias defined in a special [aliases] section,
###-All authenticated users, using the '$ authenticated' token,
###-Only anonymous users, using the '$ anonymous' token,
###-Anyone, using the '*' wildcard.
###
### A match can be inverted by prefixing the rule '~ '. Rules can
### Grant read ('R') Access, read-write ('rw ') access, or no access
###('').

[Aliases]
# Joe =/C = xz/ST = dessert/L = snake city/o = snake oil, Ltd./ou = Research
Institute/CN = Joe average

[Groups]
# Harry_and_sally = Harry, Sally
# Harry_sally_and_joe = Harry, Sally, & Joe
Admin = Admin
User = user
Test = test

[/]
@ Admin = RW
Qd = r
Bu = r

[/QD]
@ Admin = RW
Qd = r
Bu = r

[/Bu]
@ Admin = RW
Qd = r
Bu = RW

# [/Foo/bar]
# Harry = RW
# & Joe = r
# * =

# [Repository:/Baz/fuz]
# @ Harry_and_sally = RW
# * = R


Svnserve. conf file:

### This file controls the configuration of the svnserve daemon, if you
### Use it to allow access to this repository. (If you only allow
### Access through http: and/or file: URLs, then this file is
### Irrelevant .)

### Visit http://subversion.tigris.org/
For more information.

[General]
### These options control access to the repository for Unauthenticated
### And authenticated users. Valid values are "write ",
"Read ",
### And "NONE". The sample settings below are the defaults.
Anon-access = none
Auth-access = write
### The password-DB option controls the location of the password
### Database file. Unless you specify a path starting with /,
### The file's location is relative to the conf directory.
### Uncomment the line below to use the default password file.
Password-DB = passwd
### The authz-DB option controls the location of the authorization
### Rules for path-Based Access Control. Unless you specify a path
### Starting with A/, the file's location is relative to the conf
### Directory. If you don't specify an authz-DB, no path-based
Access
### Control is done.
### Uncomment the line below to use the default authorization file.
Authz-DB = authz
### This option specifies the authentication realm of the repository.
### If two repositories have the same authentication realm, They shocould
### Have the same password database, and vice versa. The default
Realm
### Is repository's UUID.
# Realm = my first Repository

Through the preceding settings, admin has the readable and writable permissions on the root directory. Bu and QD users have the readable permissions on the root directory. Bu and QD have the permission to read and write their own directories and read other directories.

Remarks

1. After all services are configured, you can go to the Apache log directory to check whether the error. log file is helpful.

 

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.