Edgewall Software

Changes between Version 8 and Version 9 of 1.1/TracEnvironment


Ignore:
Timestamp:
May 27, 2015, 4:45:11 AM (9 years ago)
Author:
Jun Omae
Comment:

Merged wiki:/TracEnvironment@62?action=diff

Legend:

Unmodified
Added
Removed
Modified
  • 1.1/TracEnvironment

    v8 v9  
    11= The Trac Environment
     2
    23[[TracGuideToc]]
    34[[PageOutline(2-5)]]
     
    1819 - Place your environment's directory on a filesystem which supports sub-second timestamps, as Trac monitors the timestamp of its configuration files and changes happening on a filesystem with too coarse-grained timestamp resolution may go undetected in Trac < 1.0.2. This is also true for the location of authentication files when using TracStandalone.
    1920
    20  - The user under which the web server runs will require file system write permission to
    21  the environment directory and all the files inside. Please remember to set
    22  the appropriate permissions. The same applies to the source code repository,
    23  although the user under which Trac runs will only require write access to a Subversion repository created with the BDB file system; for other repository types, check the corresponding plugin's documentation.
     21 - The user under which the web server runs will require file system write permission to the environment directory and all the files inside. Please remember to set the appropriate permissions. The same applies to the source code repository, although the user under which Trac runs will only require write access to a Subversion repository created with the BDB file system; for other repository types, check the corresponding plugin's documentation.
    2422 
    25  - `initenv`, when using an svn repository, does not imply that trac-admin will perform `svnadmin create` for the specified repository path. You need to perform the `svnadmin create` prior to `trac-admin initenv` if you're creating a new svn repository altogether with a new trac environment, otherwise you will see a message "Warning: couldn't index the repository" when initializing the environment.
     23 - `initenv`, when using an svn repository, does not imply that trac-admin will perform `svnadmin create` for the specified repository path. You need to perform the `svnadmin create` prior to `trac-admin initenv` if you're creating a new svn repository altogether with a new Trac environment; otherwise you will see a message "Warning: couldn't index the repository" when initializing the environment.
    2624
    2725 - Non-ascii environment paths are not supported.
     
    3533
    3634This is a common beginners' mistake.
    37 It happens that the structure for a Trac environment is loosely modeled after the Subversion
    38 repository directory structure, but those are two disjoint entities and they are not and //must not//
    39 be located at the same place.
     35It happens that the structure for a Trac environment is loosely modeled after the Subversion repository directory structure, but those are two disjoint entities and they are not and //must not// be located at the same place.
    4036}}}
    4137
     
    4743
    4844=== SQLite Connection String
     45
    4946The connection string for an SQLite database is:
    5047{{{
     
    5451
    5552=== PostgreSQL Connection String
     53
    5654If you want to use PostgreSQL instead, you'll have to use a different connection string. For example, to connect to a PostgreSQL database on the same machine called `trac` for user `johndoe` with the password `letmein` use:
    5755{{{
     
    6866postgres://user:password@/database
    6967}}}
     68
    7069or a specific one:
    7170{{{
     
    8180$ createdb -U postgres -O tracuser -E UTF8 trac
    8281}}}
    83 When running `createuser` you will be prompted for the password for the user 'tracuser'. This new user will not be a superuser, will not be allowed to create other databases and will not be allowed to create other roles. These privileges are not needed to run a trac instance. If no password is desired for the user, simply remove the `-P` and `-E` options from the `createuser` command.  Also note that the database should be created as UTF8. LATIN1 encoding causes errors trac's use of unicode in trac.  SQL_ASCII also seems to work.
    8482
    85 Under some default configurations (debian) one will have run the `createuser` and `createdb` scripts as the `postgres` user.  For example:
     83When running `createuser` you will be prompted for the password for the user 'tracuser'. This new user will not be a superuser, will not be allowed to create other databases and will not be allowed to create other roles. These privileges are not needed to run a Trac instance. If no password is desired for the user, simply remove the `-P` and `-E` options from the `createuser` command. Also note that the database should be created as UTF8. LATIN1 encoding causes errors, because of Trac's use of unicode. SQL_ASCII also seems to work.
     84
     85Under some default configurations (Debian) one will have run the `createuser` and `createdb` scripts as the `postgres` user:
    8686{{{#!sh
    8787$ sudo su - postgres -c 'createuser -U postgres -S -D -R -E -P tracuser'
     
    9696=== MySQL Connection String
    9797
    98 The format of the MySQL connection string is similar to those for PostgreSQL, with the `postgres` scheme being replaced by `mysql`. For example, to connect to a MySQL database on the same machine called `trac` for user `johndoe` with password `letmein`, the MySQL connection string is:
     98The format of the MySQL connection string is similar to those for PostgreSQL, with the `postgres` scheme being replaced by `mysql`. For example, to connect to a MySQL database on the same machine called `trac` for user `johndoe` with password `letmein`:
    9999{{{
    100100mysql://johndoe:letmein@localhost:3306/trac