Edgewall Software

Changes between Version 5 and Version 6 of 0.12/TracStandalone


Ignore:
Timestamp:
Apr 10, 2010, 7:04:28 PM (14 years ago)
Author:
Christian Boos
Comment:

sync with [9452] and freezing

Legend:

Unmodified
Added
Removed
Modified
  • 0.12/TracStandalone

    v5 v6  
     1** Note: this page was used to prepare the 0.12 version of wiki:/TracStandalone, see now directly that toplevel page **
    12= Tracd =
    23
     
    4344== Installing as a Windows Service ==
    4445
     46=== Option 1 ===
    4547To install as a Windows service, get the [http://www.google.com/search?q=srvany.exe SRVANY] utility and run:
    4648{{{
     
    5961The spacing here is important.
    6062
     63For Windows 7 User, srvany.exe may not be an option, so you can use [http://www.google.com/search?q=winserv.exe WINSERV] utility and run:
     64{{{
     65"C:\path\to\winserv.exe" install tracd -displayname "tracd" -start auto "C:\path\to\python.exe" c:\path\to\python\scripts\tracd-script.py <your tracd parameters>"
     66
     67net start tracd
     68}}}
     69
     70=== Option 2 ===
     71
     72Use [http://trac-hacks.org/wiki/WindowsServiceScript WindowsServiceScript], available at [http://trac-hacks.org/ Trac Hacks]. Installs, removes, starts, stops, etc. your Trac service.
     73
    6174== Using Authentication ==
    6275
     
    6679
    6780{{{
    68 sudo htpasswd -c /path/to/env/.htpasswd username
     81 $ sudo htpasswd -c /path/to/env/.htpasswd username
    6982}}}
    7083then for additional users:
    7184{{{
    72 sudo htpasswd /path/to/env/.htpasswd username2
     85 $ sudo htpasswd /path/to/env/.htpasswd username2
    7386}}}
    7487then for starting the tracd (on windows skip the "=" after --basic-auth):
     
    8396  ''Support for Basic authentication was added in version 0.9.''
    8497
    85 The general format for using authentication is (on windows skip the "=" after --auth):
    86 
    87 {{{
    88  $ tracd -p port --auth=base_project_dir,password_file_path,realm project_path
     98The general format for using authentication is (replace `--auth` with `--basic-auth` if you want to use Basic auth):
     99
     100{{{
     101 $ tracd -p port --auth="base_project_dir,password_file_path,realm" project_path
    89102}}}
    90103
    91104where:
    92105
    93  * '''base_project_dir''' is the base directory of the project; note: this doesn't refer to the project name, and it is case-sensitive even for windows environments
    94  * '''password_file_path''' path of the password file
    95  * '''realm''' realm
    96  * '''project_path''' path of the project
    97 
    98 Example (on windows skip the "=" after --auth):
     106 * '''base_project_dir''': the base directory of the project specified as follows:
     107   * when serving multiple projects: ''relative'' to the `project_bath`
     108   * when serving only a single project (`-s`): the name of the project directory
     109 Don't use an absolute path here as this won't work. ''Note:'' This parameter is case-sensitive even for environments on Windows.
     110 * '''password_file_path''': path to the password file
     111 * '''realm''': the realm name (can be anything)
     112 * '''project_path''': path of the project
     113
     114Examples:
    99115
    100116{{{
    101117 $ tracd -p 8080 \
    102    --auth=project1,/path/to/users.htdigest,mycompany.com /path/to/project1
    103 }}}
    104 Of course, the digest file can be be shared so that it is used for more than one project:
     118   --auth="project1,/path/to/passwordfile,mycompany.com" /path/to/project1
     119}}}
     120
     121Of course, the password file can be be shared so that it is used for more than one project:
    105122{{{
    106123 $ tracd -p 8080 \
    107    --auth=project1,/path/to/users.htdigest,mycompany.com \
    108    --auth=project2,/path/to/users.htdigest,mycompany.com \
     124   --auth="project1,/path/to/passwordfile,mycompany.com" \
     125   --auth="project2,/path/to/passwordfile,mycompany.com" \
    109126   /path/to/project1 /path/to/project2
    110127}}}
    111128
    112 Another way to share the digest file is to specify "*"
    113 for the project name:
     129Another way to share the password file is to specify "*" for the project name:
    114130{{{
    115131 $ tracd -p 8080 \
    116    --auth="*",/path/to/users.htdigest,mycompany.com \
     132   --auth="*,/path/to/users.htdigest,mycompany.com" \
    117133   /path/to/project1 /path/to/project2
    118134}}}
    119 If using the `-s` parameter for serving a Trac environment from the root of a domain, one must use `*` for the project name
    120 
    121 == How to set up an htdigest password file ==
     135
     136=== Using a htpasswd password file ===
     137This section describes how to use `tracd` with Apache .htpasswd files.
     138
     139To create a .htpasswd file use Apache's `htpasswd` command (see [#GeneratingPasswordsWithoutApache below] for a method to create these files without using Apache):
     140
     141{{{
     142 $ sudo htpasswd -c /path/to/env/.htpasswd username
     143}}}
     144then for additional users:
     145{{{
     146 $ sudo htpasswd /path/to/env/.htpasswd username2
     147}}}
     148
     149Then to start `tracd` run something like this:
     150
     151{{{
     152 $ tracd -p 8080 --basic-auth="projectdirname,/fullpath/environmentname/.htpasswd,realmname" /fullpath/environmentname
     153}}}
     154
     155For example:
     156
     157{{{
     158 $ tracd -p 8080 --basic-auth="testenv,/srv/tracenv/testenv/.htpasswd,My Test Env" /srv/tracenv/testenv
     159}}}
     160
     161''Note:'' You might need to pass "-m" as a parameter to htpasswd on some platforms (OpenBSD).
     162
     163=== Using a htdigest password file ===
    122164
    123165If you have Apache available, you can use the htdigest command to generate the password file. Type 'htdigest' to get some usage instructions, or read [http://httpd.apache.org/docs/2.0/programs/htdigest.html this page] from the Apache manual to get precise instructions.  You'll be prompted for a password to enter for each user that you create.  For the name of the password file, you can use whatever you like, but if you use something like `users.htdigest` it will remind you what the file contains. As a suggestion, put it in your <projectname>/conf folder along with the [TracIni trac.ini] file.
     
    125167Note that you can start tracd without the --auth argument, but if you click on the ''Login'' link you will get an error.
    126168
    127 == Generating Passwords Without Apache ==
     169=== Generating Passwords Without Apache ===
    128170
    129171If you don't have Apache available, you can use this simple Python script to generate your passwords:
     
    164206
    165207{{{
    166 python trac-digest.py -u username -p password >> c:\digest.txt
    167 tracd --port 8000 --auth=proj_name,c:\digest.txt,trac c:\path\to\proj_name
     208 $ python trac-digest.py -u username -p password >> c:\digest.txt
     209 $ tracd --port 8000 --auth=proj_name,c:\digest.txt,trac c:\path\to\proj_name
    168210}}}
    169211