0015.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  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. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  7. <script type="text/javascript">
  8. $(function(){
  9. $('textarea').each(function(i,e){
  10. theTextarea = $(this);
  11. theTextarea.height((theTextarea[0].scrollHeight-5) +'px');
  12. });
  13. $('li').each(function(i,e){
  14. var uuid = 'li_' + Math.floor(Math.random() * Math.floor(1000000)).toString() + '_' + i.toString();
  15. $(this).contents().wrap('<span id="'+ uuid +'"><label for="cb_'+ uuid +'"></label></span>');
  16. $(this).prepend('<input type="checkbox" class="completeBox" id="cb_' + uuid +'" rel="'+ uuid +'" />')
  17. });
  18. $('code,div.codeBlock,textarea.codeBlock').each(function(i,e){
  19. theElement = $(this);
  20. var lines = theElement.html().split("\n");
  21. theElement.empty();
  22. for(l=0;l<lines.length;l++){
  23. if($.trim(lines[l]) != '' && $.trim(lines[l]).substr(0,1) != '#' && $.trim(lines[l]).indexOf(' #') == -1 && lines[l].substr(0, 4).toUpperCase() != 'REM '){
  24. theElement.append('<input type="image" src="images/clipboard.png" value="" class="copy-text" rel="copy_'+ i +'_'+ l +'" data-clipboard-text="'+ lines[l].replace(/"/g, '&quot;') +'" /><span id="copy_'+ i +'_'+ l +'">'+ lines[l] +'</span>');
  25. } else {
  26. theElement.append(lines[l]);
  27. }
  28. }
  29. });
  30. $(document).on('click','input.copy-text',function(){
  31. theButton = $(this);
  32. $('input.copy-text').attr('src','images/clipboard.png');
  33. $('span.copy-animation,span.copy-animation-ps').removeClass('copy-animation copy-animation-ps');
  34. try {
  35. if($('#'+ theButton.attr('rel')).parent('div').hasClass('PS')){
  36. $('#'+ theButton.attr('rel')).addClass('copy-animation-ps');
  37. } else {
  38. $('#'+ theButton.attr('rel')).addClass('copy-animation');
  39. }
  40. navigator.clipboard.writeText(theButton.data('clipboard-text').replace(/<[^>]*>?/gm, ''));
  41. theButton.attr('src','images/clipboard_active.png');
  42. } catch(err) {
  43. }
  44. return false;
  45. });
  46. $(document).on('click','input.completeBox',function(){
  47. theBox = $(this);
  48. $('#'+ theBox.attr('rel')).addClass('strikethrough');
  49. theBox.prop('disabled',true);
  50. theBox.parent('li').prevAll().each(function(i,e){
  51. theLI = $(this);
  52. if(theLI.find('input[type=checkbox]').not(':checked')){
  53. $('#'+ theLI.find('input[type=checkbox]').attr('rel')).addClass('strikethrough');
  54. theLI.find('input[type=checkbox]').prop('checked',true).prop('disabled',true);
  55. }
  56. });
  57. });
  58. if(window.self !== window.top){
  59. window.parent.$('iframe.stepsFrame').height((this['scrollingElement']['scrollHeight']+20) +'px');
  60. }
  61. });
  62. </script>
  63. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  64. </head>
  65. <body>
  66. <div id="gridContainer">
  67. <div class="topMargin"></div>
  68. <div id="listName" class="topMargin">
  69. <h1>Setting Up Apache Subversion on Windows</h1>
  70. </div>
  71. <div></div>
  72. <div id="content">
  73. <h2>Installing Subversion</h2>
  74. <ol>
  75. <li>Download Microsoft Visual C++<a href="https://aka.ms/vs/16/release/vc_redist.x64.exe" target="_blank">Download</a></li>
  76. <li>Download TortoiseSVN <a href="https://tortoisesvn.net/downloads.html" target="_blank">Download</a></li>
  77. <li>Install&nbsp;Microsoft Visual C++</li>
  78. <li>Install&nbsp;TortoiseSVN, making sure to enable the command line client tools option</li>
  79. </ol>
  80. <h2>Installing and Configuring Apache HTTPD</h2>
  81. <ol>
  82. <li>Download Apache HTTPD <a href="https://www.apachelounge.com/download/" target="_blank">Download</a></li>
  83. <li>Download Subversion Apache Modules <a href="https://github.com/nono303/win-svn/tree/1.14.0" target="_blank">Download</a></li>
  84. <li>Extract the downloaded .zip files</li>
  85. <li>Copy the extracted Subversion files to the desired location, for example C:\Program Files\Subversion</li>
  86. <li>Click the Start button &gt; Search Control &gt; Click Control Panel</li>
  87. <li>Click on System &gt; Advanced system settings</li>
  88. <li>Click the Environment Variables...</li>
  89. <li>Edit the System Path variable</li>
  90. <li>Add the Subversion /bin path</li>
  91. <li>Click OK</li>
  92. <li>Open a command prompt and run svn --version to confirm the Subversion executables are configured in the system path correctly</li>
  93. <li>Copy the following files from the extracted Subversion&nbsp;directory to the Apache installation directory specified below:
  94. <p><u>Apache /modules</u><br />
  95. &nbsp; &nbsp; &nbsp; mod_dav_svn.so<br />
  96. &nbsp; &nbsp; &nbsp; mod_authz_svn.so<br />
  97. &nbsp; &nbsp; &nbsp; deps/brotlicommon.dll<br />
  98. &nbsp; &nbsp; &nbsp; deps/brotlidec.dll<br />
  99. &nbsp; &nbsp; &nbsp; deps/brotlienc.dll<br />
  100. &nbsp; &nbsp; &nbsp; deps/libapr-1.dll<br />
  101. &nbsp; &nbsp; &nbsp; deps/libapriconv-1.dll<br />
  102. &nbsp; &nbsp; &nbsp; deps/libaprutil-1.dll<br />
  103. &nbsp; &nbsp; &nbsp; deps/libcrypto-1_1-x64.dll<br />
  104. &nbsp; &nbsp; &nbsp; deps/libexpat.dll<br />
  105. &nbsp; &nbsp; &nbsp; deps/libhttpd.dll<br />
  106. &nbsp; &nbsp; &nbsp; deps/libserf-2.dll<br />
  107. &nbsp; &nbsp; &nbsp; deps/libssl-1_1-x64.dll<br />
  108. &nbsp; &nbsp; &nbsp; deps/zlib1.dll<br />
  109. <u>Apache /bin</u><br />
  110. &nbsp; &nbsp; &nbsp; libsvnjavahl-1.dll<br />
  111. &nbsp; &nbsp; &nbsp; libsvn_client-1.dll<br />
  112. &nbsp; &nbsp; &nbsp; libsvn_delta-1.dll<br />
  113. &nbsp; &nbsp; &nbsp; libsvn_diff-1.dll<br />
  114. &nbsp; &nbsp; &nbsp; libsvn_fs-1.dll<br />
  115. &nbsp; &nbsp; &nbsp; libsvn_fs_fs-1.dll<br />
  116. &nbsp; &nbsp; &nbsp; libsvn_fs_util-1.dll<br />
  117. &nbsp; &nbsp; &nbsp; libsvn_fs_x-1.dll<br />
  118. &nbsp; &nbsp; &nbsp; libsvn_ra-1.dll<br />
  119. &nbsp; &nbsp; &nbsp; libsvn_repos-1.dll<br />
  120. &nbsp; &nbsp; &nbsp; libsvn_subr-1.dll<br />
  121. &nbsp; &nbsp; &nbsp; libsvn_wc-1.dll</p>
  122. </li>
  123. <li>Inside the extracted Apache file structure, navigate to /conf/httpd.conf and edit it with a text editor</li>
  124. <li>Find the following lines LoadModule dav_module modules/mod_dav.so and uncomment them by removing the # at the beginning<br />
  125. <p>
  126. LoadModule access_compat_module modules/mod_access_compat.so<br />
  127. LoadModule dav_module modules/mod_dav.so
  128. </p>
  129. </li>
  130. <li>Add the following block to the file:
  131. <p>LoadModule dav_svn_module modules/mod_dav_svn.so<br />
  132. LoadModule authz_svn_module modules/mod_authz_svn.so</p>
  133. <p>&lt;VirtualHost svn.i12bretro.local:80&gt;<br />
  134. &nbsp;&nbsp; &nbsp;ServerName svn.i12bretro.local<br />
  135. &nbsp;&nbsp; &nbsp;ServerAlias i12bretro.local<br />
  136. &nbsp;&nbsp; &nbsp;DocumentRoot E:\SVN_Repos<br />
  137. &nbsp;&nbsp; &nbsp;<br />
  138. &nbsp;&nbsp; &nbsp;&lt;Location /&gt;<br />
  139. &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;DAV svn<br />
  140. &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;SVNListParentPath On<br />
  141. &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;SVNParentPath E:\SVN_Repos<br />
  142. &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br />
  143. &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Order allow,deny<br />
  144. &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Allow from all<br />
  145. &nbsp;&nbsp; &nbsp;&lt;/Location&gt;<br />
  146. &lt;/VirtualHost&gt;</p>
  147. </li>
  148. <li>Save the changes</li>
  149. <li>To just start Apache and have it run, double click the httpd.exe in the Apache /bin directory</li>
  150. <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>
  151. <li>Enter the following command to create the Apache service:
  152. <div class="codeBlock">httpd.exe -k install -n &quot;Apache HTTPD&quot;</div>
  153. </li>
  154. <li>Open a web browser and navigate to http://svn.i12bretro.local</li>
  155. <li>A bare bones directory listing of the &quot;Collection of Repositories&quot; should be displayed</li>
  156. </ol>
  157. <h2>Setting Up LDAP Authentication</h2>
  158. <ol>
  159. <li>Navigate to the Apache install directory/conf in Explorer</li>
  160. <li>Edit httpd.conf in a text editor</li>
  161. <li>Find both the authnz_ldap_module and&nbsp;ldap_module and make sure it is enabled by removing the # at the start of the line
  162. <p>LoadModule authnz_ldap_module modules/mod_authnz_ldap.so<br />
  163. LoadModule ldap_module modules/mod_ldap.so</p>
  164. </li>
  165. <li>Add the following to the Location block created earlier for svn.i12bretro.local to enable LDAP authentication
  166. <p>&nbsp; &nbsp; Order deny,allow<br />
  167. &nbsp; &nbsp; # Basic authentication with LDAP against MS AD<br />
  168. &nbsp; &nbsp; AuthType Basic<br />
  169. &nbsp; &nbsp; AuthBasicProvider ldap<br />
  170. <br />
  171. &nbsp; &nbsp; # AuthLDAPURL specifies the LDAP server IP, port, base DN, scope and filter<br />
  172. &nbsp; &nbsp; # using this format: ldap://host:port/basedn?attribute?scope?filter<br />
  173. &nbsp; &nbsp; AuthLDAPURL &quot;ldap://i12bretro.local:389/DC=i12bretro,DC=local?sAMAccountName?sub?(objectClass=user)&quot; NONE<br />
  174. <br />
  175. &nbsp; &nbsp; # The LDAP bind username and password<br />
  176. &nbsp; &nbsp; AuthLDAPBindDN &quot;readonly_svc@i12bretro.local&quot;<br />
  177. &nbsp; &nbsp; AuthLDAPBindPassword &quot;Read0nly!!&quot;<br />
  178. &nbsp; &nbsp; LDAPReferrals Off<br />
  179. &nbsp; &nbsp; AuthUserFile /dev/null<br />
  180. <br />
  181. &nbsp; &nbsp; AuthName &quot;Restricted Area [i12bretro.local]&quot;<br />
  182. &nbsp; &nbsp; # to authenticate a domain group, specify the full DN<br />
  183. &nbsp; &nbsp; AuthLDAPGroupAttributeIsDN on<br />
  184. &nbsp; &nbsp; require ldap-group CN=WebAuthAccess,CN=Users,DC=i12bretro,DC=local</p>
  185. </li>
  186. <li>Save httpd.conf</li>
  187. <li>Restart the Apache service</li>
  188. <li>Open a web browser and navigate back to http://svn.i12bretro.local</li>
  189. <li>An authentication prompt should be displayed</li>
  190. <li>Enter a valid username and password for a user belonging to the group specified above</li>
  191. <li>A bare bones directory listing of the Subversion repositories should be displayed</li>
  192. </ol>
  193. </div>
  194. </div>
  195. </body>
  196. </html>