| 1 | Trac information can be found on http://trac.edgewall.org/wiki/TracOnWindows concerning Windows install |
|---|
| 2 | |
|---|
| 3 | On a clean standard Windows 2003 server with at least SP2 |
|---|
| 4 | |
|---|
| 5 | Begin by downloading |
|---|
| 6 | -Python 2.5.4.msi |
|---|
| 7 | -Setuptools-0.6c7.win32-py2.X.exe |
|---|
| 8 | -Genshi-0.5.1.win32-py2.5 |
|---|
| 9 | -subversion .4.2 (svn-1.4.2-setup.exe) |
|---|
| 10 | -Trac-0.11.2.1.win32 |
|---|
| 11 | |
|---|
| 12 | Install in the following order |
|---|
| 13 | 1 -Python 2.5.4.msi |
|---|
| 14 | 2 -SetupTools 0.6c7 |
|---|
| 15 | 3 -Genshi 0.5.1 |
|---|
| 16 | |
|---|
| 17 | 4 -Add to windows path (korrect to appriate application paths) |
|---|
| 18 | ;c:\Python25;C:\Python25\Scripts |
|---|
| 19 | |
|---|
| 20 | 5 -ReBoot system |
|---|
| 21 | |
|---|
| 22 | Install |
|---|
| 23 | 6 -Subversion 1.4.2 |
|---|
| 24 | 7 -Trac 0.11.2 |
|---|
| 25 | |
|---|
| 26 | 8 -Create Projects (sample paths) |
|---|
| 27 | |
|---|
| 28 | -create c:\SVN (for Subversion) |
|---|
| 29 | -Create C:\Projects\Trac (for Trac projects) |
|---|
| 30 | |
|---|
| 31 | Optional: if you're using Trac with Subversion you can create a new repository for your source code: |
|---|
| 32 | |
|---|
| 33 | >md c:\projects\svn |
|---|
| 34 | |
|---|
| 35 | 9 -then create the repository (remember full path for later use with Trac project creation) |
|---|
| 36 | |
|---|
| 37 | >svnadmin create c:\SVN\svn-test |
|---|
| 38 | -this causes Subversion to create a subdirectory (c:\SVN\svn-test) containing the basics of a Subversion project |
|---|
| 39 | - if svnadmin is not accessable, check path variable (reboot might solve problem) |
|---|
| 40 | |
|---|
| 41 | |
|---|
| 42 | 10 -Create Trac projects place (trac-admin /path/to/myproject initenv) |
|---|
| 43 | |
|---|
| 44 | >trac-admin c:\projects\Trac initenv -starts a wizard |
|---|
| 45 | -when asked for the "Path to repository" input the folder of the repository you just created C:/SVN/svn-test |
|---|
| 46 | be sure to include the full path, including the drive letter, !!!!!! and use forward slashes.!!!!!! |
|---|
| 47 | |
|---|
| 48 | -------------------------------------------------------- |
|---|
| 49 | Project Name [My Project]> svn-test + [Enter] |
|---|
| 50 | |
|---|
| 51 | Database connecting string [sqlite:db/trac.db]> [Enter] |
|---|
| 52 | |
|---|
| 53 | Repository type [svn]> [Enter] |
|---|
| 54 | |
|---|
| 55 | Path to repository [/path/to/repos]> c:/SVN/svn-test + [Enter] |
|---|
| 56 | |
|---|
| 57 | Template directory [C:\Python25\share\trac\templates]> [Enter] |
|---|
| 58 | --------------------------------------------------------- |
|---|
| 59 | |
|---|
| 60 | 11 -For authentication create trace-digest.py file |
|---|
| 61 | |
|---|
| 62 | save the python code (between the -- lines) into c:\Python25\Scripts\trace-digest.py |
|---|
| 63 | --------------------------------------------------------- |
|---|
| 64 | from optparse import OptionParser |
|---|
| 65 | import md5 |
|---|
| 66 | |
|---|
| 67 | # build the options |
|---|
| 68 | usage = "usage: %prog [options]" |
|---|
| 69 | parser = OptionParser(usage=usage) |
|---|
| 70 | parser.add_option("-u", "--username",action="store", dest="username", type = "string", |
|---|
| 71 | help="the username for whom to generate a password") |
|---|
| 72 | parser.add_option("-p", "--password",action="store", dest="password", type = "string", |
|---|
| 73 | help="the password to use") |
|---|
| 74 | (options, args) = parser.parse_args() |
|---|
| 75 | |
|---|
| 76 | # check options |
|---|
| 77 | if (options.username is None) or (options.password is None): |
|---|
| 78 | parser.error("You must supply both the username and password") |
|---|
| 79 | |
|---|
| 80 | # Generate the string to enter into the htdigest file |
|---|
| 81 | realm = 'trac' |
|---|
| 82 | kd = lambda x: md5.md5(':'.join(x)).hexdigest() |
|---|
| 83 | print ':'.join((options.username, realm, kd([options.username, realm, options.password]))) |
|---|
| 84 | --------------------------------------------------------- |
|---|
| 85 | |
|---|
| 86 | 12- create userauth file if using httpd webserver and --auth parameter (OBS not for -basic--auth) |
|---|
| 87 | |
|---|
| 88 | >trac-digest.py -u "admin" -p adminpassword >> C:\projects\users.txt |
|---|
| 89 | |
|---|
| 90 | Set user admin to be the Trac administrator |
|---|
| 91 | >trac-admin c:\projects\trac\svn-test permission add "admin" TRAC_ADMIN |
|---|
| 92 | |
|---|
| 93 | |
|---|
| 94 | 13 -Startup the webserver to listen to port 80, with authentication. "*" means all projects |
|---|
| 95 | |
|---|
| 96 | !!!! NOTE no space in line below between --auth -> ,trac !!!! |
|---|
| 97 | |
|---|
| 98 | >tracd-script.py -p 80 --auth="*",C:\projects\users.txt,trac c:\projects\trac\svn-test |
|---|
| 99 | |
|---|
| 100 | |
|---|
| 101 | 14 -test website |
|---|
| 102 | surf to localhost |
|---|
| 103 | |
|---|
| 104 | -------- |
|---|
| 105 | |
|---|
| 106 | For smtp mail configuration, edit the trac.ini according to above, located in C:\Projects\conf or C:\Projects\%Projectname%\conf |
|---|
| 107 | ----------------------- |
|---|
| 108 | |
|---|
| 109 | smtp_enabled = true |
|---|
| 110 | #avilable smtp server, authentication username and password |
|---|
| 111 | smtp_server = mail.maildomain.com |
|---|
| 112 | smtp_user = username |
|---|
| 113 | smtp_password = password |
|---|
| 114 | |
|---|
| 115 | #outgoing port |
|---|
| 116 | smtp_port = 25 |
|---|
| 117 | |
|---|
| 118 | #automaticly send event mail to... ; -separation in list !!! can a lot of mails!!! |
|---|
| 119 | smtp_always_cc = firstname@maildomain.com; secondname@maildomain.com |
|---|
| 120 | |
|---|
| 121 | #Displayed name and reply address |
|---|
| 122 | smtp_from_name = Trac Administrator |
|---|
| 123 | smtp_from = sendername@maildomain.com |
|---|
| 124 | |
|---|
| 125 | ----------- |
|---|