{"id":754,"date":"2011-03-29T21:57:36","date_gmt":"2011-03-29T13:57:36","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=754"},"modified":"2023-06-26T23:25:23","modified_gmt":"2023-06-26T23:25:23","slug":"how-to-install-subversion-1-6-16-on-centos-5-5-server","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-to-install-subversion-1-6-16-on-centos-5-5-server\/","title":{"rendered":"How to Install Subversion 1.6.16 on CentOS 5.5 Server"},"content":{"rendered":"<p>Subversion, an open-source version control system, is a crucial tool for managing files and tracking changes over time. It allows users to recover older versions of data and examine the history of data changes.<\/p>\n<p>This guide will walk you through the process of installing Subversion 1.6.16 on a CentOS 5.5 server.<\/p>\n<p>Before proceeding, ensure you have <a href=\"https:\/\/webhostinggeeks.com\/blog\/apache-http-server-explained\/\">Apache Httpd Web Server<\/a> installed on your Linux system. If you haven&#8217;t, you can follow this guide on our website to <a href=\"https:\/\/webhostinggeeks.com\/howto\/how-to-install-apache-httpd-web-server-on-linux\/\">install Apache<\/a>.<\/p>\n<h2>Step 1: Download Subversion 1.6.16<\/h2>\n<p>The first step is to download the necessary Subversion 1.6.16 packages. You can do this by using the wget command to download the packages from the official repository. Here are the commands you need to run:<\/p>\n<pre>\r\nwget http:\/\/opensource.wandisco.com\/centos\/5\/RPMS\/i386\/mod_dav_svn-1.6.16-1.i386.rpm\r\nwget http:\/\/opensource.wandisco.com\/centos\/5\/RPMS\/i386\/subversion-1.6.16-1.i386.rpm\r\nwget http:\/\/opensource.wandisco.com\/centos\/5\/RPMS\/i386\/subversion-devel-1.6.16-1.i386.rpm\r\nwget http:\/\/opensource.wandisco.com\/centos\/5\/RPMS\/i386\/subversion-perl-1.6.16-1.i386.rpm\r\nwget http:\/\/opensource.wandisco.com\/centos\/5\/RPMS\/i386\/subversion-python-1.6.16-1.i386.rpm\r\nwget http:\/\/opensource.wandisco.com\/centos\/5\/RPMS\/i386\/subversion-tools-1.6.16-1.i386.rpm\r\n<\/pre>\n<p>After running these commands, you should have the following RPM packages in your directory:<\/p>\n<pre>\r\nmod_dav_svn-1.6.16-1.i386.rpm\r\nsubversion-1.6.16-1.i386.rpm\r\nsubversion-devel-1.6.16-1.i386.rpm\r\nsubversion-perl-1.6.16-1.i386.rpm\r\nsubversion-python-1.6.16-1.i386.rpm\r\nsubversion-tools-1.6.16-1.i386.rpm\r\n<\/pre>\n<p>Example:<\/p>\n<pre>\r\n[root@server data]# wget http:\/\/opensource.wandisco.com\/centos\/5\/RPMS\/i386\/mod_dav_svn-1.6.16-1.i386.rpm\r\n--2011-03-29 20:20:22--  http:\/\/opensource.wandisco.com\/centos\/5\/RPMS\/i386\/mod_dav_svn-1.6.16-1.i386.rpm\r\nResolving opensource.wandisco.com... 212.7.198.163\r\nConnecting to opensource.wandisco.com|212.7.198.163|:80... connected.\r\nHTTP request sent, awaiting response... 200 OK\r\nLength: 77152 (75K) [application\/x-redhat-package-manager]\r\nSaving to: `mod_dav_svn-1.6.16-1.i386.rpm'\r\n\r\n100%[===========================================&gt;] 77,152      47.1K\/s   in 1.6s\r\n\r\n2011-03-29 20:20:25 (47.1 KB\/s) - `mod_dav_svn-1.6.16-1.i386.rpm' saved [77152\/77152]\r\n\r\n[root@server data]# wget http:\/\/opensource.wandisco.com\/centos\/5\/RPMS\/i386\/subversion-1.6.16-1.i386.rpm\r\n--2011-03-29 20:22:31--  http:\/\/opensource.wandisco.com\/centos\/5\/RPMS\/i386\/subversion-1.6.16-1.i386.rpm\r\nResolving opensource.wandisco.com... 212.7.198.163\r\nConnecting to opensource.wandisco.com|212.7.198.163|:80... connected.\r\nHTTP request sent, awaiting response... 200 OK\r\nLength: 2191952 (2.1M) [application\/x-redhat-package-manager]\r\nSaving to: `subversion-1.6.16-1.i386.rpm'\r\n\r\n100%[===========================================&gt;] 2,191,952   53.4K\/s   in 51s\r\n\r\n2011-03-29 20:23:25 (41.9 KB\/s) - `subversion-1.6.16-1.i386.rpm' saved [2191952\/2191952]\r\n\r\n[root@server data]# wget http:\/\/opensource.wandisco.com\/centos\/5\/RPMS\/i386\/subversion-devel-1.6.16-1.i386.rpm\r\n--2011-03-29 20:26:47--  http:\/\/opensource.wandisco.com\/centos\/5\/RPMS\/i386\/subversion-devel-1.6.16-1.i386.rpm\r\nResolving opensource.wandisco.com... 212.7.198.163\r\nConnecting to opensource.wandisco.com|212.7.198.163|:80... connected.\r\nHTTP request sent, awaiting response... 200 OK\r\nLength: 3407709 (3.2M) [application\/x-redhat-package-manager]\r\nSaving to: `subversion-devel-1.6.16-1.i386.rpm'\r\n\r\n100%[===========================================&gt;] 3,407,709   53.6K\/s   in 62s\r\n\r\n2011-03-29 20:27:51 (53.9 KB\/s) - `subversion-devel-1.6.16-1.i386.rpm' saved [3407709\/3407709]\r\n\r\n[root@server data]# wget http:\/\/opensource.wandisco.com\/centos\/5\/RPMS\/i386\/subversion-perl-1.6.16-1.i386.rpm\r\n--2011-03-29 20:28:05--  http:\/\/opensource.wandisco.com\/centos\/5\/RPMS\/i386\/subversion-perl-1.6.16-1.i386.rpm\r\nResolving opensource.wandisco.com... 212.7.198.163\r\nConnecting to opensource.wandisco.com|212.7.198.163|:80... connected.\r\nHTTP request sent, awaiting response... 200 OK\r\nLength: 1103833 (1.1M) [application\/x-redhat-package-manager]\r\nSaving to: `subversion-perl-1.6.16-1.i386.rpm'\r\n\r\n100%[===========================================&gt;] 1,103,833   66.8K\/s   in 21s\r\n\r\n2011-03-29 20:28:28 (52.3 KB\/s) - `subversion-perl-1.6.16-1.i386.rpm' saved [1103833\/1103833]\r\n\r\n[root@server data]# wget http:\/\/opensource.wandisco.com\/centos\/5\/RPMS\/i386\/subversion-python-1.6.16-1.i386.rpm\r\n--2011-03-29 20:28:36--  http:\/\/opensource.wandisco.com\/centos\/5\/RPMS\/i386\/subversion-python-1.6.16-1.i386.rpm\r\nResolving opensource.wandisco.com... 212.7.198.163\r\nConnecting to opensource.wandisco.com|212.7.198.163|:80... connected.\r\nHTTP request sent, awaiting response... 200 OK\r\nLength: 1286789 (1.2M) [application\/x-redhat-package-manager]\r\nSaving to: `subversion-python-1.6.16-1.i386.rpm'\r\n\r\n100%[===========================================&gt;] 1,286,789   30.2K\/s   in 42s\r\n\r\n2011-03-29 20:29:20 (30.1 KB\/s) - `subversion-python-1.6.16-1.i386.rpm' saved [1286789\/1286789]\r\n\r\n[root@server data]# wget http:\/\/opensource.wandisco.com\/centos\/5\/RPMS\/i386\/subversion-tools-1.6.16-1.i386.rpm\r\n--2011-03-29 20:30:09--  http:\/\/opensource.wandisco.com\/centos\/5\/RPMS\/i386\/subversion-tools-1.6.16-1.i386.rpm\r\nResolving opensource.wandisco.com... 212.7.198.163\r\nConnecting to opensource.wandisco.com|212.7.198.163|:80... connected.\r\nHTTP request sent, awaiting response... 200 OK\r\nLength: 390211 (381K) [application\/x-redhat-package-manager]\r\nSaving to: `subversion-tools-1.6.16-1.i386.rpm'\r\n\r\n100%[===========================================&gt;] 390,211     54.9K\/s   in 7.2s\r\n\r\n2011-03-29 20:30:19 (53.1 KB\/s) - `subversion-tools-1.6.16-1.i386.rpm' saved [390211\/390211]\r\n\r\n[root@server data]# ls\r\nmod_dav_svn-1.6.16-1.i386.rpm       subversion-perl-1.6.16-1.i386.rpm\r\nsubversion-1.6.16-1.i386.rpm        subversion-python-1.6.16-1.i386.rpm\r\nsubversion-devel-1.6.16-1.i386.rpm  subversion-tools-1.6.16-1.i386.rpm\r\n<\/pre>\n<h2>Step 2: Install the RPM Packages<\/h2>\n<p>Once you have downloaded the necessary packages, you can install them using the rpm command. Here is the command you need to run:<\/p>\n<pre>\r\nrpm -Uvh --nosignature mod_dav_svn-1.6.16-1.i386.rpm subversion-1.6.16-1.i386.rpm subversion-devel-1.6.16-1.i386.rpm subversion-perl-1.6.16-1.i386.rpm subversion-python-1.6.16-1.i386.rpm subversion-tools-1.6.16-1.i386.rpm\r\n<\/pre>\n<p>This command will install all the downloaded packages on your system.<\/p>\n<pre>\r\n[root@server data]# rpm -Uvh --nosignature mod_dav_svn-1.6.16-1.i386.rpm subversion-1.6.16-1.i386.rpm subversion-devel-1.6.16-1.i386.rpm subversion-perl-1.6.16-1.i386.rpm subversion-python-1.6.16-1.i386.rpm subversion-tools-1.6.16-1.i386.rpm\r\nPreparing...                ########################################### [100%]\r\n1:subversion             ########################################### [ 17%]\r\n2:subversion-perl        ########################################### [ 33%]\r\n3:mod_dav_svn            ########################################### [ 50%]\r\n4:subversion-devel       ########################################### [ 67%]\r\n5:subversion-python      ########################################### [ 83%]\r\n6:subversion-tools       ########################################### [100%]\r\n[root@server data]#\r\n<\/pre>\n<h2>Step 3: Setting Up Directories<\/h2>\n<p>After installing the packages, you need to set up the necessary directories for Subversion. You can do this by running the following commands:<\/p>\n<pre>\r\nmkdir \/svn\r\nmkdir \/svn\/repos\r\nmkdir \/svn\/users\r\nmkdir \/svn\/permissions\r\nchown -R apache:apache \/svn\r\n<\/pre>\n<p>These commands will create the directories and set the ownership to the Apache user.<\/p>\n<h2>Step 4:Configure the Apache Server<\/h2>\n<p>Next, you need to configure your Apache server. You can do this by setting the DocumentRoot to \/svn\/repos, and the ServerName to svn.local. You also need to specify the ErrorLog and CustomLog for your server. Here&#8217;s an example of how your configuration might look:<\/p>\n<pre>\r\nDocumentRoot \/svn\/repos\r\nServerName svn.local\r\nErrorLog logs\/svn.local-error_log\r\nCustomLog logs\/svn.local-access_log common\r\n<\/pre>\n<h2>Step 5: Create and Configure subversion.conf<\/h2>\n<p>Now, you need to create and configure the subversion.conf file. This file is necessary for the Subversion Apache server. You can create and edit this file using the vi command:<\/p>\n<pre>\r\nvi \/etc\/httpd\/conf.d\/subversion.conf\r\n<\/pre>\n<p>In this file, you need to load the necessary modules and set up the location directive. Here&#8217;s an example of how your subversion.conf file might look:<\/p>\n<pre>\r\nLoadModule dav_svn_module modules\/mod_dav_svn.so\r\nLoadModule authz_svn_module modules\/mod_authz_svn.so\r\n\r\n&lt;Location \/svn\/repos&gt;\r\nDAV svn\r\nSVNParentPath \/svn\/repos\r\nAuthType Basic\r\nAuthName \"Authorization Realm\"\r\nAuthUserFile \/svn\/users\/passwords\r\nAuthzSVNAccessFile \/svn\/permissions\/svnaccess\r\nRequire valid-user\r\n&lt;\/Location&gt;\r\n<\/pre>\n<h2>Step 6: Create Your First Repository<\/h2>\n<p>With the server configured, you can now create your first repository using the svnadmin command. Here&#8217;s how you can do it:<\/p>\n<pre>\r\nsvnadmin create \/svn\/repos\/testsvn\r\nchown -R apache:apache \/svn\/repos\/testsvn\r\n<\/pre>\n<p>This will create a repository named testsvn and set its ownership to the Apache user.<\/p>\n<h2>Step 7: Create Users to Access the Repository<\/h2>\n<p>Next, you need to create users who can access the repository. You can do this using the htpasswd command. Here&#8217;s how you can create two users, user1 and user2:<\/p>\n<pre>\r\nhtpasswd -c \/svn\/users\/passwords user1\r\nhtpasswd -m \/svn\/users\/passwords user2\r\n<\/pre>\n<p>This will prompt you to enter and confirm a password for each user.<\/p>\n<h2>Step 8: Create svnaccess File<\/h2>\n<p>Now, you need to create an svnaccess file to control access to the repository. You can do this using the vi command:<\/p>\n<pre>\r\nvi \/svn\/permissions\/svnaccess\r\n<\/pre>\n<p>In this file, you can define groups and specify their access rights. Here&#8217;s an example:<\/p>\n<pre>\r\n[groups]\r\ntestgroup = user1, user2\r\n\r\n[testsvn:\/]\r\n@testgroup = rw\r\n<\/pre>\n<p>This will create a group named testgroup with user1 and user2 as members. The group has read and write access to the testsvn repository.<\/p>\n<h2>Step 9: Test Your Subversion Server<\/h2>\n<p>Finally, you can test your Subversion server by accessing your repository from a web browser. You can do this by navigating to http:\/\/your_server_ip\/svn\/repos\/testsvn\/. If everything is set up correctly, you should see the testsvn &#8211; Revision 0: \/ page.<\/p>\n<pre>\r\ntestsvn - Revision 0: \/\r\n--------------------------------------------------------------------------------\r\nPowered by Subversion version 1.6.16 (r1073529).\r\n<\/pre>\n<h2>Commands Mentioned<\/h2>\n<ul>\n<li><span class=\"fw-bold\">wget<\/span> \u2013 used to download files from the internet<\/li>\n<li><span class=\"fw-bold\">rpm -Uvh &#8211;nosignature<\/span> \u2013 used to install RPM packages<\/li>\n<li><span class=\"fw-bold\">mkdir<\/span> \u2013 used to create directories<\/li>\n<li><span class=\"fw-bold\">chown<\/span> \u2013 used to change the ownership of files\/directories<\/li>\n<li><span class=\"fw-bold\">vi<\/span> \u2013 a text editor used to create and edit files<\/li>\n<li><span class=\"fw-bold\">svnadmin create<\/span> \u2013 used to create a new Subversion repository<\/li>\n<li><span class=\"fw-bold\">htpasswd<\/span> \u2013 used to create and update the flat-files used to store usernames and password for basic authentication of HTTP users<\/li>\n<\/ul>\n<h2>Conclusion<\/h2>\n<p>In conclusion, setting up Subversion on a CentOS 5.5 server involves several steps, including downloading and installing the necessary packages, setting up directories, configuring the Apache server, creating and configuring the subversion.conf file, creating a repository, creating users, and creating an svnaccess file. Once all these steps are completed, you can test your Subversion server by accessing your repository from a web browser.<\/p>\n<p>Remember, Subversion is a powerful tool for managing files and tracking changes over time. It&#8217;s an essential tool for any webmaster or website administrator.<\/p>\n<h2>FAQ<\/h2>\n<ol itemscope itemtype=\"https:\/\/schema.org\/FAQPage\">\n<li itemscope itemprop=\"mainEntity\" itemtype=\"https:\/\/schema.org\/Question\">\n<p class=\"fw-bold\" itemprop=\"name\">What is Subversion?<\/p>\n<p itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n                <span itemprop=\"text\">Subversion is an open-source version control system. It manages files and tracks changes made to them over time. This allows users to recover older versions of data and examine the history of data changes.<\/span>\n            <\/p>\n<\/li>\n<li itemscope itemprop=\"mainEntity\" itemtype=\"https:\/\/schema.org\/Question\">\n<p class=\"fw-bold\" itemprop=\"name\">What is the purpose of the svnadmin create command?<\/p>\n<p itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n                <span itemprop=\"text\">The svnadmin create command is used to create a new Subversion repository. This repository is where all your version-controlled files will be stored.<\/span>\n            <\/p>\n<\/li>\n<li itemscope itemprop=\"mainEntity\" itemtype=\"https:\/\/schema.org\/Question\">\n<p class=\"fw-bold\" itemprop=\"name\">What is the htpasswd command used for?<\/p>\n<p itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n                <span itemprop=\"text\">The htpasswd command is used to create and update the flat-files used to store usernames and passwords for basic authentication of HTTP users. This is necessary for controlling access to your Subversion repositories.<\/span>\n            <\/p>\n<\/li>\n<li itemscope itemprop=\"mainEntity\" itemtype=\"https:\/\/schema.org\/Question\">\n<p class=\"fw-bold\" itemprop=\"name\">What is the purpose of the svnaccess file?<\/p>\n<p itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n                <span itemprop=\"text\">The svnaccess file is used to control access to the Subversion repositories. It allows you to define groups of users and specify their access rights to the repositories.<\/span>\n            <\/p>\n<\/li>\n<li itemscope itemprop=\"mainEntity\" itemtype=\"https:\/\/schema.org\/Question\">\n<p class=\"fw-bold\" itemprop=\"name\">How can I test my Subversion server?<\/p>\n<p itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n                <span itemprop=\"text\">Youcan test your Subversion server by accessing your repository from a web browser. Simply navigate to `http:\/\/your_server_ip\/svn\/repos\/your_repository_name\/`. If everything is set up correctly, you should see the repository page.<\/span>\n            <\/p>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Subversion, an open-source version control system, is a crucial tool for managing files and tracking changes over time. It allows users to recover older versions of data and examine the&#8230;<\/p>\n","protected":false},"author":6,"featured_media":323,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[1060],"tags":[1536,1811],"class_list":["post-754","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-subversion","tag-linux","tag-subversion"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/754","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=754"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/754\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media\/323"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=754"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=754"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=754"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}