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