Install and configure SVN in ubuntu

Source: Internet
Author: User
Tags svn client tortoisesvn
Install and configure SVN in ubuntu-Linux Enterprise Application-Linux server application information. For more information, see. 1. Install SVN

Apt-get install subversion

2. Create a svn Repository

1). Create the svn Directory: mkdir/home/. svn (use the hidden directory)

2). cd/home/. svn

3). mkdir astar

4) create the repository astar: svnadmin create/home/. svn/astar. After execution, the astar directory contains the directories and files created by svnadmin.

5). mkdir test

6) create the repository test: svnadmin create/home/. svn/test. After the execution, the directory test contains the directories and files created by svnadmin.

3. configure and manage svn

1) the configuration file for each repository is under $ repos/conf/and vi svnserve. conf. The configuration item is under [general:

Anon-access: anonymous user permissions, including read, write, and none. The default value is read. Anonymous user access not allowed: anon-access = none

Auth-access: Authenticate the user's permissions, which can be read, write, or none. The default value is write.

Password-db: the path of the password database. Remove the path from the front #

Authz-db: Path of the authentication rule repository. Remove the # from the front #.

Note: The rows of these configuration items must be the top level; otherwise, an error is reported. After you modify the configuration, You need to restart svn to make it take effect.

2) configure the passwd file

This is the password file for each user. It is relatively simple, that is, "user name = password", using a clear code. For example, allen = 111111

3) configure the authz File

1. [groups] section: to facilitate management, you can put some users in a group, such as: owner = allen, ellen

2. sections Under groups indicates the authentication rules for a directory. For example, the section of the authentication rules for the root directory is [/]. When setting authentication rules for a single user, a single user line is displayed, for example:

[/]

Allen = rw # allen's permission for the root directory is rw

Ellen = r # the permission of ellen to the root directory is r

If a group is used, add @ before the group name, as shown in figure

@ Owner = rw # all users in the group owner are rw, which is equivalent to the above two statements.

If you start from/home/. svn/astar at startup,/is the astar directory. Set the permission as the root in the above method.

If it is started from/home/. svn/, the root of each warehouse is its own starting directory. You can set the astar permission in the above way, or you can use the following method:

[Astar:/]

@ Owner = rw

Set the test permission as follows:

[Test:/]

@ Harry_and_sally = rw

In short, the root directory (/) of each warehouse is its own starting directory; [repos:/] This method is only applicable to multi-warehouse situations; [/] It is suitable for single warehouse and single warehouse.

3. Permissions cannot be set across warehouses.

4. Start and Stop svn

1). Start:

1. Start from the astar directory. svnserve-d-r/home/. svn/astar, the root directory (/) is astar, And the rule configuration in authz uses section [/]. Access Method:

Svn: // 192.168.0.87/

2. from. svn directory startup, svnserve-d-r/home /. svn, the root directory (/) is. for svn and authz, use section [astar:/] For the astar configuration, and use section [test:/] For the test configuration. Access Method:

Svn: // 192.18.0.87/astar

Svn: // 192.18.0.87/test

Add the command to/etc/rc. local

2). Check whether the svn server has been started (svn uses port 3690 by default): netstat-an | grep 3690

3). Stop: killall svnserve

5. svn client

TortoiseSVN, http://tortoisesvn.tigris.org/

Eclipse plug-in, http://subclipse.tigris.org/

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.