SVN server configuration in Windows

Source: Internet
Author: User
Tags ultraedit

Windows allows us to continue our SVN journey without changing the operating system we often use, while combining the dynamic methods, we feel that these contents are very close to the application and configuration of SVN in Windows.

1. download the file,

Download the latest subversion. here I select svn-1.4.5-setup.exe.

Download the "Subversion Windows Service" Package

Download TortoiseSVN shell integration utility

2. Install the Subversion server

Because I download the setup.exe version, the system variables will be automatically set after the installation program is installed. If you download the zip version, you need to manually set the system variables.

You can install setup.exe directly. Install it to D:/Program Files/Subversion.

First, create the SVN repository (repository)

Svnadmin create F:/svn/

After repository is created, several files and folders are generated under the directory. The dav directory is the directory provided for Apache and mod_dav_svn to store internal data; the db directory is all version-controlled data files; the hooks directory stores the directory of the hook script file; locks is used to hold the directory of the data locked by the Subversion file library, and is used to track the client that accesses the file library; the format file is a text file with only one integer in it, indicating the version number configured in the current file library;

3. Configure the SVN Server

(This location is where you create the repository. F:/svn)

Open the/conf/directory, open svnserve. conf, and find the following two sentences:

# [General]

# Password-db = passwd

# Anon-access = none

# Auth-access = write

# At the beginning of each line, where the second line specifies the name of the authentication file, that is, passwd file. anon-access = none is inaccessible to anonymous users and must have a user name and password. (Note: This is the problem. You must note that the format cannot be blank after the comment is removed)

Open the passwd file and set

# [Users]

# Harry = harryssecret

# Sally = sallyssecret

The format is "username = password". If you can insert a line: admin = admin888, you can add a user with the username admin and password admin888 to the system.

4. Run the SVN Server

Run SVN Service

Execute

Svnserve -- daemon -- root F:/svn

Service start, -- daemon can be abbreviated to-d, -- root can be abbreviated to-r, you can create a batch processing file and put it in the windows Startup Group to run the SVN service at startup (note: this is a service temporarily opened. The window cannot be closed after the command is executed)

You can also specify the port used by subversion: svnserve-d-r f:/svn -- listen-port 9999.

You can use the background service to set Automatic execution upon startup.

D:/Program Files/Subversion/bin> SC create svnservice binpath = "C:/Program Files/Subversion/bin/svnserve.exe -- service-r f: /svn -- listen-port 9999"

You can use net svnservice stop or start to start the service, or you can start it in Sevices. msc.

5. access through a client

Format: svn: // server IP Address

 

Bytes ---------------------------------------------------------------------------------------------------------

 

Svnserve-based servers and FAQs about authz configuration of permission files
Recently I have been using Subversion forums (http://www.iUseSVN.com/bbs) to address the following issues:
Why does my client have no write permission?
Why does my permissions not work?

Summarize their configurations and find
Svnserve is used as the server,
Both use the authz-db option in svnserve. conf.

The possible causes are as follows:

1. When configuring authz, do not pay attention to the directory specified by the svnserve startup parameter-r.
There are two cases:
A:-r is directly specified to the version Library (called the single-database svnserve method)
For example, there is a library project1 located at D:/svn/project1
Run the following command to start svnserve

[Copy to clipboard] [-] CODE:
Svnserve-d-r D:/svn/project1
In this case, a svnserve can only work for one version Library
If the authz file is configured as follows, this is an error,

[Copy to clipboard] [-] CODE:
[Groups]
Admin = user1
Dev = user2
[Project1:/]
@ Admin = rw
@ Doc = r
It should be configured

[Copy to clipboard] [-] CODE:
[Groups]
Admin = user1
Dev = user2
[/]
@ Admin = rw
@ Doc = r
Because [project1:/] indicates the root directory of the Project 1 database, there is no concept of a database based on the preceding startup parameters.
Use a URL like this: svn: // 192.168.0.1/to access project1.

B:-r specifies the parent directory of the version Library (called the multi-database svnserve method)
Similarly, there is a library project1 located at D:/svn/project1
If you use the following command to start svnserve

[Copy to clipboard] [-] CODE:
Svnserve-d-r D:/svn
In this case, a svnserve can work for multiple version libraries,
In this case, if you want to restrict the specified directory of the specified database, you should specify a specific library, such

[Copy to clipboard] [-] CODE:
[Groups]
Admin = user1
Dev = user2
[Project1:/]
@ Admin = rw
@ Doc = r
If you still use [/], it indicates the root directory of all databases. Similarly, [/src] indicates the src directory under the root directory of all databases.
Use a URL like this: svn: // 192.168.0.1/project1 to access project1
You can access project2 with the following URL: svn: // 192.168.0.1/project2:

2. When permission control is performed on the Chinese directory, the permission file authz is not changed to UTF-8 format.

Svn uses UTF-8 encoding for non-English file names and directory names. correct control of Chinese directories is required,
How to convert the default file to UTF-8 In the UTF-8 format without BOM,
I am using the UltraEdit menu "ASCII to UTF-8 (Unicode Editing )". In the configuration of UltraEdit, you can set whether a BOM exists.

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.