Linux Build SVN client and multiple project permissions Group management

Source: Internet
Author: User
Tags svn client collabnet

Build SVN service, effective management code, the following three steps can be quickly done.
1. Installation

#YumInstall Subversion

Determine if the installation was successful

1 #subversion -v

Svnserve, Version 1.6.11 (r934486)
The above prompts indicate that the installation was successful.

If prompted as follows:-bash:subversion:command not found
After finding:
[[Email protected]]# svnserve–version
Svnserve, Version 1.6.11 (r934486)
Compiled APR 11 2013, 16:13:51

Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository back-end (FS) modules is available:

* Fs_base:module for working with a Berkeley DB repository.
* Fs_fs:module for working with a plain file (FSFS) repository.

Cyrus SASL authentication is available.

With SVN software, you also need to build an SVN repository.

1 #mkdir /opt/svn/repos
2 #svnadmin create /opt/svn/repos

After executing the above command, we automatically set up several files under repos, namely Conf, Db,format,hooks, locks, README.txt.

2. Configuration

The above operation is very simple, a few commands will be done, the following operation is not difficult.
Go to the above generated folder conf, configure it, there are several files Authz, passwd, svnserve.conf
Where Authz is the permission control, you can set which users can access which directories, passwd is to set the user and password, Svnserve is to set up SVN-related operations.

2.1 Set passwd First

[Users]
# Harry = Harryssecret
# sally = Sallyssecret
Hello=123
User name = password

So we set up a hello user, 123 password

2.2 Set permissions again Authz

[/]
hello= RW

This means that the Hello user has read and write access to all directories, but can also be qualified.
If you use it yourself, read it directly.

2.3 Final Setting snvserv.conf

1 anon-access = none # 使非授权用户无法访问
2 auth-access = write # 使授权用户有写权限
3 password-db = password
4 authz-db = authz   # 访问控制文件
5 realm = /opt/svn/repos # 认证命名空间,subversion会在认证提示里显示,并且作为凭证缓存的关键字。

The default configuration is used. All of the above statements must be shelf written, the left cannot be blank, or an error will occur.

Well, with the above configuration, your svn will be OK.

3. Connection

Start SVN:

1 svnserve -d -r /opt/svn/repos

If you already have SVN running, you can run it on a different port.

1 svnserve -d -r /opt/svn/repos --listen-port 3391

So that the same server can run multiple Svnserver

OK, after the successful launch, you can use it.
It is recommended to use TORTOISESVN with the connection address: Svn://your server addresses (if port is required to specify ports: port number)

After the connection can upload the local files, effectively manage your code.

Through the above three steps, you can quickly build up SVN, open your project, if you feel useful, please leave a message, thank you for your support.
Reprint please famous from (Public Information Service network), thank you!

——————————————-Gorgeous split-line ————————————————————————————————
A demand
Development server Set up the SVN server, it is not possible to manage only one project, how to do not in one project developers can not access the code in other projects, do a good job of technical secrecy.
The code warehouse has three warehouses: project1,project2,project3
Suppose there are 6 people: Eg1,eg2,eg3,eg4,eg5,eg6
EG1,EG2, can only access Project1;
EG3,EG4, can only access project2;
Eg5,eg6, can only access project3;

Two implementations
Under your warehouse path: if it's/home/sv.
Cd/home/svn
Create three code warehouses
Svnadmin Create Project1
Svnadmin Create Project2
Svnadmin Create Project3
Copy two privilege profiles to SVN
Unified management of all code warehouses under the root path
Cd/projcet1/conf
CP Authz PASSWD/HOME/SVN
Open configuration file
VI svnserve.conf

Modified to read as follows:
Anon-access = none//Prohibit anonymous access
auth-access = Write
PASSWORD-DB =/HOME/SVN/PASSWD//Uniform use of password files
Authz-db =/home/svn/authz
Realm = Project1//permissions domain, it's important to write your project name

Modify the svnserve.conf of Project2 separately
As above, the last line is written separately
Anon-access = none//Prohibit anonymous access
auth-access = Write
PASSWORD-DB =/HOME/SVN/PASSWD//Uniform use of password files
Authz-db =/home/svn/authz
Realm = project2//permissions domain, it's important to write your project name

Modify the svnserve.conf of PROJECT3 separately
As above, the last line is written separately
Anon-access = none//Prohibit anonymous access
auth-access = Write
PASSWORD-DB =/HOME/SVN/PASSWD//Uniform use of password files
Authz-db =/home/svn/authz
Realm = project3//permissions domain, it's important to write your project name

Modify two Rights Management files:
passwd
User name = password
[Users]
EG1 = 123
EG2 = 123
EG3 = 123
EG4 = 123
EG5 = 123
EG6 = 123

Authz
[Groups]//group
admin = eg1,eg2
Guest = Eg3,eg4
Guset1 = Eg5,eg6
[/]//manager has all read and write privileges
* =
@admin = RW
[project1:/]//access control of Engineering 1, guest1,2 inaccessible
@admin = RW
Or
EG1 = RW
EG2 = RW
[project2:/]
@guest = RW
Or
EG3 = RW
EG4 = RW
[project3:/]
@guest1 = RW
Or
EG5 = RW
EG6 = RW

Triple start
Svnserve-d-R/HOME/SVN

Stop command
Killall Svnserve

Actual test:
Individual group members can only access their own projects, no permissions to view other people's projects
Only administrators can view all project projects

Linux Build SVN client and multiple project permissions Group management

Related Article

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.