0015.html 9.8 KB

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