Arch Build SVN server

Source: Internet
Author: User

First, installationInstall The package

Install Subversion from the official repositories.

Create a repository

Create your Repository

Mkdir/path/to/repos/svnadmin CREATE/PATH/TO/REPOS/REPO1

Your initial repository is empty, if you want to import files into it, use the following command.

SVN import ~/code/project1 file:///path/to/repos/repo1--message ' Initial repository layout '
Set Access Policies

Edit the file/path/to/repos/repo1/conf/svnserve.conf and uncomment or add the line under [General]

Password-db = passwd

You might also want to the change of the default option for anonymous users.

Anon-access = Read

Replace "read" with "write" for a repository this anyone can commit to, or set it to "none" to disable all anonymous acces S.

Now edit the FILE/PATH/TO/REPOS/REPO1/CONF/PASSWD

[Users]harry = foopasswordsally = Barpassword

The above defines users Harry and Sally, with passwords Foopassword and Barpassword.

Start the server daemon

Before you start the server, edit the configuration file:

/etc/conf.d/svnserve
Svnserve_args= "--root=/path/to/repos"

The --root=/path/to/repos option set the root of repository tree. If you have the multiple repositories use --root=/path-to/reposparent . Then access independent repositories by passing in Repository name in the URL: svn://host/repo1 . Make sure that the user has Read/wri Te access to the repository files)

Optionally add a --listen-port if you want a different ports, or other options.

By default, the service runs as root. If you want to the change, add a drop-in:

/etc/systemd/system/svnserve.service.d/50-custom.conf
[Service] User=svn

Now start the svnserve.service daemon.

Ii. precautions (Tai hang)

1. If this error message appears, "Svnserve: Cannot bind server socket: Address is already in use"
Then get rid of the svnserve process first.
The specific approach is
$ Ps-aux | grep svnserve
# view process, Svnserve pid is 16663
$ kill-9 16663 #干掉svnserve
Run $ systemctl Start again Svnserve but the process is not found when using the Ps-aux lookup process. The last way is to kill the daemon xinetd and then pull the process back up Svnserve 2, option expected
    1. Svn:E200002:error while parsing config file:/home/..../svnserve.conf
    2. Svn:E200002:line 19:option expected

This is because when you modify svnserve.conf, when you open the note, there are spaces in front of the configuration and should be shelf written.

You can change it later.

3, Ping does not pass

First see if there is a cable.

Reference: https://wiki.archlinux.org/index.php/Subversionhttp://blog.csdn.net/zxnlmj/article/details/40621279http:// www.mamicode.com/info-detail-1100667.htmlhttp://blog.csdn.net/duguduchong/article/details/8819028

Arch Build SVN server

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.