{"id":263,"date":"2010-06-27T04:39:49","date_gmt":"2010-06-27T04:39:49","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/2010\/06\/27\/how-to-install-subversion-on-linux\/"},"modified":"2018-09-25T09:41:04","modified_gmt":"2018-09-25T09:41:04","slug":"how-to-install-subversion-on-linux","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/how-to-install-subversion-on-linux\/","title":{"rendered":"How to install subversion on Linux?"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4429 aligncenter\" src=\"http:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2010\/06\/subversion-on-linux-install.png\" alt=\"subversion-on-linux-installation-process\" width=\"600\" height=\"400\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2010\/06\/subversion-on-linux-install.png 600w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2010\/06\/subversion-on-linux-install-300x200.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>To install svn in linux and make it fully working , I found it really tough and it has taken my lots of time. I am thankful to Sanjay, who helped me in this and without him it won\u2019t be possible.While installing this you will miss a small thing and you got stuck.But this is not at all tough like open source it\u2019s really very easy.<\/p>\n<p>Why I have choosed this topic to write is that, those who are using it first time will need some time to get full of subversion.<\/p>\n<p>Now the latest version of svn is 1.6.9.<\/p>\n<p><strong>To install svn first you need svn tar file. Which can be downloaded easily from here or you can run these commands (depending on your required version).<\/strong><\/p>\n<p>wget http:\/\/subversion.tigris.org\/downloads\/subversion-1.6.9.tar.gz<\/p>\n<p>wget http:\/\/subversion.tigris.org\/downloads\/subversion_deps-1.6.9.tar.gz (It contains the library required by svn)<\/p>\n<p>This you can download any where, Here I am creating a folder svn inside \/usr\/local directory.(\/usr\/local\/softwares\/svn\/).(So it will be easy for me to specify paths and you to understand).<\/p>\n<p><strong>To start the installation process first untar this two file.<\/strong><\/p>\n<p>tar -xvzf subversion-1.6.9.tar.gz<\/p>\n<p>tar -xvzf subversion_deps-1.6.9.tar.gz (After untar you won\u2019t find any particular folder named subversion_deps-1.6.9. Don\u2019t worry for that it is keeping all the libraries files inside subversion-1.6.9)<\/p>\n<p><strong>Now have to configure it, but before that we have to check whether our system is having all the dependies or not, like APR(Apache Portable Runtime) and APR utility.<\/strong><\/p>\n<p>If it\u2019s not there then we can get it from here,<\/p>\n<p>apr-1.2.12.tar.gz<\/p>\n<p>apr-util-1.2.12.tar.gz<\/p>\n<p><strong>once downloaded you can start configuring it.<\/strong><\/p>\n<p>tar -xvzf apr-1.2.12.tar.gz<\/p>\n<p>cd apr-1.2.12<\/p>\n<p>.\/buildconf<\/p>\n<p>.\/configure<\/p>\n<p>make<\/p>\n<p><strong>The apr util directory requires apr directory, so we need to specify path for that.<\/strong><\/p>\n<p>tar -xvzf apr-util-1.2.12.tar.gz<\/p>\n<p>cd apr-util-1.2.12<\/p>\n<p>.\/buildconf \u2013with-apr=\/path to apr directory (\/usr\/local\/sofwares\/svn\/apr-1.2.12)<\/p>\n<p>.\/configure \u2013with-apr=\/path to apr directory (\/usr\/local\/sofwares\/svn\/apr-1.2.12)<\/p>\n<p>make<\/p>\n<p>The other directories we have to check before installation are,<\/p>\n<p>autoconf 2.50 or newer (autoconf \u2013version)<\/p>\n<p>libtool 1.4 or newer (this you can find inside subversion-1.6.9 folder)<\/p>\n<p>Neon Library 0.25.x or 0.26.x (inside subversion-1.6.9 folder)<\/p>\n<p>Berkely DataBase (If it\u2019s not there you have to install it.)<\/p>\n<p>Download the file, db-4.6.21.tar.gz .<\/p>\n<p>Apache web server greater then 2.0.49 (httpd -version)<\/p>\n<p>zlib (inside subversion-1.6.9 folder)<\/p>\n<p>After checking all this, we can start installation process,<\/p>\n<p>cd subversion-1.6.9<\/p>\n<p>.\/autogen.sh<\/p>\n<p>.\/configure \u2013with-berkelay-db=\/usr\/local\/softwares\/svn\/db-4.6.21 (path of berkelay data base)<\/p>\n<p>make<\/p>\n<p>make install<\/p>\n<p>Once we have finished that we need to map svn with apache.<\/p>\n<p>Before that we have to check whether mod_dav_svn and mod_authz_svn modules are present or not,if not then install it.<\/p>\n<p>yum install mod_dav_svn<\/p>\n<p>and add this in \/etc\/httpd\/conf\/httpd.conf file<\/p>\n<p>LoadModule dav_svn_module modules\/mod_dav_svn.so<\/p>\n<p>LoadModule authz_svn_module modules\/mod_authz_svn.so<\/p>\n<p>Make sure you will add these lines after LoadModule dav_module modules\/mod_dav.so.<\/p>\n<p>Now create one repository with svnadmin command.Run this command inside your subversion folder.<\/p>\n<p>svnadmin create repos<\/p>\n<p>after that you can check with,<\/p>\n<p>ls repos<\/p>\n<p>conf dav db format hooks locks README.txt<\/p>\n<p>This full path you have to specify in SVNPath.<\/p>\n<p>Then at the end of the httpd.conf file you have to add<\/p>\n<p>#for svn path<\/p>\n<p>DAV svn<\/p>\n<p>SVNPath \/usr\/local\/softwares\/svn\/subversion-1.6.9\/repos<\/p>\n<p>now restart ur apache.<\/p>\n<p><strong>For security purpose to give authentication to the user we have to create authentication file with the command,<\/strong><\/p>\n<p>htpasswd -cm \/etc\/svn-auth-file user_name (test)<\/p>\n<p>New password : test123<\/p>\n<p>Re-Type passwd : test123<\/p>\n<p>And to specify which access you want to give the user, create svn-access-file inside \/etc.<\/p>\n<p>Inside this file add code as,<\/p>\n<p>[\/]<\/p>\n<p>* = rw<\/p>\n<p>This will give authentication to every user specified in Require user inside location.<\/p>\n<p><strong>You can specify this inside httpd.conf file as,<\/strong><\/p>\n<p>DAV svn<\/p>\n<p>SVNPath \/usr\/local\/softwares\/svn\/subversion-1.6.9\/repos<\/p>\n<p>AuthzSVNAccessFile \/etc\/svn-access-file<\/p>\n<p>AuthType Basic<\/p>\n<p>AuthName \u201cSubversion repository\u201d<\/p>\n<p>AuthUserFile \/etc\/svn-auth-file<\/p>\n<p>Require user user_name<\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p><strong>Now you are ready to import files in the repository, with the following command.<\/strong><\/p>\n<p>svn import -m \u201cInitial import.\u201d path(from where you want to import file) file:\/\/\/usr\/local\/softwares\/svn\/subversion-1.6.9\/repos\/(repository path)<\/p>\n<p>after running this command don\u2019t worry it is not goin to display any thing inside repos folder. To check that you can run it in the browser.<\/p>\n<p>http:\/\/localhost(you have to give your domain name)\/svn\/repos<\/p>\n<p>Now you are ready to checkout the files with any svn client. For linux user smartsvn is best.<\/p>\n<p>After doin this you can start ur smartsvn client and can follow these steps,<\/p>\n<p>check out project from repository -&gt; manage -&gt; add -&gt; enter svn url<\/p>\n<p>enter ur url here http:\/\/localhost\/svn\/repos<\/p>\n<p>enter -&gt;ok<\/p>\n<p>server name and repository path it will take automatically. click next, choose user radio button and give user name and password.<\/p>\n<p>follow the steps to fetch the files.<\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p><strong>To install smartsvn, first get the smartsvn tar file.<\/strong><\/p>\n<p>untar the file, with the command<\/p>\n<p>tar -xvzf smartsvn-version.gz<\/p>\n<p>for smartsvn first check the correct version of java is available or not, with<\/p>\n<p>java -version command.If it is coming like this then you can proceed.<\/p>\n<p>java version \u201c1.5.0_14?<\/p>\n<p>Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)<\/p>\n<p>Java HotSpot(TM) Server VM (build 1.5.0_14-b03, mixed mode)<\/p>\n<p>Sometimes java will be installed but not the JRE. In that case simply re-install java.<\/p>\n<p>Can install the latest version of java with rpm bin file.<\/p>\n<p>jdk-1_5_0_14-linux-i586-rpm.bin<\/p>\n<p>.\/jdk-1_5_0_14-linux-i586-rpm.bin<\/p>\n<p>go through the license and say yes.<\/p>\n<p>It will installed in \/usr\/java\/<\/p>\n<p>Now have to make chnages in .bash_profile file.<\/p>\n<p>cd \/root<\/p>\n<p>vi .bash_profile<\/p>\n<p>give JAVA_HOME path.<\/p>\n<p>JAVA_HOME = \/usr\/java\/jdk1.5.0_14<\/p>\n<p><strong>Then compile it with the command,<\/strong><\/p>\n<p>source .bash_profile<\/p>\n<p>then again check with java version.<\/p>\n<p>Now you are ready to utilise the full feature of subversion<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To install svn in linux and make it fully working , I found it really tough and it has taken my lots of time. I am thankful to Sanjay, who&#8230; <\/p>\n","protected":false},"author":1,"featured_media":4429,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[4957],"tags":[3113,4263,4264,237,460,394,4266,4267,4268,4265,4259,395,4261,4260,4262],"class_list":["post-263","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-how-to","tag-how-to-install-svn-in-linux-step-by-step","tag-how-to-install-svn-on-linux","tag-install","tag-linux","tag-subversion","tag-subversion-installation-in-linux-guide","tag-subversion-installation-in-linux-instructions","tag-subversion-installation-in-linux-references","tag-subversion-installation-in-linux-tutorial","tag-subversion-installation-process-in-linux","tag-svn","tag-svn-configuration","tag-svn-installation-in-linux-guide","tag-svn-setup-in-linux"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/263","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=263"}],"version-history":[{"count":2,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/263\/revisions"}],"predecessor-version":[{"id":4430,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/263\/revisions\/4430"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/4429"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=263"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=263"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=263"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}