Changes between Version 1 and Version 2 of TracStandalone


Ignore:
Timestamp:
Mar 15, 2010, 10:46:23 AM (14 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracStandalone

    v1 v2  
    88 * Fast: Should be almost as fast as the [wiki:TracModPython mod_python] version (and much faster than the [wiki:TracCgi CGI]).
    99 * Automatic reloading: For development, Tracd can be used in ''auto_reload'' mode, which will automatically restart the server whenever you make a change to the code (in Trac itself or in a plugin).
     10  * Options for tracd: `-r, --auto-reload`
    1011
    1112== Cons ==
     
    4041To exit the server on Windows, be sure to use {{{CTRL-BREAK}}} -- using {{{CTRL-C}}} will leave a Python process running in the background.
    4142
    42 When running as a Windows service using a utility such as [http://www.google.com/search?q=srvany.exe SRVANY], stopping or restarting the service will also leave a Python process running -- restart the system instead.
    43 
     43== Installing as a Windows Service ==
     44
     45To install as a Windows service, get the [http://www.google.com/search?q=srvany.exe SRVANY] utility and run:
     46{{{
     47 C:\path\to\instsrv.exe tracd C:\path\to\srvany.exe
     48 reg add HKLM\SYSTEM\CurrentControlSet\Services\tracd\Parameters /v Application /d "\"C:\path\to\python.exe\" \"C:\path\to\python\scripts\tracd-script.py\" <your tracd parameters>"
     49 net start tracd
     50}}}
     51
     52'''DO NOT''' use {{{tracd.exe}}}.  Instead register {{{python.exe}}} directly with {{{tracd-script.py}}} as a parameter.  If you use {{{tracd.exe}}}, it will spawn the python process without SRVANY's knowledge.  This python process will survive a {{{net stop tracd}}}.
     53
     54If you want tracd to start automatically when you boot Windows, do:
     55{{{
     56 sc config tracd start= auto
     57}}}
     58
     59The spacing here is important.
    4460
    4561== Using Authentication ==
     
    5066
    5167{{{
    52 sudo htpasswd -c /path/to/env/.htpasswd username
     68 $ sudo htpasswd -c /path/to/env/.htpasswd username
    5369}}}
    5470then for additional users:
    5571{{{
    56 sudo htpasswd /path/to/env/.htpasswd username2
    57 }}}
    58 then for starting the tracd:
    59 {{{
    60 tracd -p 8080 --basic-auth=environmentname,/fullpath/environmentname/.htpasswd,/fullpath/environmentname /fullpath/environmentname
    61 }}}
    62 
     72 $ sudo htpasswd /path/to/env/.htpasswd username2
     73}}}
     74then for starting the tracd (on windows skip the "=" after --basic-auth):
     75{{{
     76 $ tracd -p 8080 --basic-auth=environmentname,/fullpath/environmentname/.htpasswd,/fullpath/environmentname /fullpath/environmentname
     77}}}
    6378
    6479Tracd provides support for both Basic and Digest authentication. The default is to use Digest; to use Basic authentication, replace `--auth` with `--basic-auth` in the examples below. (You must still specify a dialogic "realm", which can be an empty string by trailing the BASICAUTH with a comma.)
     
    6681  ''Support for Basic authentication was added in version 0.9.''
    6782
    68 The general format for using authentication is:
     83The general format for using authentication is (on windows skip the "=" after --auth):
    6984
    7085{{{
     
    7994 * '''project_path''' path of the project
    8095
    81 Example:
     96Example (on windows skip the "=" after --auth):
    8297
    8398{{{
     
    147162
    148163{{{
    149 python trac-digest.py -u username -p password >> c:\digest.txt
    150 tracd --port 8000 --auth=proj_name,c:\digest.txt,trac c:\path\to\proj_name
     164 $ python trac-digest.py -u username -p password >> c:\digest.txt
     165 $ tracd --port 8000 --auth=proj_name,c:\digest.txt,trac c:\path\to\proj_name
    151166}}}
    152167
     
    155170It is possible to use md5sum utility to generate digest-password file using such method:
    156171{{{
    157 echo -e "${user}:trac:${password}\c" | md5sum - >>to-file
    158 }}}
    159 and manually delete " -" from the end and add "${user}:trac:" to the start of line from 'to-file'. You can see attachment:trac-digest-corrected.sh for detail.
     172 $ printf "${user}:trac:${password}" | md5sum - >>user.htdigest
     173}}}
     174and manually delete " -" from the end and add "${user}:trac:" to the start of line from 'to-file'.
    160175
    161176== Tips ==
     
    175190in the Wiki: `[/<project_name>/chrome/site/software-0.1.tar.gz]`
    176191
    177 The development version of Trac supports a new `htdocs:` TracLinks
     192Since 0.10, Trac supports a new `htdocs:` TracLinks
    178193syntax for the above. With this, the example link above can be written simply
    179194`htdocs:software-0.1.tar.gz`.
     
    185200Tracd supports serving projects with different base urls than /<project>. The parameter name to change this is
    186201{{{
    187 tracd --base-path=/some/path
     202 $ tracd --base-path=/some/path
    188203}}}
    189204