Github ditching password authentication forced me to setup my own source codes versioning repository. Launch a new Ubuntu 20.04 EC2 and run the below command
sudo apt update
sudo apt upgrade
Install Apache. Service should be started post installation
sudo apt install apache2 apache2-utils
Install Subversion SVN. Module “dav” and “dav_svn” should be enabled post installation.
sudo apt install subversion libapache2-mod-svn subversion-tools libsvn-dev
Configure Subversion SVN. Please note the change at SVNParentPath.
sudo vim /etc/apache2/mods-enabled/dav_svn.conf
Create SVN parent path folder
sudo mkdir /var/www/svn
Create a repository named “project”. Change the ownership recursively to “www-data”
sudo svnadmin create /var/www/svn/project
sudo chown -R www-data:www-data /var/www/svn
Create the first user. Lets say “admin”
sudo htpasswd -cm /etc/apache2/dav_svn.passwd admin
Create more user. Note that I omitted -c
sudo htpasswd -m /etc/apache2/dav_svn.passwd kevin
Restart Apache
sudo service apache2 restart
Test it
http://<ip_address>/svn/project
Some commonly use SVN commands can be found here