1. Uninstall the SVN

Check if you have SVN installed on your system with the following command:

svn

The above display is not installed, if the display message that has been installed, you can use the following command to uninstall:

sudo apt-get remove –purge subversion

(The — purge option deletes the modified software and associated files completely.)

2. Install SVN

It is recommended to update Z before installation and then install:

sudo apt-get update

sudo apt-get install subversion

The image above shows a successful installation.

To verify this, use the following command:

SVN help // SVN help

SVN –version //– SVN –version

Svnserve –version //– SVN server version

3. Create SVN library

A: Create project directory and SVN repository:

sudo mkdir /home/svn

sudo mkdir /home/svn/repository

sudo chmod -R 777 /home/svn/repository

sudo svnadmin create /home/svn/repository

After executing the command, the following files are generated in Repository:

Permission setting on DB:

sudo chmod -R 777 db

Note:

If you do not execute the above command, the following error will be reported:

By default, only root can write to the folder, because root’s umask is 0022. Other users do not have write permission.

  • Set access rights: Files in the conf folder need to be modified

    vim /usr/local/svn/repository/conf/svnserve.conf

  • Simple changes to a few configurations

    Anon-access = read (can be changed to none, # auth-access = writePassword = passwdpassword-db = passwd# authzauthz-db = authz

    (Remove the # from the front and top space, otherwise it may report an error.)

  • Modify the passwd file to add an accessing user

    vim /usr/local/svn/repository/conf/passwd

  • Modify the authz file and set user permissions

    vim /usr/local/svn/repository/conf/authz

    Admin = guoke// User guoke belongs to the admin group

    [repository:/]

    @admin = rw //admin group has read and write privileges

    • = rw All groups have read and write permissions

  • Start the server

    svnserve -d -r /usr/local/svn

  • Use the following command to see if svnserve is running

    ps aux | grep svnserve

  • 15

    test

    SVN co SVN: / / 127.0.0.1 / repository – the username guoke — password 123456

    Svnserve: E000098: Could not bind server socket: address already in use

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

copyright

Why does this happen? The default port is 3690. When you start the second version of the repository, it is still 3690. # svnserve-d-r/MNT /westos –listen-port 3691 # svnserve-d-r/MNT /westos –listen-port 3691

Query the current open service [root @ localhost conf] # netstat antple | grep SVN TCP 0 0: : : 3690: 😕 LISTEN 0 125064 7427/svnserve tcp 0 0 :::3691 ::? LISTEN 0 125826 7617/svnserve