The idea of linux (centos7) to build SVN server

  • 2020-05-27 08:03:17
  • OfStack

How to set up SVN server under linux (centos) Speaking of SVN server, you probably know how to set up SVN server under LINUX. So today I would like to share with you the idea of linux (centos) to build SVN server!

Although building SVN on windows is easy, it is not as efficient as building linux, while building SVN on linux is quite tedious, so today this article will show you how to build SVN on Centos, step by step.

The installation steps are as follows

1. Install


sudo yum install subversion

View the installation location


sudo rpm -ql subversion

2. Create a version library


sudo mkdir -p /var/svn
sudo svnadmin create /var/svn/project_1

Configuration of 3.

Enter the conf directory (the svn version library profile)

The authz file is a permission control file
passwd is the account password file
svnserve.conf SVN service profile

1). Set the account password


sudo vim passwd

Add the user and password in the block [users] in the format: account number = password, as junwei = junwei
For the full content, please refer to the following:


[users]
june = june
junwei = junwei

2). Set permissions


sudo vim authz

Add the following code at the end:


admin = junwei
[/]
@admin = rw

For the full content, please refer to the following:


[aliases]
[groups]
admin=june
user=june,junwei
[/]
@admin=rw
@user=rw

This means that junwei, the root directory of the version library, has read and write access to it

3). Modify svnserve.conf


sudo vim svnserve.conf

Open the following comments:

anon-access = read # anonymous user readable
auth-access = write # authorized user writable
password-db = passwd # which file to use as account file
authz-db = authz # which file to use as the permissions file
realm = /var/svn/svnrepos # authenticates the name of the space in which the version library is located

Note: to configure the location, refer to the following


[general]
anon-access = read
auth-access = write
password-db = passwd
authz-db = authz
realm = /var/svn/project_1
# force-username-case = none
[sasl]
# use-sasl = true
# min-encryption = 0
# max-encryption = 256

4. Start the svn version library


sudo rpm -ql subversion
0

5. Test on windows

Under a directory, right click on the select "SVN Checkout" in the pop-up Checkout box input svn: / / ip project_1, click OK will pop-up prompts for a user name and password, determine OK, l can upload a file test.


Related articles: