1. Install the SVN server side
Yum Install Subversion
Download and install the SVN server side from the image
The middle will prompt whether OK, enter Y, confirm
Installation success prompt: ... complete!
Execute the following command in turn:
cd/usr/local///Enter directory, ready to create SVN directory
mkdir Svnrepo//Create an SVN directory
Chmod-r 777 Svnrepo//Modify directory permission to 777
Svnadmin Create/usr/local/svnrepo/first//Create an SVN version repository first (you can name it)
CD first/conf//Enter the configuration file directory under the first version of the warehouse
2. To modify the three configuration files under this directory
(1) VI svnserve.conf//configuration repository information and user file and user password file path, repository path
Put
# anon-access = Read
# auth-access = Write
# password-db = passwd
These four lines, the front # number and the space are removed, and become
Anon-access = none//change to None
auth-access = Write
Password-db = passwd
Realm = first//change to your own version library
Save exit
(2) vi Authz//files, creating permissions for SVN Group and group users
[Group]
First = DDL,SHL//Create a first group and develop two user DDL and SHL
[/]//define permissions under the root directory
@first = RW//first Group user rights are read and write
* = r//other users have read access only
Save exit
(3) VI passwd//Create or modify user passwords
[Users]
DDL = 123456//user named GEP has a password of 123456
SHL = 123456//...
Save exit
3. Then to set the self-start
Vi/etc/rc.local
Open a self-boot file
The file contents are as follows
#!/bin/sh
#
# This script is executed *after* all and the other init scripts.
# can put your own initialization stuff in here if you don ' t
# want to does the full Sys V style init stuff.
Touch/var/lock/subsys/local
Add the following line
Svnserve-d-r/usr/local/svnrepo/first
Save exit
SVN command:
Lsof-i: 3690 See if SVN starts
PS aux |grep ' svn ' Find all SVN-initiated processes
Kill-9 2505 kills 2505 of this found SVN process
svnserve-d-r/usr/local/svnrepo/first Start svn (you can put this in the/etc/local/rc.local file for boot-up)
SVN repository starting mode, now Svnrepo has first, test two repository
1: Single-version library starter svnserve-d-r/usr/local/svnrepo/first
2: Multi-version Library starter svnserve-d-r/usr/local/svnrepo
The difference is the start of the SVN command in the startup parameter-r specified directory.
4. Restrict different users to different repository operation permissions, modify Authz file in conf directory in repository
To configure the first repository as an example
VI Authz
[Groups]
Company = User1,user2
[first:/]//Specify repository and directory permissions
@company = RW//company Group user rights are read and write
* = r//other users have read access only
Save exit
VI passwd set the user's account number and password in the group
[Users]
User1 = 123456
User2 = 123456
5. Client Access
Assume that the client uses TORTOISESVN
Open the Repository browser to enter the address, svn://your SVN server ip:3690
Enter the user name DDL password 12345
Because there is no net repository in the file so you need to use the client right-click "Create Forder", and then "Add Forder"
Http://bbs.aliyun.com/read/9715.html?spm=5176.7114037.1996646101.1.W3zw3X&pos=1
Installing Subversion on Linux