{"id":219,"date":"2011-01-21T23:00:30","date_gmt":"2011-01-21T23:00:30","guid":{"rendered":"http:\/\/www.muratyaman.co.uk\/wp\/?p=219"},"modified":"2020-04-01T12:44:22","modified_gmt":"2020-04-01T11:44:22","slug":"installing-svn-server-on-fedora-linux","status":"publish","type":"post","link":"https:\/\/www.muratyaman.co.uk\/blog\/index.php\/2011\/01\/installing-svn-server-on-fedora-linux\/","title":{"rendered":"Installing SVN Server on Fedora Linux"},"content":{"rendered":"<p>I used <strong>Sun Virtual Box<\/strong> before. I&#8217;ve just installed <a href=\"http:\/\/www.oracle.com\/technetwork\/server-storage\/virtualbox\/overview\/index.html\">Oracle Virtual Box<\/a> on my old Vista to try <a href=\"http:\/\/fedoraproject.org\/\">Fedora 14<\/a>. All I had to do was to download <a href=\"http:\/\/fedoraproject.org\/en\/get-fedora-all\">x86_64 Network Install CD<\/a> and go through a minimal installation. <\/p>\n<p>The first hiccup was I needed to <strong>eject CD<\/strong> (ISO image) of the virtual machine (VM) when the installer required to reboot the system. Then, I took a snapshot of this minimalistic system, about 1.1GB.<\/p>\n<p>The second hiccup was the network adapter. I could not connect to the Internet. The VM was set up to use NAT by default. I had to change it to bridged. After restarting the VM, I had to run:<\/p>\n<pre lang=\"bash\">\r\n\/etc\/init.d\/network restart\r\n<\/pre>\n<p>And I could connect using <a href=\"http:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/\">putty<\/a> from my Vista environment.<\/p>\n<p>I prefer to run Subversion with Apache HTTP Server. So;<\/p>\n<pre lang=\"bash\">\r\nyum install httpd\r\n<\/pre>\n<p><a href=\"http:\/\/www.muratyaman.co.uk\/wp\/wp-content\/uploads\/2011\/01\/yum-install-httpd-dependencies.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.muratyaman.co.uk\/wp\/wp-content\/uploads\/2011\/01\/yum-install-httpd-dependencies-300x117.jpg\" alt=\"yum install httpd dependencies\" title=\"yum-install-httpd-dependencies\" width=\"300\" height=\"117\" class=\"aligncenter size-medium wp-image-223\" srcset=\"https:\/\/www.muratyaman.co.uk\/blog\/wp-content\/uploads\/2011\/01\/yum-install-httpd-dependencies-300x117.jpg 300w, https:\/\/www.muratyaman.co.uk\/blog\/wp-content\/uploads\/2011\/01\/yum-install-httpd-dependencies.jpg 850w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>I&#8217;m not a <a href=\"http:\/\/en.wikipedia.org\/wiki\/Vi\">vi<\/a> fan, so I had to install <a href=\"http:\/\/www.nano-editor.org\/\">nano<\/a> to edit configuration files easily:<\/p>\n<pre lang=\"bash\">\r\nyum install nano\r\n<\/pre>\n<p>To install <a href=\"http:\/\/subversion.apache.org\/packages.html\">Subversion<\/a> on Fedora, they say you can run:<\/p>\n<pre lang=\"bash\">\r\nyum install subversion\r\n<\/pre>\n<p>Yum checks dependencies and you have to accept to install them as well.<\/p>\n<figure id=\"attachment_220\" aria-describedby=\"caption-attachment-220\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.muratyaman.co.uk\/wp\/wp-content\/uploads\/2011\/01\/yum-install-subversion-dependencies.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.muratyaman.co.uk\/wp\/wp-content\/uploads\/2011\/01\/yum-install-subversion-dependencies-300x196.jpg\" alt=\"\" title=\"yum-install-subversion-dependencies\" width=\"300\" height=\"196\" class=\"size-medium wp-image-220\" srcset=\"https:\/\/www.muratyaman.co.uk\/blog\/wp-content\/uploads\/2011\/01\/yum-install-subversion-dependencies-300x196.jpg 300w, https:\/\/www.muratyaman.co.uk\/blog\/wp-content\/uploads\/2011\/01\/yum-install-subversion-dependencies.jpg 850w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-220\" class=\"wp-caption-text\">yum install subversion dependencies<\/figcaption><\/figure>\n<p>Also, to glue the two server (SVN and Apache HTTP) install mod_dav_svn:<\/p>\n<pre lang=\"bash\">\r\nyum install mod_dav_svn\r\n<\/pre>\n<p><a href=\"http:\/\/www.muratyaman.co.uk\/wp\/wp-content\/uploads\/2011\/01\/yum-install-mod_dav_svn.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.muratyaman.co.uk\/wp\/wp-content\/uploads\/2011\/01\/yum-install-mod_dav_svn-300x134.jpg\" alt=\"yum install mod_dav_svn\" title=\"yum-install-mod_dav_svn\" width=\"300\" height=\"134\" class=\"aligncenter size-medium wp-image-224\" srcset=\"https:\/\/www.muratyaman.co.uk\/blog\/wp-content\/uploads\/2011\/01\/yum-install-mod_dav_svn-300x134.jpg 300w, https:\/\/www.muratyaman.co.uk\/blog\/wp-content\/uploads\/2011\/01\/yum-install-mod_dav_svn.jpg 850w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>I&#8217;m sure you will find SVN easy to use, and find many sites explaining how to creating a new repository (or repositories, another debate).<\/p>\n<pre lang=\"bash\">\r\ncd \/the-path-to-svn-repository\r\n#such as \/var\/www\/svn\r\nsvnadmin create repo\r\nsvn mkdir file:\/\/\/var\/www\/svn\/repo\/project1 -m \"Creating project1\"\r\n<\/pre>\n<p><a href=\"http:\/\/www.muratyaman.co.uk\/wp\/wp-content\/uploads\/2011\/01\/svnadmin-create-repo.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.muratyaman.co.uk\/wp\/wp-content\/uploads\/2011\/01\/svnadmin-create-repo-300x106.jpg\" alt=\"svnadmin create repo\" title=\"svnadmin-create-repo\" width=\"300\" height=\"106\" class=\"aligncenter size-medium wp-image-225\" srcset=\"https:\/\/www.muratyaman.co.uk\/blog\/wp-content\/uploads\/2011\/01\/svnadmin-create-repo-300x106.jpg 300w, https:\/\/www.muratyaman.co.uk\/blog\/wp-content\/uploads\/2011\/01\/svnadmin-create-repo.jpg 850w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>There are many ways to create a layout but I choose to create a directory per project with sub-directories of trunk, branches and tags.<\/p>\n<pre lang=\"bash\">\r\nsvn mkdir file:\/\/\/var\/www\/svn\/repo\/project1 -m \"Creating project1\"\r\n<\/pre>\n<p>Inside your home directory checkout project1 (still empty directory):<\/p>\n<pre lang=\"bash\">\r\ncd ~\r\nsvn checkout file:\/\/\/var\/www\/svn\/repo\/project1 project1\r\ncd project1\r\nmkdir trunk\r\nmkdir branches\r\nmkdir tags\r\nsvn add trunk branches tags\r\nsvn commit -m \"Initial layout for project1\"\r\n<\/pre>\n<p><a href=\"http:\/\/www.muratyaman.co.uk\/wp\/wp-content\/uploads\/2011\/01\/svn-checkout-project1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.muratyaman.co.uk\/wp\/wp-content\/uploads\/2011\/01\/svn-checkout-project1-300x145.jpg\" alt=\"svn checkout project1\" title=\"svn-checkout-project1\" width=\"300\" height=\"145\" class=\"aligncenter size-medium wp-image-227\" srcset=\"https:\/\/www.muratyaman.co.uk\/blog\/wp-content\/uploads\/2011\/01\/svn-checkout-project1-300x145.jpg 300w, https:\/\/www.muratyaman.co.uk\/blog\/wp-content\/uploads\/2011\/01\/svn-checkout-project1.jpg 850w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Now, let&#8217;s share our SVN repository with our team members.<\/p>\n<pre lang=\"bash\">\r\ncd \/etc\/httpd\/conf.d\/\r\nnano subversion.conf\r\n<\/pre>\n<figure id=\"attachment_232\" aria-describedby=\"caption-attachment-232\" style=\"width: 292px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.muratyaman.co.uk\/wp\/wp-content\/uploads\/2011\/01\/subversion.conf_1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.muratyaman.co.uk\/wp\/wp-content\/uploads\/2011\/01\/subversion.conf_1-292x300.jpg\" alt=\"subversion.conf\" title=\"subversion.conf\" width=\"292\" height=\"300\" class=\"size-medium wp-image-232\" srcset=\"https:\/\/www.muratyaman.co.uk\/blog\/wp-content\/uploads\/2011\/01\/subversion.conf_1-292x300.jpg 292w, https:\/\/www.muratyaman.co.uk\/blog\/wp-content\/uploads\/2011\/01\/subversion.conf_1.jpg 762w\" sizes=\"auto, (max-width: 292px) 100vw, 292px\" \/><\/a><figcaption id=\"caption-attachment-232\" class=\"wp-caption-text\">subversion.conf<\/figcaption><\/figure>\n<p>For me, main point is to be able to serve SVN repository, so, just define the location and change ownership\/permissions on directory for SVN repository.<\/p>\n<pre lang=\"bash\">\r\ncd \/var\/www\/svn\r\nchown -R apache.apache repo\r\n<\/pre>\n<p>The system is ready to be used by team members remotely using SVN clients such as <a href=\"http:\/\/tortoisesvn.tigris.org\/\">TortoiseSVN<\/a>. On the command line, it is as easy as:<\/p>\n<pre lang=\"bash\">\r\nsvn co http:\/\/localhost\/svn\/repo\/project1 project1\r\n<\/pre>\n<p>Later, I may write about <a href=\"http:\/\/subclipse.tigris.org\/\">Subclipse<\/a> which adds SVN integration to my favourite PHP IDE, <a href=\"http:\/\/www.eclipse.org\/pdt\/\">Eclipse PDT<\/a>.<\/p>\n<p>Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I used Sun Virtual Box before. I&#8217;ve just installed Oracle Virtual Box on my old Vista to try Fedora 14.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[39,126,48,129,160],"class_list":["post-219","post","type-post","status-publish","format-standard","hentry","category-technology","tag-apache","tag-linux","tag-svn","tag-vcs","tag-virtualization"],"_links":{"self":[{"href":"https:\/\/www.muratyaman.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/posts\/219","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.muratyaman.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.muratyaman.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.muratyaman.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.muratyaman.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=219"}],"version-history":[{"count":9,"href":"https:\/\/www.muratyaman.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/posts\/219\/revisions"}],"predecessor-version":[{"id":958,"href":"https:\/\/www.muratyaman.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/posts\/219\/revisions\/958"}],"wp:attachment":[{"href":"https:\/\/www.muratyaman.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=219"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.muratyaman.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=219"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.muratyaman.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}