Build SVN server tutorial under Mac

Source: Internet
Author: User
Tags aliases

This document is based on previous achievements and is recorded after the test has been modified by itself.

User name username in the document for Mac machine

1. If your machine is the first SVN build to create the SVN directory.

Enter in Terminal: mkdir/users/username/svn Enter (if prompted, it is possible that your computer already has the SVN folder, if you do not use, you can delete it and rerun the command above)

2. Create SVN repository

Enter in Terminal: Svnadmin create/users/username/svn/repository

3. View the files under SVN repository (in favor of your understanding SVN) Terminal input: ls/users/username/svn/repository/below six files (README.txt DB Hooks Co NF format Locks)

4. Configure SVN user rights.

1. Enter in Terminal: ls/users/username/svn/repository/conf Directory has three files: Authz passwd svnserve.conf

In terminal input: VI authz, enter and press I to modify the file: Modify the following:

# # # This file is a example authorization file for Svnserve.

# # # Its format was identical to that of MOD_AUTHZ_SVN authorization

# # files.

# # as shown below each sections defines authorizations for the Pathand

# # # (optional) repository specified by the section name.

# # # The authorizations follow. An authorization line can refer to:

# # #-a single user,

# # #-a group of usersdefined in a special [groups] sections,

# # #-an alias Definedin a special [aliases] section,

# # #-All authenticatedusers, using the ' $authenticated ' token,

# # #-only anonymoususers, using the ' $anonymous ' token,

# # #-anyone, using the ' * ' wildcard.

###

# # # A match can is inverted by prefixing the rule with ' ~ '. Rulescan

# # # 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=researchinstitute/cn=joe Average

[Groups]

harry_and_sally = harry,sally

Harry_sally_and_joe = Harry,sally,&joe

[/]

#harry =RW

# &joe = R

# * =

# [Repository:/baz/fuz]

# @harry_and_sally = RW

# * = R

Modify the red part as follows

Press ESC, enter: WQ press ENTER to save and exit.

2.PASSWD is also in the current directory, enter VIPASSWD in the terminal as follows configuration

# # # This file is a example password file for Svnserve.

# # # Its format was similar to that of svnserve.conf. As shown in the

# # # example below it contains one section labelled [Users].

# # # The name and password for each user follow, one account Perline.

[Users]

Wangjin = 123456

Mac = 123456

#harry = Harryssecret

# sally = Sallyssecret

Enter the user name and password (that's what you just remembered) and save the exit after it's done.

3.svnserve.conf is also in the current directory, terminal input visvnserve.conf to configure the server

# # # This file controls the configuration of the Svnserve daemon, ifyou

# # # Use the IT to allow access to this repository. (If you are only allow

# # # access through http:and/or file:urls, then this file is

# # # irrelevant.)

# # # Visit http://subversion.apache.org/for more information.

[General]

# # # These options control access to the repository forunauthenticated

# # # and Authenticated users. Valid values are "write", "read",

# # # and "None". The sample settings below is the defaults.

Anon-access = Read

auth-access = Write

# # # The PASSWORD-DB option controls the location of the password

# # Database file. Unless specify a path starting with A/,

# # # The file ' s location was relative to the directory containing

# # # This configuration file.

# # If SASL is enabled (see below), the This file won't be used.

# # # 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 was relative to the

# # # directory containing this file. 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 therepository.

# # If repositories have the same authentication realm, theyshould

# # # has the same password database, and vice versa. The default Realm

# # is repository ' s UUID.

# realm = My First Repository

[SASL]

# # # This option specifies whether your want to use the Cyrus SASL

# # # Library for authentication. Default is false.

# # # This section would be a ignored if svnserve is not a built with Cyrus

# # # SASL support; To check, run ' Svnserve--version ' and look for Aline

# # # reading ' Cyrus SASL authentication is available. '

# USE-SASL = True

# # # These options specify the desired strength of the security layer

# # # That's want SASL to provide. 0 means no encryption, 1 means

# # integrity-checking only, values larger than 1 is correlated

# # to the effective key length for encryption (e.g. means128-bit

# # # Encryption). The values below is the defaults.

# min-encryption = 0

# max-encryption = 256

Note that the Red section removes the comment.

5. Start the server

Terminal input svnserve–d–r/users/username/svn/repository

Without any hint, the boot was successful.

6, then you can use the SVN server;

Build SVN server tutorial under Mac

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.