In this post, I will write about how I set up SVN server to Ubuntu 18.04 (LTS) x64 droplets
Then enter to ssh server by the address with command:
ssh root@{Server address}
Installing Apache and SVN module
Installing Apache
sudo apt-get update
sudo apt-get install apache2
Installing SVN module
sudo apt-get install subversion libapache2-mod-svn
Enable required modules
sudo a2enmod dav dav_svn authz_svn
Restart Apache
sudo service apache2 restart
Create new repository
Create repositories storing directory
sudo mkdir -p /var/lib/svn/
Set repositories storing directory permissions
sudo chown -R www-data:www-data /var/lib/svn
sudo chmod -R 775 /var/lib/svn
Create users into file: /etc/apache2/dav_svn.passwd
sudo touch /etc/apache2/dav_svn.passwd
sudo htpasswd -m /etc/apache2/dav_svn.passwd {Your Username}
Set SVN module config
sudo nano /etc/apache2/mods-enabled/dav_svn.conf
Copy following config content to the file
<Location /svn>
DAV svn
SVNParentPath /var/lib/svn
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd
Require valid-user
</Location>
Create new SVN repository into repositories storing directory (/var/lib/svn/)
sudo svnadmin create /var/lib/svn/{Repository name}
Restart Apache
sudo service apache2 restart
Try it by using web-browser, browse: http://{Server address}/svn/{Repository name}
Top comments (0)