{"id":703,"date":"2014-08-11T10:04:18","date_gmt":"2014-08-11T10:04:18","guid":{"rendered":"http:\/\/www.pir8geek.com\/?p=703"},"modified":"2014-08-11T10:04:18","modified_gmt":"2014-08-11T10:04:18","slug":"setup-svn-server-ubuntu-14-04-lts-web-access","status":"publish","type":"post","link":"https:\/\/www.jameseduard.com\/?p=703","title":{"rendered":"How to setup SVN Server on Ubuntu 14.04 LTS with Web Access"},"content":{"rendered":"<p><strong>SVN<\/strong><em> (Subversion)<\/em> is an opensource version control system. it is used to store previous changes of your project files like documentation, coding etc. also you can track and identify who made the particular changes in the project files .<br \/>\nIn this article we will guide you how to install SVN Server on Ubuntu 14.04 Server Edition or LTS Edition.<br \/>\n&nbsp;<br \/>\nTo setup SVN Server on ubuntu 14.04 server edition.<br \/>\n<strong>1. First installed\/update ubuntu repositories with the following command.<\/strong><\/p>\n<pre>sudo apt-get update\n<\/pre>\n<p><strong>2. After updating the repositories we can now install the SVN and apache webserver, we need apache in able to access our SVN \u00a0repo through http\/web access.<\/strong><br \/>\n&nbsp;<br \/>\nTo install apache and SVN,<\/p>\n<pre>sudo apt-get install subversion apache2 libapache2-svn apache2-utils\n<\/pre>\n<p><strong>3. Next is to create a directory\u00a0where you want to keep your repositories.<\/strong><br \/>\nfor my default setup i used: \/svn\/<\/p>\n<pre>sudo mkdir -p \/svn\/\n<\/pre>\n<p>and edit dav_svn.conf file<\/p>\n<pre>sudo nano \/etc\/apache2\/mods-enabled\/dav_svn.conf\n<\/pre>\n<p>Default config<\/p>\n<pre># dav_svn.conf - Example Subversion\/Apache configuration\n#\n# For details and further options see the Apache user manual and\n# the Subversion book.\n#\n# NOTE: for a setup with multiple vhosts, you will want to do this\n# configuration in \/etc\/apache2\/sites-available\/*, not here.\n#  ... \n# URL controls how the repository appears to the outside world.\n# In this example clients access the repository as http:\/\/hostname\/svn\/\n# Note, a literal \/svn should NOT exist in your document root.\n#\n  # Uncomment this to enable the repository\n  #DAV svn\n  # Set this to the path to your repository\n  #SVNPath \/var\/lib\/svn\n  # Alternatively, use SVNParentPath if you have multiple repositories under\n  # under a single directory (\/var\/lib\/svn\/repo1, \/var\/lib\/svn\/repo2, ...).\n  # You need either SVNPath and SVNParentPath, but not both.\n  #SVNParentPath \/var\/lib\/svn\n  # Access control is done at 3 levels: (1) Apache authentication, via\n  # any of several methods.  A \"Basic Auth\" section is commented out\n  # below.  (2) Apache  and , also commented out\n  # below.  (3) mod_authz_svn is a svn-specific authorization module\n  # which offers fine-grained read\/write access control for paths\n  # within a repository.  (The first two layers are coarse-grained; you\n  # can only enable\/disable access to an entire repository.)  Note that\n  # mod_authz_svn is noticeably slower than the other two layers, so if\n  # you don't need the fine-grained control, don't configure it.\n  # Basic Authentication is repository-wide.  It is not secure unless\n  # you are using https.  See the 'htpasswd' command to create and\n  # manage the password file - and the documentation for the\n  # 'auth_basic' and 'authn_file' modules, which you will need for this\n  # (enable them with 'a2enmod').\n  #AuthType Basic\n  #AuthName \"Subversion Repository\"\n  #AuthUserFile \/etc\/apache2\/dav_svn.passwd\n  # To enable authorization via mod_authz_svn (enable that module separately):\n  #\n  #AuthzSVNAccessFile \/etc\/apache2\/dav_svn.authz\n  #\n  # The following three lines allow anonymous read, but make\n  # committers authenticate themselves.  It requires the 'authz_user'\n  # module (enable it with 'a2enmod').\n  #\n    #Require valid-user\n  # \n#\n<\/pre>\n<p>Uncomment the following and your done.<\/p>\n<pre>DAV svn\nSVNParentPath \/svn\nAuthType Basic\nAuthName \"Subversion Repository\"\nAuthUserFile \/etc\/apache2\/dav_svn.passwd\nRequire valid-user\n<\/pre>\n<p><strong>4. To create a svn user simple run the following command.<\/strong><\/p>\n<pre>sudo htpasswd -cm \/etc\/apache2\/dav_svn.passwd pr3p\n<\/pre>\n<p>Then input the requireed password for the user.<br \/>\n<strong>5. Ok lets create svn repo directory for your files.<\/strong><\/p>\n<pre>cd \/svn\nsudo svnadmin create test_repo\n<\/pre>\n<p>Make sure you set the permissions of the \/svn directory to apache with the following command:<\/p>\n<pre>sudo chown -R www-data:www-data \/svn\n<\/pre>\n<p><strong>6. Restart the apache2 service:<\/strong><\/p>\n<pre>sudo \/etc\/init.d\/apache2 restart\n<\/pre>\n<p><strong>7. Ok almost done lets test the svn server, on your windows machine create a folder and right click and select the SVN Checkout, and type the domain url of your repository file.<\/strong><br \/>\nTo view the svn repositories on web, just go to browser and type the server ip\/domainame with svn repo folder, on my end my server ip address <a href=\"http:\/\/192.168.221.222\/svn\/test_repo\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>http:\/\/192.168.221.222\/svn\/test_repo<\/strong><\/a> and input the required user authentication.<br \/>\nuser: pr3p<br \/>\npass: ****<br \/>\n<strong>Web Access:<\/strong><br \/>\n<a href=\"http:\/\/www.pir8geek.com\/wp-content\/uploads\/2014\/08\/svnpr3p.png\"><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-713\" src=\"http:\/\/www.pir8geek.com\/wp-content\/uploads\/2014\/08\/svnpr3p.png\" alt=\"svnpr3p\" width=\"1919\" height=\"1079\" \/><\/a><br \/>\n&nbsp;<br \/>\n<strong>8. In able to checkout or do commits download <em>svn tortoise\u00a0<\/em> tools<\/strong><br \/>\n<a href=\"http:\/\/tortoisesvn.net\/\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"font-weight: bold; color: #545454;\">TortoiseSVN<\/span><\/a><span style=\"color: #545454;\"><a href=\"http:\/\/tortoisesvn.net\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u00a0<\/a>is free software for software developers (programmers). It helps programmers manage different versions of the source code for their programs.<\/span><br \/>\n<strong>Download here:\u00a0<\/strong><a href=\"http:\/\/tortoisesvn.net\/\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/tortoisesvn.net\/<\/a><br \/>\n&nbsp;<br \/>\n<a href=\"http:\/\/www.pir8geek.com\/wp-content\/uploads\/2014\/08\/svncheckout.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-711\" src=\"http:\/\/www.pir8geek.com\/wp-content\/uploads\/2014\/08\/svncheckout.jpg\" alt=\"svncheckout\" width=\"1436\" height=\"894\" \/><\/a><br \/>\n<a href=\"http:\/\/www.pir8geek.com\/wp-content\/uploads\/2014\/08\/svn2.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-705\" src=\"http:\/\/www.pir8geek.com\/wp-content\/uploads\/2014\/08\/svn2.png\" alt=\"svn2\" width=\"1433\" height=\"895\" \/><\/a><br \/>\nEnter the repository\u2019s URL and click OK, it will be prompted for a login and password. Enter the login information and click OK.<br \/>\n<strong>9. Create some test file inside the checkout repository, Right-Click and Select the SVN Commit:<\/strong><br \/>\n<a href=\"http:\/\/www.pir8geek.com\/wp-content\/uploads\/2014\/08\/svntestfile.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-706\" src=\"http:\/\/www.pir8geek.com\/wp-content\/uploads\/2014\/08\/svntestfile.png\" alt=\"svntestfile\" width=\"1435\" height=\"895\" \/><\/a><br \/>\n<strong>10. Enter the comments that describe the purpose of this commit:<\/strong><br \/>\n<a href=\"http:\/\/www.pir8geek.com\/wp-content\/uploads\/2014\/08\/svncommit.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-707\" src=\"http:\/\/www.pir8geek.com\/wp-content\/uploads\/2014\/08\/svncommit.png\" alt=\"svncommit\" width=\"1429\" height=\"887\" \/><\/a><br \/>\n<strong>11. and congrats your SVN Server is pretty working fine, the result would be like this<\/strong><br \/>\n<a href=\"http:\/\/www.pir8geek.com\/wp-content\/uploads\/2014\/08\/svnrev.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-708\" src=\"http:\/\/www.pir8geek.com\/wp-content\/uploads\/2014\/08\/svnrev.png\" alt=\"svnrev\" width=\"1437\" height=\"899\" \/><\/a><br \/>\n&nbsp;<br \/>\nEnjouy cyah&#8230;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SVN (Subversion) is an opensource version control system. it is used to store previous changes of your project files like documentation, coding etc. also you can track and identify who made the particular changes in the project files . In this article we will guide you how to install SVN Server on Ubuntu 14.04 Server<\/p>\n","protected":false},"author":1,"featured_media":739,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[47,49],"tags":[370,371],"class_list":["post-703","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-tos","category-ubuntu","tag-svn-server","tag-tortoise-svn"],"_links":{"self":[{"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=\/wp\/v2\/posts\/703","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=703"}],"version-history":[{"count":0,"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=\/wp\/v2\/posts\/703\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=703"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=703"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}