DEV Community

insthync
insthync

Posted on

3 3

[Note] Installing SVN Server to Droplets

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}
Enter fullscreen mode Exit fullscreen mode

Installing Apache and SVN module

Installing Apache

sudo apt-get update
sudo apt-get install apache2
Enter fullscreen mode Exit fullscreen mode

Installing SVN module

sudo apt-get install subversion libapache2-mod-svn
Enter fullscreen mode Exit fullscreen mode

Enable required modules

sudo a2enmod dav dav_svn authz_svn
Enter fullscreen mode Exit fullscreen mode

Restart Apache

sudo service apache2 restart
Enter fullscreen mode Exit fullscreen mode

Create new repository

Create repositories storing directory

sudo mkdir -p /var/lib/svn/
Enter fullscreen mode Exit fullscreen mode

Set repositories storing directory permissions

sudo chown -R www-data:www-data /var/lib/svn
sudo chmod -R 775 /var/lib/svn
Enter fullscreen mode Exit fullscreen mode

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}
Enter fullscreen mode Exit fullscreen mode

Set SVN module config

sudo nano /etc/apache2/mods-enabled/dav_svn.conf
Enter fullscreen mode Exit fullscreen mode

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>
Enter fullscreen mode Exit fullscreen mode

Create new SVN repository into repositories storing directory (/var/lib/svn/)

sudo svnadmin create /var/lib/svn/{Repository name}
Enter fullscreen mode Exit fullscreen mode

Restart Apache

sudo service apache2 restart
Enter fullscreen mode Exit fullscreen mode

Try it by using web-browser, browse: http://{Server address}/svn/{Repository name}

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay