Changes between Version 4 and Version 5 of TracInstall


Ignore:
Timestamp:
Jun 4, 2009, 10:42:38 AM (13 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracInstall

    v4 v5  
    1 = Trac Installation Guide for 0.11 =
     1= Trac Installation Guide for 0.12dev =
     2{{{
     3#!div style="margin-top: .5em; padding: 0 1em; background-color: #ffd; border:1px outset #ddc;"
     4
     5  '''NOTE: this page is for 0.12dev (trunk), for which development has started. For installing previous Trac versions, please refer to TracInstall (0.11)'''
     6}}}
    27[[TracGuideToc]]
    38
    49Trac 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.
    510
     11Since 0.12, Trac can also be localized, and there's probably a translation available for your language. If this is what you want, then make sure you have installed the optional package [#OtherPythonUtilities Babel]. Trac can still be installed without Babel, but then you will only get the english version, as usual.
     12If you're interested in contributing new translations for other languages or enhance the existing translations, then please have a look at ["TracL10N"].
     13
    614What follows are generic instructions for installing and setting up Trac and its requirements. While you can find instructions for installing Trac on specific systems at 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.
    715
    816== Short - Install a released version ==
    9 For the quick install, make sure you have [http://python.org Python-2.5], [http://peak.telecommunity.com/DevCenter/EasyInstall#installing-easy-install easy_install] and SQlite-3.3.4 installed (or above).
    10 {{{
    11 sudo easy_install Trac
    12 }}}
    13 
    14 == Requirements ==
    15 The hardware requirements for running Trac obviously depend on the expected data volume (number of wiki pages, tickets, revisions) and traffic. Very small projects will run fine with a 500MHz processor and 128MB RAM using SQLite. In general, the more RAM, the better. A fast hard disk also helps.
     17For the quick install, make sure you have [http://python.org Python-2.5], [http://peak.telecommunity.com/DevCenter/EasyInstall#installing-easy-install easy_install] and SQlite-3.3.4 installed (or above). (You also might want to install python-dev to build genshi)
     18{{{
     19sudo easy_install http://svn.edgewall.org/repos/trac/trunk
     20}}}
     21
     22== Requirements - also older versions possible ==
    1623
    1724To install Trac, the following software packages must be installed:
     
    2229   * See instructions in ["TracOnWindows/Python2.5"]
    2330 * [http://peak.telecommunity.com/DevCenter/setuptools setuptools], version >= 0.6
    24  * [http://genshi.edgewall.org/wiki/Download Genshi], version >= 0.5 (was version >= 0.4.1 on previous 0.11 release candidates)
     31 * [http://genshi.edgewall.org/wiki/Download Genshi], version >= 0.4.1
    2532 * You also need a database system and the corresponding python drivers for it.
    2633   The database can be either SQLite, PostgreSQL or ''MySQL (experimental)''.
    27  * Optional if some plugins require it: [http://www.clearsilver.net/ ClearSilver]
    28 
    29 ==== For SQLite ====
     34
     35=== For SQLite ===
    3036
    3137 * [http://www.sqlite.org/ SQLite], version 3.3.4 and above preferred (note: it is preinstalled in Python 2.5.2).
    3238 * If not using Python-2.5: [http://pysqlite.org/ PySQLite], version 1.x (for SQLite 2.x) or version 2.x (for SQLite 3.x), version 2.3.2 preferred. For details see [trac:PySqlite PySqlite]
    3339
    34 ''Note: It appears that PySQLite 2.x is required for Trac 0.9+/SQLite 3.x if you plan to use the 'trac-post-commit-hook.py' script available from the 'contrib' section of the source repository.''
     40''Note: It appears that PySQLite 2.x is required if you plan to use the 'trac-post-commit-hook.py' script available from the 'contrib' section of the source repository.''
    3541
    3642''Note: Users of Mac OS X please take care; the Apple-supplied SQLite contains additional code to support file locking on network filesystems like AFP or SMB. This is not presently (3.3.6) in the mainline sources, so if you build your own SQLite from source it will not function correctly on such filesystems - typically it gives the error "{{{database is locked}}}". [http://www.alastairs-place.net/2006/07/sqlite_and_mac/ A patch] is available for version 3.3.6, based on Apple's code, otherwise you're probably best off using the Apple supplied version (presently 3.1.3).''
    3743
    38 ==== For PostgreSQL ====
     44=== For PostgreSQL ===
    3945
    4046 * [http://www.postgresql.org/ PostgreSQL]
     
    4450'''Warning''': PostgreSQL 8.3 uses a strict type checking mechanism. To use Trac with the 8.3 Version of PostgreSQL, you will need [http://trac.edgewall.org/changeset/6512 trac-0.11] or later.
    4551
    46 ==== For MySQL ====
     52=== For MySQL ===
    4753
    4854'''Warning''': MySQL support is currently ''still'' experimental. That means it works for some people, but several issues remain, in particular regarding the use of unicode and the key length in the repository cache. See [trac:MySqlDb MySqlDb] for more detailed information.
    4955
    5056 * [http://mysql.com/ MySQL], version 4.1 or later
    51  * [http://sf.net/projects/mysql-python MySQLdb], version 1.2.1 or later
    52 
    53 == Optional Requirements ==
     57 * [http://sf.net/projects/mysql-python MySQLdb], version 1.2.2 or later
     58
     59=== Optional Requirements ===
    5460
    5561==== Version Control System ====
     
    6975 * [http://httpd.apache.org/ Apache] with [http://code.google.com/p/modwsgi/ mod_wsgi] (see [wiki:TracModWSGI] or http://code.google.com/p/modwsgi/wiki/IntegrationWithTrac)
    7076    * This should work with Apache 1.3, 2.0 or 2.2 and promises to deliver more performance than using mod_python. A little less mature than mod_python.
    71  * [http://httpd.apache.org/ Apache] with [http://www.modpython.org/ mod_python 3.1.3+] (see TracModPython)
     77 * [http://httpd.apache.org/ Apache] with [http://modpython.org/ mod_python 3.1.3+] (see TracModPython)
    7278    * When installing mod_python the development versions of Python and Apache are required (actually the libraries and header files)
    7379
    74 For those stuck with Apache 1.3, it is also possible to get Trac working with [http://www.modpython.org/ mod_python 2.7] (see [wiki:TracModPython2.7 TracModPython2.7]). This guide hasn't been updated since 0.84, so it may or may not work.
     80For those stuck with Apache 1.3, it is also possible to get Trac working with [http://modpython.org/ mod_python 2.7] (see [wiki:TracModPython2.7 TracModPython2.7]). This guide hasn't been updated since 0.84, so it may or may not work.
    7581
    7682==== Other Python Utilities ====
     83 * [http://babel.edgewall.org Babel], version >= 0.9.2 for localization support
    7784 * [http://docutils.sourceforge.net/ docutils], version >= 0.3.9 for WikiRestructuredText.
    78  * [http://pygments.pocoo.org Pygments] for '''syntax highlighting''', although [http://silvercity.sourceforge.net/ SilverCity] >= 0.9.7 and/or [http://gnu.org/software/enscript/enscript.html GNU Enscript] are also possible. Refer to TracSyntaxColoring for details.
     85 * [http://pygments.pocoo.org Pygments] for [wiki:TracSyntaxColoring syntax highlighting], also [http://silvercity.sourceforge.net/ SilverCity] and/or [http://gnu.org/software/enscript/enscript.html Enscript] may still be used.
     86    * Note that !SilverCity 0.9.6 has a [http://sourceforge.net/tracker/index.php?func=detail&aid=1424436&group_id=45693&atid=443739 bug] that breaks Python syntax highlighting in Trac. Until an update is made available, we recommend using version 0.9.5.
    7987 * [http://pytz.sf.net pytz] to get a complete list of time zones, otherwise Trac will fall back on a shorter list from an internal time zone implementation.
    8088
     
    8795One way to install Trac is using `setuptools`.
    8896With setuptools you can install Trac from the subversion repository; for example,
    89 to install release version 0.11 do:
    90 {{{
    91 easy_install http://svn.edgewall.org/repos/trac/tags/trac-0.11
     97to install release version 0.12dev do:
     98{{{
     99easy_install http://svn.edgewall.org/repos/trac/trunk
    92100}}}
    93101
     
    96104$ python ./setup.py install
    97105}}}
    98 
    99 ''Note: you'll need root permissions or equivalent for this step.''
     106See SubversionRepository for details about getting the source.
     107
     108''Note 1: you'll need root permissions or equivalent for this step.'' [[br]]
     109''Note 2: installing from source is the preferred method if you want to have a localized version of Trac'' [[br]]
    100110
    101111This will byte-compile the python source code and install it as an .egg file or folder in the `site-packages` directory
     
    104114The script will also install the [wiki:TracAdmin trac-admin] command-line tool, used to create and maintain [wiki:TracEnvironment project environments], as well as the [wiki:TracStandalone tracd] standalone server.
    105115
    106 ==== Advanced Options ====
     116If you want to make Trac available in other languages, make sure you have installed Babel and then run this additional step before doing the `install` (or simply redo the `install` afterwards):
     117{{{
     118$ python ./setup.py compile_catalog -f
     119}}}
     120(the `-f` flag is needed as long as some translations are marked ''fuzzy'', i.e. incomplete, which will most probably be the case during the whole development period, as  strings are continuously added or modified)
     121
     122=== Advanced Options ===
    107123
    108124To install Trac to a custom location, or find out about other advanced installation options, run:
     
    141157  chown -R apache.apache /path/to/myproject
    142158
    143 '''Warning: If the trac.cgi files are not installed where you expect, then the current documentation is insufficient; it might be necessary to use the 'deploy' command in trac-admin.  See tickets http://trac.edgewall.org/ticket/7312 and possibly http://trac.edgewall.org/ticket/6827'''
    144159
    145160== Running the Standalone Server ==
     
    160175Trac provides three options for connecting to a "real" web server: [wiki:TracCgi CGI], [wiki:TracFastCgi FastCGI] and [wiki:TracModPython mod_python]. For decent performance, it is recommended that you use either FastCGI or mod_python.
    161176
    162 If you're not afraid of running newer code, you can also try running Trac on [wiki:TracModWSGI mod_wsgi]. This should deliver even better performance than mod_python, but the module isn't as extensively tested as mod_python.
    163 
    164 Trac also supports [trac:TracOnWindowsIisAjp AJP] which may be your choice if you want to connect to IIS.
    165 
    166 ==== Setting up the Plugin Cache ====
    167 
    168 Some Python plugins need to be extracted to a cache directory. By default the cache resides in the home directory of the current user. When running Trac on a Web Server as a dedicated user (which is highly recommended) who has no home directory, this might prevent the plugins from starting. To override the cache location you can set the PYTHON_EGG_CACHE environment variable. Refer to your server documentation for detailed instructions.
     177If you're not afraid of running development code, you can also try running Trac on [wiki:TracModWSGI mod_wsgi]. This should deliver even better performance than mod_python, but the module is not considered stable just yet.
    169178
    170179== Configuring Authentication ==
     
    176185 * TracModPython if you use the mod_python method.
    177186
    178 == Trac 0.11 & SVN on Mac OS X Leopard (10.5) ==
    179 
    180  * [trac:TracOnLeopardServer TracOnLeopardServer]
     187== Automatic reference to the SVN changesets in Trac tickets ==
     188
     189You can configure SVN to automatically add a reference to the changeset into the ticket comments, whenever files are committed to the repository. The description of the commit needs to contain one of the following formulas:
     190 * '''Refs #123''' - to reference this changeset in #123 ticket
     191 * '''Fixes #123''' - to reference this changeset and close #123 ticket with the default status ''fixed''
     192
     193All you have to do is to edit the ''post-commit'' hook in your SVN repository and make it execute ''trac-post-commit-hook'' coming with Trac.
     194
     195If you are editing the ''post-commit'' hook for the first time you need to navigate to your SVN repository's hooks subfolder and rename existing there ''post-commit'' template:
     196
     197{{{
     198$ cd /path/to/svn/repository/hooks
     199$ mv post-commit.tmpl post-commit
     200$ chmod 755 post-commit
     201}}}
     202
     203Next open it in any text editor and add a line with path to the Trac environment connected with this SVN repository and another line executing the ''trac-post-commit-hook'' script:
     204
     205{{{
     206REPOS="$1"
     207REV="$2"
     208TRAC_ENV="/path/to/your/trac/project"
     209
     210/usr/bin/python /usr/local/bin/trac-post-commit-hook -p "$TRAC_ENV" -r "$REV"
     211}}}
     212
     213Make sure that ''trac-post-commit-hook'' exists in above path with execution permissions for the same user which SVN is running from. This script can be found in contrib subfolder of your Trac distribution and the latest version can be always downloaded from [source:trunk/contrib/trac-post-commit-hook].
     214
     215
     216== Platform-specifics installations ==
     217
     218 * See [trac:TracInstallPlatforms TracInstallPlatforms]
     219 
    181220
    182221== Using Trac ==
     
    191230
    192231----
    193 See also:  TracGuide, TracCgi, TracFastCgi, TracModPython, [wiki:TracModWSGI], TracUpgrade, TracPermissions
    194 
     232See also:  TracInstallPlatforms, TracGuide, TracCgi, TracFastCgi, TracModPython, [wiki:TracModWSGI], TracUpgrade, TracPermissions