Edgewall Software

Changes between Version 58 and Version 59 of TracEnvironment


Ignore:
Timestamp:
Jan 3, 2015, 10:36:25 AM (5 years ago)
Author:
figaro
Comment:

Cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • TracEnvironment

    v58 v59  
    33[[PageOutline]]
    44
    5 Trac uses a directory structure and a database for storing project data. The directory is referred to as the “environment”.
     5Trac uses a directory structure and a database for storing project data. The directory is referred to as the environment.
    66
    77== Creating an Environment
    88
    9 A new Trac environment is created using  [TracAdmin#initenv trac-admin's initenv]:
     9A new Trac environment is created using [TracAdmin#initenv trac-admin's initenv]:
    1010{{{#!sh
    1111$ trac-admin /path/to/myproject initenv
    1212}}}
    1313
    14 `trac-admin` will ask you for the name of the project and the
    15 database connection string (explained below).
     14`trac-admin` will ask you for the name of the project and the database connection string, see below.
    1615
    17 === Some Useful Tips
     16=== Useful Tips
    1817
    19  - 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).
     18 - 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.
    2019
    2120 - The user under which the web server runs will require file system write permission to
     
    2625 - `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.
    2726
    28  - Non-ascii environment paths are not supported
     27 - Non-ascii environment paths are not supported.
    2928 
    30  - Also, it seems that project names with spaces can be problematic for authentication (see [trac:#7163]).
     29 - Also, it seems that project names with spaces can be problematic for authentication, see [trac:#7163].
    3130
    3231 - TracPlugins located in a [TracIni#inherit-section shared plugins folder] that is defined in an [TracIni#GlobalConfiguration inherited configuration] are currently not loaded during creation, and hence, if they need to create extra tables for example, you'll need to [TracUpgrade#UpgradetheTracEnvironment upgrade the environment] before being able to use it.
     
    3433== Database Connection Strings
    3534
    36 Trac supports [http://sqlite.org/ SQLite], [http://www.postgresql.org/ PostgreSQL] and [http://mysql.com/ MySQL] database backends.  The default is to use SQLite, which is probably sufficient for most projects. The database
    37 file is then stored in the environment directory, and can easily be
    38 [wiki:TracBackup backed up] together with the rest of the environment.
     35Trac supports [http://sqlite.org/ SQLite], [http://www.postgresql.org/ PostgreSQL] and [http://mysql.com/ MySQL] database backends. The default is SQLite, which is probably sufficient for most projects. The database file is then stored in the environment directory, and can easily be [wiki:TracBackup backed up] together with the rest of the environment.
    3936
    4037Note that if the username or password of the connection string (if applicable) contains the `:`, `/` or `@` characters, they need to be URL encoded.
     
    4845
    4946=== PostgreSQL Connection String
    50 If you want to use PostgreSQL or MySQL instead, you'll have to use a
    51 different connection string. For example, to connect to a PostgreSQL
    52 database on the same machine called `trac`, that allows access to the
    53 user `johndoe` with the password `letmein`, use:
     47If 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:
    5448{{{
    5549postgres://johndoe:letmein@localhost/trac
    5650}}}
    5751
    58 If PostgreSQL is running on a non-standard port (for example 9342), use:
     52If PostgreSQL is running on a non-standard port, for example 9342, use:
    5953{{{
    6054postgres://johndoe:letmein@localhost:9342/trac
    6155}}}
    6256
    63 On UNIX, you might want to select a UNIX socket for the transport,
    64 either the default socket as defined by the PGHOST environment variable:
     57On UNIX, you might want to select a UNIX socket for the transport, either the default socket as defined by the PGHOST environment variable:
    6558{{{
    6659postgres://user:password@/database
     
    7164}}}
    7265
    73 Note that with PostgreSQL you will have to create the database before running
    74 `trac-admin initenv`.
     66Note that with PostgreSQL you will have to create the database before running `trac-admin initenv`.
    7567
    7668See the [http://www.postgresql.org/docs/ PostgreSQL documentation] for detailed instructions on how to administer [http://postgresql.org PostgreSQL].
    77 Generally, the following is sufficient to create a database user named `tracuser`, and a database named `trac`.
     69Generally, the following is sufficient to create a database user named `tracuser` and a database named `trac`:
    7870{{{#!sh
    7971$ createuser -U postgres -E -P tracuser
     
    8880}}}
    8981
    90 Trac uses the `public` schema by default but you can specify a different schema in the connection string:
     82Trac uses the `public` schema by default, but you can specify a different schema in the connection string:
    9183{{{
    9284postgres://user:pass@server/database?schema=yourschemaname
     
    9587=== MySQL Connection String
    9688
    97 The format of the MySQL connection string is similar to the examples presented for PostgreSQL, with the `postgres` scheme being replaced by `mysql`. For example, to connect to a MySQL
    98 database on the same machine called `trac`, allowing access to the
    99 user `johndoe` with the password `letmein`, the mysql connection string is:
     89The 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:
    10090{{{
    10191mysql://johndoe:letmein@localhost:3306/trac
     
    10494== Source Code Repository
    10595
    106 Since version 0.12, a single Trac environment can be connected to more than one repository. There are many different ways to connect repositories to an environment, see TracRepositoryAdmin. This page also details the various attributes that can be set for a repository (like `type`, `url`, `description`).
     96Since Trac 0.12, a single environment can be connected to more than one repository. There are many different ways to connect repositories to an environment, see TracRepositoryAdmin. This page also details the various attributes that can be set for a repository, such as `type`, `url`, `description`.
    10797
    10898In Trac 0.12 `trac-admin` no longer asks questions related to repositories. Therefore, by default Trac is not connected to any source code repository, and the ''Browse Source'' toolbar item will not be displayed.
    109 You can also explicitly disable the `trac.versioncontrol.*` components (which are otherwise still loaded)
     99You can also explicitly disable the `trac.versioncontrol.*` components, which are otherwise still loaded.
    110100{{{#!ini
    111101[components]
     
    113103}}}
    114104
    115 For some version control systems, it is possible to specify not only the path to the repository,
    116 but also a ''scope'' within the repository. Trac will then only show information
    117 related to the files and changesets below that scope. The Subversion backend for
    118 Trac supports this; for other types, check the corresponding plugin's documentation.
     105For some version control systems, it is possible to specify not only the path to the repository, but also a ''scope'' within the repository. Trac will then only show information related to the files and changesets below that scope. The Subversion backend for Trac supports this. For other types, check the corresponding plugin's documentation.
    119106
    120107Example of a configuration for a Subversion repository used as the default repository:
     
    137124
    138125 * `README` - Brief description of the environment.
    139  * `VERSION` - Contains the environment version identifier.
     126 * `VERSION` - Environment version identifier.
    140127 * `attachments` - Attachments to wiki pages and tickets are stored here.
    141128 * `conf`
    142129  * `trac.ini` - Main configuration file. See TracIni.
    143130 * `db`
    144   * `trac.db` - The SQLite database (if you're using SQLite).
    145  * `htdocs` - directory containing web resources, which can be referenced in Genshi templates using `/htdocs/site/...` URLs.
    146  * `log` - default directory for log files, if logging is turned on and a relative path is given.
    147  * `plugins` - Environment-specific [wiki:TracPlugins plugins]
     131  * `trac.db` - The SQLite database, if you are using SQLite.
     132 * `htdocs` - Directory containing web resources, which can be referenced in Genshi templates using `/htdocs/site/...` URLs.
     133 * `log` - Default directory for log files, if logging is turned on and a relative path is given.
     134 * `plugins` - Environment-specific [wiki:TracPlugins plugins].
    148135 * `templates` - Custom Genshi environment-specific templates.
    149   * `site.html` - method to customize header, footer, and style, described in TracInterfaceCustomization#SiteAppearance
     136  * `site.html` - Method to customize header, footer, and style, described in TracInterfaceCustomization#SiteAppearance.
    150137
    151138=== Caveat: don't confuse a ''Trac environment directory'' with the ''source code repository directory'' #Caveat