0015.html 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Setting Up Apache Subversion on Windows</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <meta name="keywords" content="How To,Tutorial,i12bretro,Apache,Subversion,Source Code,Repository,Source Control,SVN">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Setting Up Apache Subversion on Windows">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  12. <script type="text/javascript" src="includes/js/steps.js"></script>
  13. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  14. </head>
  15. <body>
  16. <div id="gridContainer">
  17. <div class="topMargin"></div>
  18. <div id="listName" class="topMargin">
  19. <h1>Setting Up Apache Subversion on Windows</h1>
  20. </div>
  21. <div></div>
  22. <div id="content">
  23. <h2>Installing Subversion</h2>
  24. <ol>
  25. <li>Download Microsoft Visual C++<a href="https://aka.ms/vs/16/release/vc_redist.x64.exe" target="_blank">Download</a></li>
  26. <li>Download TortoiseSVN <a href="https://tortoisesvn.net/downloads.html" target="_blank">Download</a></li>
  27. <li>Install Microsoft Visual C++</li>
  28. <li>Install TortoiseSVN, making sure to enable the command line client tools option</li>
  29. </ol>
  30. <h2>Installing and Configuring Apache HTTPD</h2>
  31. <ol>
  32. <li>Download Apache HTTPD <a href="https://www.apachelounge.com/download/" target="_blank">Download</a></li>
  33. <li>Download Subversion Apache Modules <a href="https://github.com/nono303/win-svn/tree/1.14.0" target="_blank">Download</a></li>
  34. <li>Extract the downloaded .zip files</li>
  35. <li>Copy the extracted Subversion files to the desired location, for example C:\Program Files\Subversion</li>
  36. <li>Click the Start button &gt; Search Control &gt; Click Control Panel</li>
  37. <li>Click on System &gt; Advanced system settings</li>
  38. <li>Click the Environment Variables...</li>
  39. <li>Edit the System Path variable</li>
  40. <li>Add the Subversion /bin path</li>
  41. <li>Click OK</li>
  42. <li>Open a command prompt and run svn --version to confirm the Subversion executables are configured in the system path correctly</li>
  43. <li>Copy the following files from the extracted Subversion directory to the Apache installation directory specified below:
  44. <p><u>Apache /modules</u><br />
  45. mod_dav_svn.so<br />
  46. mod_authz_svn.so<br />
  47. deps/brotlicommon.dll<br />
  48. deps/brotlidec.dll<br />
  49. deps/brotlienc.dll<br />
  50. deps/libapr-1.dll<br />
  51. deps/libapriconv-1.dll<br />
  52. deps/libaprutil-1.dll<br />
  53. deps/libcrypto-1_1-x64.dll<br />
  54. deps/libexpat.dll<br />
  55. deps/libhttpd.dll<br />
  56. deps/libserf-2.dll<br />
  57. deps/libssl-1_1-x64.dll<br />
  58. deps/zlib1.dll<br />
  59. <u>Apache /bin</u><br />
  60. libsvnjavahl-1.dll<br />
  61. libsvn_client-1.dll<br />
  62. libsvn_delta-1.dll<br />
  63. libsvn_diff-1.dll<br />
  64. libsvn_fs-1.dll<br />
  65. libsvn_fs_fs-1.dll<br />
  66. libsvn_fs_util-1.dll<br />
  67. libsvn_fs_x-1.dll<br />
  68. libsvn_ra-1.dll<br />
  69. libsvn_repos-1.dll<br />
  70. libsvn_subr-1.dll<br />
  71. libsvn_wc-1.dll</p>
  72. </li>
  73. <li>Inside the extracted Apache file structure, navigate to /conf/httpd.conf and edit it with a text editor</li>
  74. <li>Find the following lines LoadModule dav_module modules/mod_dav.so and uncomment them by removing the # at the beginning
  75. <p>LoadModule access_compat_module modules/mod_access_compat.so<br />
  76. LoadModule dav_module modules/mod_dav.so</p>
  77. </li>
  78. <li>Add the following block to the file:
  79. <p>LoadModule dav_svn_module modules/mod_dav_svn.so<br />
  80. LoadModule authz_svn_module modules/mod_authz_svn.so</p>
  81. <p>&lt;VirtualHost svn.i12bretro.local:80&gt;<br />
  82. ServerName svn.i12bretro.local<br />
  83. ServerAlias i12bretro.local<br />
  84. DocumentRoot E:\SVN_Repos<br />
  85. <br />
  86. &lt;Location /&gt;<br />
  87. DAV svn<br />
  88. SVNListParentPath On<br />
  89. SVNParentPath E:\SVN_Repos<br />
  90. <br />
  91. Order allow,deny<br />
  92. Allow from all<br />
  93. &lt;/Location&gt;<br />
  94. &lt;/VirtualHost&gt;</p>
  95. </li>
  96. <li>Save the changes</li>
  97. <li>To just start Apache and have it run, double click the httpd.exe in the Apache /bin directory</li>
  98. <li>To run Apache as a Windows server, hold the shift key and right click in the Apache /bin directory &gt; Open command window here</li>
  99. <li>Enter the following command to create the Apache service:
  100. <div class="codeBlock">httpd.exe -k install -n &quot;Apache HTTPD&quot;</div>
  101. </li>
  102. <li>Open a web browser and navigate to http://svn.i12bretro.local</li>
  103. <li>A bare bones directory listing of the &quot;Collection of Repositories&quot; should be displayed</li>
  104. </ol>
  105. <h2>Setting Up LDAP Authentication</h2>
  106. <ol>
  107. <li>Navigate to the Apache install directory/conf in Explorer</li>
  108. <li>Edit httpd.conf in a text editor</li>
  109. <li>Find both the authnz_ldap_module and ldap_module and make sure it is enabled by removing the # at the start of the line
  110. <p>LoadModule authnz_ldap_module modules/mod_authnz_ldap.so<br />
  111. LoadModule ldap_module modules/mod_ldap.so</p>
  112. </li>
  113. <li>Add the following to the Location block created earlier for svn.i12bretro.local to enable LDAP authentication
  114. <p> Order deny,allow<br />
  115. # Basic authentication with LDAP against MS AD<br />
  116. AuthType Basic<br />
  117. AuthBasicProvider ldap<br />
  118. <br />
  119. # AuthLDAPURL specifies the LDAP server IP, port, base DN, scope and filter<br />
  120. # using this format: ldap://host:port/basedn?attribute?scope?filter<br />
  121. AuthLDAPURL &quot;ldap://i12bretro.local:389/DC=i12bretro,DC=local?sAMAccountName?sub?(objectClass=user)&quot; NONE<br />
  122. <br />
  123. # The LDAP bind username and password<br />
  124. AuthLDAPBindDN &quot;readonly_svc@i12bretro.local&quot;<br />
  125. AuthLDAPBindPassword &quot;Read0nly!!&quot;<br />
  126. LDAPReferrals Off<br />
  127. AuthUserFile /dev/null<br />
  128. <br />
  129. AuthName &quot;Restricted Area [i12bretro.local]&quot;<br />
  130. # to authenticate a domain group, specify the full DN<br />
  131. AuthLDAPGroupAttributeIsDN on<br />
  132. require ldap-group CN=WebAuthAccess,CN=Users,DC=i12bretro,DC=local</p>
  133. </li>
  134. <li>Save httpd.conf</li>
  135. <li>Restart the Apache service</li>
  136. <li>Open a web browser and navigate back to http://svn.i12bretro.local</li>
  137. <li>An authentication prompt should be displayed</li>
  138. <li>Enter a valid username and password for a user belonging to the group specified above</li>
  139. <li>A bare bones directory listing of the Subversion repositories should be displayed</li>
  140. </ol>
  141. </div>
  142. </div>
  143. </body>
  144. </html>