Edgewall Software

Changes between Version 6 and Version 7 of 1.1/TracInstall


Ignore:
Timestamp:
Jan 10, 2015, 4:43:15 PM (9 years ago)
Author:
Jun Omae
Comment:

Merged TracInstall@385-386

Legend:

Unmodified
Added
Removed
Modified
  • 1.1/TracInstall

    v6 v7  
    55Trac is written in the Python programming language and needs a database, [http://sqlite.org/ SQLite], [http://www.postgresql.org/ PostgreSQL], or [http://mysql.com/ MySQL]. For HTML rendering, Trac uses the [http://genshi.edgewall.org Genshi] templating system.
    66
    7 Since version 0.12, Trac can also be localized, and there's probably a translation available for your language. If you want to be able to use the Trac interface in other languages, then make sure you have installed the optional package [#OtherPythonPackages Babel]. Pay attention to the extra steps for localization support in the [#InstallingTrac Installing Trac] section below. Lacking Babel, you will only get the default English version, as usual.
     7Since version 0.12, Trac can also be localized, and there is probably a translation available in your language. If you want to use the Trac interface in other languages, then make sure you have installed the optional package [#OtherPythonPackages Babel]. Pay attention to the extra steps for localization support in the [#InstallingTrac Installing Trac] section below. Lacking Babel, you will only get the default English version.
    88
    99If you're interested in contributing new translations for other languages or enhance the existing translations, then please have a look at [trac:wiki:TracL10N TracL10N].
    1010
    11 What follows are generic instructions for installing and setting up Trac and its requirements. While you may find instructions for installing Trac on specific systems at [trac:TracInstallPlatforms TracInstallPlatforms] on the main Trac site, please be sure to '''first read through these general instructions''' to get a good understanding of the tasks involved.
     11What follows are generic instructions for installing and setting up Trac. While you may find instructions for installing Trac on specific systems at [trac:TracInstallPlatforms TracInstallPlatforms] on the main Trac site, please '''first read through these general instructions''' to get a good understanding of the tasks involved.
    1212
    1313[[PageOutline(2-3,Installation Steps,inline)]]
     
    2222 * [http://genshi.edgewall.org/wiki/Download Genshi], version >= 0.6
    2323
    24 You also need a database system and the corresponding python bindings.
    25 The database can be either SQLite, PostgreSQL or MySQL.
     24You also need a database system and the corresponding python bindings. The database can be either SQLite, PostgreSQL or MySQL.
    2625
    2726==== For the SQLite database #ForSQLite
     
    2928As you must be using Python 2.6 or 2.7, you already have the SQLite database bindings bundled with the standard distribution of Python (the `sqlite3` module).
    3029
    31 However, if you'd like, you can download the latest and greatest version of [[trac:PySqlite]] from
     30However, if you like, you can download the latest and greatest version of [[trac:PySqlite]] from
    3231[http://code.google.com/p/pysqlite/downloads/list google code], where you'll find the Windows
    3332installers or the `tar.gz` archive for building from source:
     
    3837}}}
    3938 
    40 This will download the latest SQLite code and build the bindings.
    41 
    42 SQLite 2.x is no longer supported.
    43 
    44 A known bug in [trac:PySqlite] versions 2.5.2-4 prohibits upgrades of Trac databases
    45 from 0.11.x to 0.12. Please use versions 2.5.5 and newer or 2.5.1 and
    46 older. See #9434 for more detail.
    47 
    48 See additional information in [trac:PySqlite PySqlite].
     39This will download the latest SQLite code and build the bindings. SQLite 2.x is no longer supported.
     40
     41A known bug in [trac:PySqlite] versions 2.5.2-4 prohibits upgrades of Trac databases from 0.11.x to 0.12. Please use versions 2.5.5 and newer or 2.5.1 and older. See #9434 for more detail. See additional information in [trac:PySqlite PySqlite].
    4942
    5043==== For the PostgreSQL database #ForPostgreSQL
     
    5649See [trac:DatabaseBackend#Postgresql DatabaseBackend] for details.
    5750
    58 
    5951==== For the MySQL database #ForMySQL
    6052
    61 Trac can now work quite well with MySQL, provided you follow the guidelines.
     53Trac works well with MySQL, provided you follow the guidelines:
    6254
    6355 * [http://mysql.com/ MySQL], version 5.0 or later
    6456 * [http://sf.net/projects/mysql-python MySQLdb], version 1.2.2 or later
    6557
    66 It is '''very''' important to read carefully the [trac:MySqlDb] page before creating the database.
     58Given the caveats and known issues surrounding MySQL, read carefully the [trac:MySqlDb] page before creating the database.
    6759
    6860=== Optional Dependencies
     
    7769Note that Trac '''doesn't''' use [http://pysvn.tigris.org/ PySVN], neither does it work yet with the newer `ctype`-style bindings.
    7870
    79 
    8071'''Please note:''' if using Subversion, Trac must be installed on the '''same machine'''. Remote repositories are currently [trac:ticket:493 not supported].
    81 
    8272
    8373===== Others
     
    8878A web server is optional because Trac is shipped with a server included, see the [#RunningtheStandaloneServer Running the Standalone Server] section below.
    8979
    90 Alternatively you can configure Trac to run in any of the following environments.
     80Alternatively you can configure Trac to run in any of the following environments:
    9181 * [http://httpd.apache.org/ Apache] with
    9282   - [http://code.google.com/p/modwsgi/ mod_wsgi], see [wiki:TracModWSGI] and
     
    112102   an internal time zone implementation.
    113103
    114 '''Attention''': The various available versions of these dependencies are not necessarily interchangeable, so please pay attention to the version numbers above. If you are having trouble getting Trac to work please double-check all the dependencies before asking for help on the [trac:MailingList] or [trac:IrcChannel].
    115 
    116 Please refer to the documentation of these packages to find out how they are best installed. In addition, most of the [trac:TracInstallPlatforms platform-specific instructions] also describe the installation of the dependencies. Keep in mind however that the information there ''probably concern older versions of Trac than the one you're installing'' (there are even some pages that are still talking about Trac 0.8!).
    117 
     104'''Attention''': The available versions of these dependencies are not necessarily interchangeable, so please pay attention to the version numbers. If you are having trouble getting Trac to work, please double-check all the dependencies before asking for help on the [trac:MailingList] or [trac:IrcChannel].
     105
     106Please refer to the documentation of these packages to find out how they are best installed. In addition, most of the [trac:TracInstallPlatforms platform-specific instructions] also describe the installation of the dependencies. Keep in mind however that the information there ''probably concern older versions of Trac than the one you're installing''. There are even some pages that are still talking about Trac 0.8!
    118107
    119108== Installing Trac
    120109=== Using `easy_install`
    121 One way to install Trac is using [http://pypi.python.org/pypi/setuptools setuptools].
    122 With setuptools you can install Trac from the Subversion repository;
     110One way to install Trac is using [http://pypi.python.org/pypi/setuptools setuptools]. With setuptools you can install Trac from the Subversion repository.
    123111
    124112A few examples:
     
    163151Additionally, you can install several Trac plugins (listed [https://pypi.python.org/pypi?:action=browse&show=all&c=516 here]) through pip.
    164152
    165 
    166 
    167153=== From source
    168 Of course, using the python-typical setup at the top of the source directory also works.
    169 
    170 You can obtain the source for a .tar.gz or .zip file corresponding to a release (e.g. `Trac-1.0.tar.gz`), or you can get the source directly from the repository (see [trac:SubversionRepository] for details).
     154Of course, using the python-typical setup at the top of the source directory also works. You can obtain the source for a .tar.gz or .zip file corresponding to a release (e.g. `Trac-1.0.tar.gz`), or you can get the source directly from the repository. See [trac:SubversionRepository] for details.
    171155
    172156{{{#!sh
     
    174158}}}
    175159
    176 ''You'll need root permissions or equivalent for this step.''
     160''You will need root permissions or equivalent for this step.''
    177161
    178162This will byte-compile the Python source code and install it as an .egg file or folder in the `site-packages` directory
     
    208192The above will place your `tracd` and `trac-admin` commands into `/usr/local/bin` and will install the Trac libraries and dependencies into `/Library/Python/2.6/site-packages`, which is Apple's preferred location for third-party Python application installations.
    209193
    210 
    211194== Creating a Project Environment
    212195
    213 A [TracEnvironment Trac environment] is the backend storage where Trac stores information like wiki pages, tickets, reports, settings, etc. An environment is basically a directory that contains a human-readable [TracIni configuration file], and various other files and directories.
     196A [TracEnvironment Trac environment] is the backend where Trac stores information like wiki pages, tickets, reports, settings, etc. An environment is basically a directory that contains a human-readable [TracIni configuration file], and other files and directories.
    214197
    215198A new environment is created using [wiki:TracAdmin trac-admin]:
     
    227210Also note that the values you specify here can be changed later by directly editing the [TracIni conf/trac.ini] configuration file.
    228211
    229 When selecting the location of your environment, make sure that the filesystem on which the environment directory resides supports sub-second timestamps (i.e. **not** `ext2` or `ext3` on Linux), as the modification time of the `conf/trac.ini` file will be monitored to decide whether an environment restart is needed or not. A too coarse-grained timestamp resolution may result in inconsistencies in Trac < 1.0.2 (though the best advice is to opt for a platform with sub-second timestamp resolution when possible regardless of the version of Trac you are running).
     212When selecting the location of your environment, make sure that the filesystem on which the environment directory resides supports sub-second timestamps (i.e. **not** `ext2` or `ext3` on Linux), as the modification time of the `conf/trac.ini` file will be monitored to decide whether an environment restart is needed or not. A too coarse-grained timestamp resolution may result in inconsistencies in Trac < 1.0.2. The best advice is to opt for a platform with sub-second timestamp resolution, regardless of the Trac version.
    230213
    231214Finally, make sure the user account under which the web front-end runs will have '''write permissions''' to the environment directory and all the files inside. This will be the case if you run `trac-admin ... initenv` as this user. If not, you should set the correct user afterwards. For example on Linux, with the web server running as user `apache` and group `apache`, enter:
     
    239222'''Warning:''' Please only use ASCII-characters for account name and project path, unicode characters are not supported there.
    240223}}}
    241 
    242224
    243225== Deploying Trac
     
    292274Don't forget to check that the web server has the execution right on scripts in the `/usr/share/trac/cgi-bin` directory.
    293275
    294 
    295276==== Mapping Static Resources
    296277
     
    358339}}}
    359340
    360 
    361341==== Setting up the Plugin Cache
    362342