Linux (centos) build SVN server

Linux (centos) build SVN server

The installation steps are as follows:

1,yum install subversion

2. Enter to rpm -ql subversionview the installation location, as shown in the figure below:

We know that svn generates several binary files in the bin directory.

Enter svn --help to see how to use svn, as shown in the figure below.

3. Create the svn version library directory

mkdir -p/var/svn/svnrepos

4. Create a version library

svnadmin create/var/svn/svnrepos

svn should be closed and opened after the configuration is completed

killall svnserve

svn open:

svnserve -d -r/var/svn/svnrepos === This is the repository

After executing this command, the following files will be generated in the/var/svn/svnrepos directory

5. Enter the conf directory (the svn version library configuration file)

The authz file is a permission control file

passwd is the account password file

svnserve.conf SVN service configuration file

6. Set account password

vi passwd

Add user and password in the [users] block, format: account=password, such as dan=dan

7. Set permissions

vi authz

Add the following code at the end:


This means that the root directory dan of the repository has read and write permissions for it, and w has only read permissions.

8. Modify the svnserve.conf file

vi svnserve.conf

Open the following comments:

anon-access = read #Anonymous users can read

auth-access = write #Authorized users can write

password-db = passwd #Which file to use as the account file

authz-db = authz #Which file to use as the permission file

realm =/var/svn/svnrepos # Certification space name, the directory where the repository is located

9. Start the svn repository

svnserve -d -r/var/svn/svnrepos

10. Test on windows

Create a new test folder, right-click the folder and select SVN checkout as shown below (TortoiseSVN must be installed in advance):

Fill in the address of SVN, as shown below:

Enter the password, as shown below:

Reference: linux (centos) build SVN server-Cloud + Community-Tencent Cloud