0015.html 7.0 KB

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