Äîêóìåíò âçÿò èç êýøà ïîèñêîâîé ìàøèíû. Àäðåñ îðèãèíàëüíîãî äîêóìåíòà : http://kodomo.cmm.msu.ru/trac/tanchiki/wiki/TracEnvironment?action=diff&version=2
Äàòà èçìåíåíèÿ: Unknown
Äàòà èíäåêñèðîâàíèÿ: Mon Apr 11 21:32:30 2016
Êîäèðîâêà: IBM-866
TracEnvironment (diff) òÀÓ Tanchiki

Changes between Version 1 and Version 2 of TracEnvironment


Ignore:
Timestamp:
08/21/13 19:46:14 (3 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracEnvironment

    v1 v2 ˆà
    55== Creating an Environment ==ˆà
    66ˆà
    7ˆàA new Trac environment is created using  [wiki:TracAdmin trac-admin]:ˆà
    ˆà7A new Trac environment is created using  [TracAdmin#initenv trac-admin's initenv]:ˆà
    88{{{ˆà
    99$ trac-admin /path/to/myproject initenvˆà
    1010}}}ˆà
    1111ˆà
    12ˆà[wiki:TracAdmin trac-admin] will ask you for the name of the project, theˆà
    13ˆàdatabase connection string (explained below), and the type and path toˆà
    14ˆàyour source code repository.ˆà
    ˆà12`trac-admin` will ask you for the name of the project and theˆà
    ˆà13database connection string (explained below).ˆà
    1514ˆà
    16ˆà''Note: The web server user will require file system write permission to ˆà
    17ˆàthe environment directory and all the files inside. Please remember to setˆà
    18ˆàthe appropriate permissions. The same applies to the Subversion repository ˆà
    19ˆàTrac is eventually using, although Trac will only require read access as long ˆà
    20ˆàas you're not using the BDB file system. Also, it seems that project namesˆà
    21ˆàwith spaces can be problematic for authentication (see [trac:#7163]).''ˆà
    ˆà15=== Some Useful Tipsˆà
    ˆà16 - The user under which the web server runs will require file system write permission to ˆà
    ˆà17 the environment directory and all the files inside. Please remember to setˆà
    ˆà18 the appropriate permissions. The same applies to the source code repository, ˆà
    ˆà19 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. ˆà
    ˆà20 ˆà
    ˆà21 - `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.ˆà
    2222ˆà
    23ˆà''Note: "initenv" when using 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 - Non-ascii environment paths are not supportedˆà
    ˆà24 ˆà
    ˆà25 - Also, it seems that project names with spaces can be problematic for authentication (see [trac:#7163]).ˆà
    ˆà26ˆà
    ˆà27 - 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.ˆà
    2428ˆà
    2529== Database Connection Strings ==ˆà
    òÀæ òÀæ ˆà
    3236[wiki:TracBackup backed up] together with the rest of the environment.ˆà
    3337ˆà
    34ˆà=== Embedded SQLite Connection String ===ˆà
    35ˆàThe connection string for an embedded SQLite database is:ˆà
    ˆà38=== SQLite Connection String ===ˆà
    ˆà39The connection string for an SQLite database is:ˆà
    3640{{{ˆà
    3741sqlite:db/trac.dbˆà
    3842}}}ˆà
    ˆà43where `db/trac.db` is the path to the database file within the Trac environment.ˆà
    3944ˆà
    4045=== PostgreSQL Connection String ===ˆà
    òÀæ òÀæ ˆà
    97102== Source Code Repository ==ˆà
    98103ˆà
    99ˆàYou'll first have to provide the ''type'' of your repository (e.g. `svn` for Subversion,ˆà
    100ˆàwhich is the default), then the ''path'' where the repository is located.ˆà
    ˆà104Since 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`).ˆà
    101105ˆà
    102ˆàIf you don't want to use Trac with a source code repository, simply leave the ''path'' emptyˆà
    103ˆà(the ''type'' information doesn't matter, then).ˆà
    ˆà106In 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.ˆà
    ˆà107You can also explicitly disable the `trac.versioncontrol.*` components (which are otherwise still loaded)ˆà
    ˆà108{{{ˆà
    ˆà109[components]ˆà
    ˆà110trac.versioncontrol.* = disabledˆà
    ˆà111}}}ˆà
    104112ˆà
    105ˆàFor some systems, it is possible to specify not only the path to the repository,ˆà
    ˆà113For some version control systems, it is possible to specify not only the path to the repository,ˆà
    106114but also a ''scope'' within the repository. Trac will then only show informationˆà
    107115related to the files and changesets below that scope. The Subversion backend forˆà
    108116Trac supports this; for other types, check the corresponding plugin's documentation.ˆà
    109117ˆà
    110ˆàExample of a configuration for a Subversion repository:ˆà
    ˆà118Example of a configuration for a Subversion repository used as the default repository:ˆà
    111119{{{ˆà
    112120[trac]ˆà
    òÀæ òÀæ ˆà
    133141 * `db`ˆà
    134142   * `trac.db` - The SQLite database (if you're using SQLite).ˆà
    135ˆà * `htdocs` - directory containing web resources, which can be referenced in Genshi templates. '''''(0.11 only)'''''ˆà
    ˆà143 * `htdocs` - directory containing web resources, which can be referenced in Genshi templates using `/htdocs/site/...` URLs. ''(since 0.11)''ˆà
    136144 * `log` - default directory for log files, if logging is turned on and a relative path is given.ˆà
    137ˆà * `plugins` - Environment-specific [wiki:TracPlugins plugins] (Python eggs, since [trac:milestone:0.10 0.10])ˆà
    138ˆà * `templates` - Custom Genshi environment-specific templates. '''''(0.11 only)'''''ˆà
    ˆà145 * `plugins` - Environment-specific [wiki:TracPlugins plugins] (Python eggs or single file plugins, since [trac:milestone:0.10 0.10])ˆà
    ˆà146 * `templates` - Custom Genshi environment-specific templates. ''(since 0.11)''ˆà
    139147   * `site.html` - method to customize header, footer, and style, described in TracInterfaceCustomization#SiteAppearanceˆà
    140ˆà * ''`templates` - Custom [trac:ClearSilver ClearSilver] environment-specific templates. '''(0.10 only)''' ''ˆà
    141ˆà   * ''`site_css.cs` - Custom CSS rules.''ˆà
    142ˆà   * ''`site_footer.cs` - Custom page footer.''ˆà
    143ˆà   * ''`site_header.cs` - Custom page header.''ˆà
    144ˆà * ''`wiki-macros` - Environment-specific [WikiMacros Wiki macros]. '''(0.10 only)''' ''ˆà
    145148ˆà
    146ˆà  '''Note: don't confuse a Trac environment directory with the source code repository directory.ˆà
    147ˆàIt happens that the above structure is loosely modelled after the Subversion repository directory ˆà
    148ˆàstructure, but they are not and ''must not'' be located at the same place.'''ˆà
    ˆà149=== Caveat: don't confuse a ''Trac environment directory'' with the ''source code repository directory'' #Caveatˆà
    ˆà150ˆà
    ˆà151This is a common beginners' mistake.ˆà
    ˆà152It happens that the structure for a Trac environment is loosely modelled after the Subversion repository directory ˆà
    ˆà153structure, but those are two disjoint entities and they are not and ''must not'' be located at the same place.ˆà
    149154ˆà
    150155----ˆà