{"id":1759,"date":"2022-04-04T07:47:11","date_gmt":"2022-04-04T07:47:11","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/?p=1759"},"modified":"2022-12-23T06:19:51","modified_gmt":"2022-12-23T06:19:51","slug":"configure-ldap-in-svn","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/configure-ldap-in-svn\/","title":{"rendered":"Configure LDAP in SVN"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\"><strong>Step 1: Install Required Packages<\/strong><\/h2>\n\n\n\n<p><strong><\/strong><\/p>\n\n\n\n<p><strong><\/strong><br>Before installing SVN packages, you must install required packages.Type the below command to install require packages.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># yum install httpd mod-ldap mod_authnz_external mod_ssl openssl\n<\/pre>\n\n\n\n<p>Start the apache service.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># chkconfig httpd on\n# service httpd start\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 2: Disable Iptables and Selinux<\/strong><\/h2>\n\n\n\n<p><strong><\/strong><\/p>\n\n\n\n<p><strong><\/strong><br>If you not able to see the apache test page, disable the iptables and selinux service on your server. Use following steps to disable the service.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>For CentOS\/RHEL 5\/6<\/strong>\n# service iptables stop\n# chkconfig iptables off\n<strong>For CentOS\/RHEL 7<\/strong>\n# systemctl stop firewalld\n# systemctl disable firewalld\n<\/pre>\n\n\n\n<p>Now disabled the selinux of server. After disable the selinux reboot the server.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># vim \/etc\/sysconfig\/selinux\n<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">SELINUX=enforcing\nand replace with\nSELINUX=disabled\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 3: Install SVN Server<\/strong><\/h2>\n\n\n\n<p><strong><\/strong><\/p>\n\n\n\n<p><strong><\/strong><br>Once the Apache Web Server is installed, we\u2019ll need to execute the following command to install subversion.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># yum install subversion mod_dav_svn\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Check SVN Server Version<\/strong><\/h3>\n\n\n\n<p>After installing the SVN Server check the version of SVN using following command.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># svn --version\n<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">svn, version 1.6.11 (r934486)\n   compiled Feb 10 2015, 22:08:22\n\nCopyright (C) 2000-2009 CollabNet.\nSubversion is open source software, see http:\/\/subversion.tigris.org\/\nThis product includes software developed by CollabNet (http:\/\/www.Collab.Net\/).\n\nThe following repository access (RA) modules are available:\n\n* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.\n  - handles 'http' scheme\n  - handles 'https' scheme\n* ra_svn : Module for accessing a repository using the svn network protocol.\n  - with Cyrus SASL authentication\n  - handles 'svn' scheme\n* ra_local : Module for accessing a repository on local disk.\n  - handles 'file' scheme\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 4: Create Directory<\/strong><\/h2>\n\n\n\n<p><strong><\/strong><\/p>\n\n\n\n<p><strong><\/strong><br>Now create directory on server for SVN repositories.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># mkdir \/var\/www\/svn\/repos\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 5: Configure SVN Server<\/strong><\/h2>\n\n\n\n<p><strong><\/strong><\/p>\n\n\n\n<p><strong><\/strong><br>After installing Apache Webserver we open or create the SVN configuration file and add the below lines in the file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># vim \/etc\/httpd\/conf.d\/subversion.conf\n<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;Location \/repos&gt;\nDAV svn\nSVNParentPath \/var\/www\/svn\/repos\nAuthzSVNAccessFile \/var\/www\/svn\/user\nSSLRequireSSL\nAuthBasicProvider ldap\nAuthType Basic\nAuthzLDAPAuthoritative off\nAuthName \"My Subversion server\"\nAuthLDAPURL \"ldap:\/\/192.168.10.55:3268\/DC=techoism,DC=com?sAMAccountName?sub?(objectClass=*)\" NONE\nAuthLDAPBindDN \"svn.admin@techoism\"\nAuthLDAPBindPassword \"r3Dh@+@123\"\nrequire ldap-attribute objectClass=user\n&lt;\/Location&gt;\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 6: Create SVN Repository<\/strong><\/h2>\n\n\n\n<p>Create a new repository and change the ownership of repository using following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># cd \/var\/www\/svn\/repos\n# svnadmin create techoism\n# chown -R apache.apache techoism\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 6: Repository access to LDAP User<\/strong><\/h3>\n\n\n\n<p>After creating new svn repository now we need to give permission to any LDAP user to access the repository.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># vim \/var\/www\/svn\/user\n<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">[techoism:\/]\ndennis.r = rw\nsteve.jobs = rw\n<\/pre>\n\n\n\n<p><strong>Note:<\/strong>&nbsp;If you want to give permission to any user to access all the repository, then do following entry in the file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[\/]\ndennis.r = rw\n<\/pre>\n\n\n\n<p>Now dennis has rights to access all the SVN repositories<\/p>\n\n\n\n<p>After creating user we will restart Apache Service.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># service httpd restart\n<\/pre>\n\n\n\n<p>Now you should be start the svnserve process by using this script:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># service svnserve start\n<\/pre>\n\n\n\n<p>Next, to set this script to run \u2018start\u2019 on server boot register the service:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># chkconfig --add svnserve\n# chkconfig enable svnserve\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 7: Access Your Repository in Browser<\/strong><\/h2>\n\n\n\n<p>Now open your svn repository in a browser. It will prompt for authentication.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># http:\/\/192.168.10.55\/repos\/techoism\n<strong>or<\/strong>\n# http:\/\/svn.techoism.com\/repos\/techoism\n<\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"http:\/\/www.techoism.com\/wp-content\/uploads\/2015\/06\/svn_ldap.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"http:\/\/www.techoism.com\/wp-content\/uploads\/2015\/06\/svn_ldap.png\" alt=\"svn_ldap\" class=\"wp-image-1554\"\/><\/a><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"http:\/\/www.techoism.com\/wp-content\/uploads\/2015\/06\/svn_server1-e1433569241223.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"http:\/\/www.techoism.com\/wp-content\/uploads\/2015\/06\/svn_server1-e1433569241223.png\" alt=\"svn_server1\" class=\"wp-image-1437\"\/><\/a><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Step 1: Install Required Packages Before installing SVN packages, you must install required packages.Type the below command to install require packages. # yum install httpd mod-ldap mod_authnz_external mod_ssl openssl Start&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[2],"tags":[395],"class_list":["post-1759","post","type-post","status-publish","format-standard","hentry","category-uncategorised","tag-svn"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/1759","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=1759"}],"version-history":[{"count":2,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/1759\/revisions"}],"predecessor-version":[{"id":29461,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/1759\/revisions\/29461"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=1759"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=1759"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=1759"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}