SVN服务器的安装和配置

Install SVN server for ubuntu server 16.04

Modify date 2018.6.30

- Install package subversion and create repository.

sudo apt-get install subversion
sudo mkdir /home/svn
sudo svnadmin create /home/svn/repo
cd /home/svn/repo/conf

- Setup some permissions and paths.

sudo vim svnserve.conf
[general]
anon-access = none
auth-access = write
password-db = passwd
authz-db = authz
[sasl]

- Setup username and password for SVN accounts.

sudo vim passwd
[users]
username = password

- Setup access permissions for SVN accounts.

sudo vim authz
[aliases]
[groups]
admin = username
[repo:/]
@admin = rw
* = r

- Start up SVN server

sudo svnserve -d -r /home/svn

- You can access the SVN server by using SVN client and following address.

svn://localhost:3690/repo

- Install package libapache2-svn.

sudo apt-get install apache2
sudo apt-get install libapache2-svn

- Some configures.

sudo vim /etc/apache2/mods-available/dav_svn.conf

DAV svn
SVNParentPath /home/svn
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd
Require valid-user

- Setup username and password.

sudo htpasswd -c /etc/apache2/dav_svn.passwd username

- Restart apache2 service.

sudo /etc/init.d/apache2 restart

- You can access the SVN server by using web browser and following address.

http://localhost:80/svn/repo

【备忘用】

你可能感兴趣的:(SVN)