Install svn under linux

The system of my cloud server is centos 7.1. This method is suitable for execution under this system, and other systems have not tried it, please pay attention.

First install the svn service

1 # yum install subversion

2 Then check the installed version number because the version number may be different.

# yum install subversion  

Version Information

[root@VM_137_37_centos ~]# svnserve --version

svnserve, version 1.7.14 (r1542130)

   compiled Nov 20 2015, 19:25:09

 

Copyright (C) 2013 The Apache Software Foundation.

This software consists of contributions made by many people; see the NOTICE

file for more information.

Subversion is open source software, see http://subversion.apache.org/

 

The following repository back-end (FS) modules are 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.

3 Create a suitable repository for storing svn

mkdir -p /home/svn/svnrepos

4 Create a repository   svnadmin create /home/svn/svnrepos

5 Then go to the created repository address to create a  repository cd  /home/svn/svnrepos

There will be the following:

[root@VM_137_37_centos svnrepos]# ls -1

README.txt

conf

db

format

hooks

locks

6 Then enter the conf file to modify the content cd conf/

authz file is the permission control file
passwd is the account password file
svnserve.conf SVN service configuration file

7 Change password

### This file is an example password file for svnserve.

### Its format is 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 per line.

 

[users]

# harry = harryssecret

# sally = sallyssecret

quwenzhe=123456

 

Add a user password

8 Modify permissions

html]  view plaincopy
 

 

  1. [/]  
  2. quwenzhe=rw  

Let it have read and write permissions. If you have special permissions, you need to find it on svn.

9 Modify the svnserve.conf file   vi svnserve.conf

anon-access = read #Anonymous users can read
auth-access = write #Authorized users can write
password-db = passwd #Which file is used as the account file
authz-db = authz # Which file is used as the permission file
realm = /home/svn /svnrepos # Authentication space name, the directory where the repository is located

Note that there can be no space in front of the comment after removing the comment, otherwise an error will be reported when executing

10 start svn

 svnserve -d -r /var/svn/svnrepos (stop SVN command   killall svnserve )

11 Then you can go to test on windows

Just enter the address of svn, you can leave the content behind

 and click OK to let it enter the account and password just set on passwd.

I also encountered a lot of problems when I first built it. For example, when editing the passwd file, there have been problems because of the unfamiliarity with the liunx system, so please follow the steps strictly when using it. Writing it out is also to consolidate yourself, and spread it so that everyone can use it correctly. If you have any questions, you can communicate at any time.

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326326535&siteId=291194637