Creating SVN Repository In UBUNTU (Linux) System

1) Up-to-Date Installed Packages
sudo apt-get update
2) Downloading the Subversion, Subversion Tools and Libapache2 packages
you need to run svn subversion and it's tools by using commands
sudo apt-get install subversion subversion-tools libapache2-svn
3) Creating Subversion (SVN) Directory
creating svn directory, where you want to configure svn.
sudo mkdir /home/svn


4) Creating a Test Repository
sudo mkdir ~/test
sudo svnadmin create /home/svn/test -m 'initial project structure'
5) Adding files into test projects.
In svn configuration test repository required some file in repository that is trunk, tags, branches
cd ~/test
mkdir trunk tags branches
6) You are now ready to import these new directories into the test repository, using the following command:

sudo svn import ~/test file:///home/svn/test -m 'Initial project directories'

7) Give owner group permission.
sudo chown -R www-data:www-data /home/svn

Configuration of Apache

8) Use following command to enable dav_svn Apache configuration
sudo a2enmod dav_svn

9) After having enabled this, you would be required to modify the Apache configuration file (as follows):

sudo nano /etc/apache2/mods-enabled/dav_svn.conf
OR
sudo vi /etc/apache2/mods-enabled/dav_svn.conf
Right at the bottom of the file, please add the following lines, before saving the file by hitting Ctrl+X.
Alias /svn /home/svn
<Location /svn>

   DAV svn
   SVNParentPath /home/svn

   AuthType Basic
   AuthName "Subversion Repository"
   AuthUserFile /etc/apache2/dav_svn.passwd
   Require valid-user
    
</Location>

10) set password
sudo htpasswd -cm /etc/apache2/dav_svn.passwd admin

Set It's password, and conform it.

11) After having saved this, you must restart the Apache service so as to implement the changes, by using the following command:

sudo service apache2 restart