Changes between Version 13 and Version 14 of TracEnvironment
- Timestamp:
- 14/06/2017 12:47:23 (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracEnvironment
v13 v14 4 4 [[PageOutline(2-5,Contents,pullout)]] 5 5 6 Trac uses a directory structure and a database for storing project data. The directory is referred to as the environment.7 6 Trac uses a directory structure and a database for storing project data. The directory is referred to as the '''environment'''. 8 7 … … 28 27 - Non-ascii environment paths are not supported. 29 28 30 - TracPlugins located in a [TracIni#inherit- section shared plugins folder] that is defined in an [TracIni#GlobalConfiguration inherited configuration] are not loaded during creation, and hence, if they need to create extra tables for example, you'll need to [TracUpgrade#UpgradetheTracEnvironment upgrade the environment]. Alternatively you can avoid the need to upgrade the environment by specifying a configuration file at the time the environment is created, using the `--config` option. See TracAdmin#FullCommandReference for more information.29 - TracPlugins located in a [TracIni#inherit-plugins_dir-option shared plugins folder] that is defined in an [TracIni#GlobalConfiguration inherited configuration] are not loaded during creation, and hence, if they need to create extra tables for example, you'll need to [TracUpgrade#UpgradetheTracEnvironment upgrade the environment]. Alternatively you can avoid the need to upgrade the environment by specifying a configuration file at the time the environment is created, using the `--config` option. See TracAdmin#FullCommandReference for more information. 31 30 32 {{{#!div style="border: 1pt dotted; margin: 1em "31 {{{#!div style="border: 1pt dotted; margin: 1em;" 33 32 **Caveat:** don't confuse the //Trac environment directory// with the //source code repository directory//. 34 33 … … 39 38 == Database Connection Strings 40 39 41 You will need to specify a database connection string at the time the environment is created. The default is SQLite, which is probablysufficient for most projects. The SQLite database file is stored in the environment directory, and can easily be [wiki:TracBackup backed up] together with the rest of the environment.40 You will need to specify a database connection string at the time the environment is created. The default is SQLite, which is sufficient for most projects. The SQLite database file is stored in the environment directory, and can easily be [wiki:TracBackup backed up] together with the rest of the environment. 42 41 43 42 Note that if the username or password of the connection string (if applicable) contains the `:`, `/` or `@` characters, they need to be URL encoded. … … 80 79 }}} 81 80 82 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, because of Trac's use of unicode. SQL_ASCII also seems to work.81 When running `createuser` you will be prompted for the password for the `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. 83 82 84 83 Under some default configurations (Debian), run the `createuser` and `createdb` scripts as the `postgres` user: … … 95 94 === MySQL Connection String 96 95 97 The format of the MySQL connection string is similar to those forPostgreSQL, with the `postgres` scheme being replaced by `mysql`. For example, to connect to a MySQL database on `localhost` named `trac` for user `johndoe` with password `letmein`:96 The format of the MySQL connection string is similar to PostgreSQL, with the `postgres` scheme being replaced by `mysql`. For example, to connect to a MySQL database on `localhost` named `trac` for user `johndoe` with password `letmein`: 98 97 {{{ 99 98 mysql://johndoe:letmein@localhost:3306/trac … … 104 103 A single environment can be connected to more than one repository. However, by default Trac is not connected to any source code repository, and the ''Browse Source'' navigation item will not be displayed. 105 104 106 There are many differentways to connect repositories to an environment, see TracRepositoryAdmin. A single repository can be specified when the environment is created by passing the optional arguments `repository_type` and `repository_dir` to the `initenv` command.105 There are several ways to connect repositories to an environment, see TracRepositoryAdmin. A single repository can be specified when the environment is created by passing the optional arguments `repository_type` and `repository_dir` to the `initenv` command. 107 106 108 107 == Directory Structure … … 115 114 * `attachments` - Attachments to wiki pages and tickets. 116 115 * `conf` 117 * `trac.ini` - Main configuration file. See TracIni.116 * `trac.ini` - Main [TracIni configuration file]. 118 117 * `db` 119 118 * `trac.db` - The SQLite database, if you are using SQLite. 120 * `htdocs` - Directory containing web resources, which can be referenced in Genshi templates using `/chrome/site/...` URLs.121 * `log` - Default directory for log files , if`file` logging is enabled and a relative path is given.119 * `htdocs` - Directory containing web resources, which can be referenced in templates using the path `/chrome/site/...`. 120 * `log` - Default directory for log files when `file` logging is enabled and a relative path is given. 122 121 * `plugins` - Environment-specific [wiki:TracPlugins plugins]. 123 122 * `templates` - Custom Genshi environment-specific templates. 124 * `site.html` - Method to customize header, footer, and style, described in TracInterfaceCustomization#SiteAppearance.123 * `site.html` - Method to [TracInterfaceCustomization#SiteAppearance customize] the site header, footer, and style. 125 124 126 125 ---- 127 See also: TracAdmin, TracBackup, TracIni , TracGuide126 See also: TracAdmin, TracBackup, TracIni