| 1 | == Windows Installation instructions for SVN w/TRAC == |
| 2 | |
| 3 | Versions used in this example (Available 2004-05-13): |
| 4 | * Apache 2.0.49 |
| 5 | * Python 2.3.3 |
| 6 | * SVN 1.0.2 |
| 7 | * SQLite 2.8.13 |
| 8 | * PySQLite 0.5.0-py2.3 |
| 9 | * Trac 0.6.1 |
| 10 | |
| 11 | Email [mailto:Daragh@i2i-Tech.com Daragh Fitzpatrick] for more info, |
| 12 | or if you changed this page (since this Wiki does not support watch/subscription) |
| 13 | ---- |
| 14 | Note: This example installs to D: |
| 15 | |
| 16 | === Arm Yourself === |
| 17 | 1. Get & Read book |
| 18 | http://svnbook.red-bean.com |
| 19 | |
| 20 | === Install SubVersioN Pre-Requisites === |
| 21 | 2. Install Python |
| 22 | http://www.python.org |
| 23 | [[br]]Add D:\Python to path |
| 24 | |
| 25 | 3. Install Apache |
| 26 | http://httpd.apache.org |
| 27 | |
| 28 | 4. Install Subversion |
| 29 | http://subversion.tigris.org |
| 30 | |
| 31 | === Create Repository === |
| 32 | 5. Create Repository Directory |
| 33 | {{{ |
| 34 | D:\> md d:\svn |
| 35 | }}} |
| 36 | |
| 37 | 6. Create Repository |
| 38 | {{{ |
| 39 | D:\> svnadmin create d:\svn\repo1 |
| 40 | }}} |
| 41 | |
| 42 | 7. Create skeleton repository structure in d:\temp\project |
| 43 | Example: |
| 44 | {{{ |
| 45 | /project |
| 46 | /vendor |
| 47 | /tags |
| 48 | /trunk |
| 49 | files |
| 50 | /projectname |
| 51 | /branches |
| 52 | /tags |
| 53 | /trunk |
| 54 | files |
| 55 | }}} |
| 56 | |
| 57 | 8. Build Repository Tree |
| 58 | {{{ |
| 59 | D:\> svn import d:\temp\project file:///d:/svn/repo1 -m "Initial Load" |
| 60 | }}} |
| 61 | |
| 62 | 9. Create local sandbox |
| 63 | {{{ |
| 64 | D:\> svn checkout file:///d:/svn/repo1 d:\project |
| 65 | }}} |
| 66 | |
| 67 | === Configure Apache === |
| 68 | |
| 69 | 10. Copy files |
| 70 | {{{ |
| 71 | D:\> copy d:\progra~1\subver~1\httpd\*.* d:\progra~1\apache~1\apache2\modules |
| 72 | }}} |
| 73 | |
| 74 | 11. Create password file (w/user 'admin') |
| 75 | {{{ |
| 76 | D:\> d:\progra~1\apache~1\apache2\bin\htpasswd -cm d:\svn\.htaccess admin |
| 77 | }}} |
| 78 | |
| 79 | 12. Configure Apache (edit httpd.conf) |
| 80 | 12.1. Restrict access/lockdown as appropriate |
| 81 | |
| 82 | 12.2. Add Modules to httpd.conf |
| 83 | |
| 84 | 12.1.1. Uncomment: |
| 85 | {{{ |
| 86 | LoadModule dav_module modules/mod_dav.so |
| 87 | }}} |
| 88 | 12.1.2. Add (after): |
| 89 | {{{ |
| 90 | # Subversion |
| 91 | LoadModule dav_svn_module modules/mod_dav_svn.so |
| 92 | }}} |
| 93 | |
| 94 | 12.3. Add location root for multiple repositories |
| 95 | {{{ |
| 96 | # Subversion |
| 97 | <Location /svn> |
| 98 | DAV svn |
| 99 | # any /svn/foo URL will map to a repository D:/svn/foo |
| 100 | SVNParentPath D:/svn |
| 101 | AuthType Basic |
| 102 | AuthName "Subversion repository" |
| 103 | AuthUserFile d:/svn/.htaccess |
| 104 | Require valid-user |
| 105 | </Location> |
| 106 | }}} |
| 107 | |
| 108 | 13. Restart your MACHINE |
| 109 | |
| 110 | 14. Test your install of Subversion |
| 111 | http://[hostname]:80/svn/repo1 |
| 112 | |
| 113 | Phew! Subversion is installed and working - Grab a beverage for yourself. |
| 114 | ---- |
| 115 | |
| 116 | === Setup Users === |
| 117 | 15. Add users to password file |
| 118 | {{{ |
| 119 | D:\> d:\progra~1\apache~1\apache2\bin\htpasswd -m d:\svn\.htaccess user |
| 120 | }}} |
| 121 | |
| 122 | === Install TRAC Prerequisites === |
| 123 | 16. Install Subversion Python Bindings |
| 124 | (Get from same download page as Subversion) |
| 125 | [[br]]Copy libsvn and svn directories to D:\Python23\Lib |
| 126 | |
| 127 | 17. Install SQLite |
| 128 | http://www.sqlite.org |
| 129 | [[br]]Copy sqlite.exe to D:\Program Files\SQLite |
| 130 | |
| 131 | 18. Install PySQLite |
| 132 | http://pysqlite.sourceforge.net |
| 133 | |
| 134 | 19. Install TRAC |
| 135 | http://www.edgewall.com/products/trac/ |
| 136 | |
| 137 | === Fix a few things === |
| 138 | 20. (BUG) Edit first line of D:\Python23\Scripts\trac-admin to have: |
| 139 | {{{ |
| 140 | |
| 141 | #!D:\Python23\python.exe |
| 142 | }}} |
| 143 | |
| 144 | 21. (BUG) Edit first line of D:\Python23\share\trac\cgi-bin\trac.cgi to have: |
| 145 | {{{ |
| 146 | |
| 147 | #!D:\Python23\python.exe |
| 148 | }}} |
| 149 | |
| 150 | 22. Copy CGI |
| 151 | {{{ |
| 152 | D:\> copy d:\python23\share\trac\cgi-bin\trac.cgi d:\progra~1\apache~1\apache2\cgi-bin |
| 153 | }}} |
| 154 | |
| 155 | 23. (BUG) not able to run trac-admin initenv... Not available in 0.6.1 |
| 156 | |
| 157 | === Configure TRAC DB === |
| 158 | |
| 159 | 24. Run trac-admin |
| 160 | {{{ |
| 161 | D:\Python23\Scripts> python trac-admin d:/svn/trac.db |
| 162 | }}} |
| 163 | |
| 164 | 25. Initialize DB |
| 165 | {{{ |
| 166 | Trac [d:/svn/trac.db]> initdb |
| 167 | }}} |
| 168 | {{{ |
| 169 | Enter project name |
| 170 | Project |
| 171 | Enter path to repository |
| 172 | d:\svn\repo1 |
| 173 | Enter path to templates |
| 174 | d:\Python23\share\trac\templates |
| 175 | (BUG) Note error message regarding wiki-pages |
| 176 | }}} |
| 177 | |
| 178 | 26. (BUG) Load Wiki |
| 179 | {{{ |
| 180 | Trac [d:/svn/trac.db]> wiki load d:/python23/share/trac/wiki-default |
| 181 | }}} |
| 182 | |
| 183 | 27. Add administrative permissions |
| 184 | {{{ |
| 185 | Trac [d:/svn/trac.db]> permission add admin TICKET_ADMIN |
| 186 | Trac [d:/svn/trac.db]> permission add admin REPORT_CREATE |
| 187 | Trac [d:/svn/trac.db]> permission add admin REPORT_MODIFY |
| 188 | Trac [d:/svn/trac.db]> permission add admin REPORT_DELETE |
| 189 | Trac [d:/svn/trac.db]> permission add admin REPORT_ADMIN |
| 190 | Trac [d:/svn/trac.db]> permission add admin WIKI_DELETE |
| 191 | Trac [d:/svn/trac.db]> permission add admin WIKI_ADMIN |
| 192 | Trac [d:/svn/trac.db]> permission add admin CONFIG_VIEW |
| 193 | Trac [d:/svn/trac.db]> permission add admin TRAC_ADMIN |
| 194 | }}} |
| 195 | |
| 196 | === Add TRAC to Apache === |
| 197 | |
| 198 | 28. Edit httpd.conf: |
| 199 | Add: (copy this - there's a typo in Edgewall's version) |
| 200 | {{{ |
| 201 | # TRAC |
| 202 | Alias /trac "D:/Python23/share/trac/htdocs" |
| 203 | <Directory "D:/Python23/share/trac/htdocs"> |
| 204 | Options Indexes MultiViews |
| 205 | AllowOverride None |
| 206 | Order allow,deny |
| 207 | Allow from all |
| 208 | </Directory> |
| 209 | |
| 210 | <Location "/cgi-bin/trac.cgi"> |
| 211 | SetEnv TRAC_DB "d:/svn/trac.db" |
| 212 | </Location> |
| 213 | |
| 214 | <Location "/cgi-bin/trac.cgi/login"> |
| 215 | AuthType Basic |
| 216 | AuthName "Project" |
| 217 | AuthUserFile D:/svn/.htaccess |
| 218 | Require valid-user |
| 219 | </Location> |
| 220 | }}} |
| 221 | |
| 222 | 29. Restart Apache |
| 223 | |
| 224 | 30. Hold your breath, test TRAC install |
| 225 | http://[hostname]:80/cgi-bin/trac.cgi |
| 226 | |
| 227 | === Finally... === |
| 228 | 31. Install SVN Clients as necessary (try [http://rapidsvn.tigris.org Rapid SVN] & [http://tortoisesvn.tigris.org/ Tortoise SVN]) |
| 229 | |
| 230 | 32. Don't forget to lock down the security on the box! |
| 231 | |
| 232 | 33. Now go get a *real* drink |
| 233 | ---- |
| 234 | Email [mailto:Daragh@i2i-Tech.com Daragh Fitzpatrick] with any questions! |
| 235 | ---- |