Changes between Version 1 and Version 2 of TracInstall


Ignore:
Timestamp:
03/20/09 12:02:34 (16 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracInstall

    v1 v2  
    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==0.11
     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
    1220}}}
    1321
     
    2432 * You also need a database system and the corresponding python drivers for it.
    2533   The database can be either SQLite, PostgreSQL or ''MySQL (experimental)''.
    26  * optional if some plugins require it: [http://www.clearsilver.net/ ClearSilver]
    2734
    2835=== For SQLite ===
    2936
    30  * [http://www.sqlite.org/ SQLite], version 3.3.4 and above preferred.
    31  * 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 PySqlite
    32 
    33 ''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.''
     37 * [http://www.sqlite.org/ SQLite], version 3.3.4 and above preferred (note: it is preinstalled in Python 2.5.2).
     38 * 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]
     39
     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.''
    3441
    3542''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).''
     
    3845
    3946 * [http://www.postgresql.org/ PostgreSQL]
    40  * [http://initd.org/projects/psycopg2 psycopg2] or [http://pypgsql.sourceforge.net/ pyPgSQL]
     47 * [http://initd.org/projects/psycopg2 psycopg2]
     48 * See [trac:wiki:DatabaseBackend#Postgresql DatabaseBackend]
    4149
    4250'''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.
     
    4452=== For MySQL ===
    4553
    46 '''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 MySqlDb for more detailed information.
     54'''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.
    4755
    4856 * [http://mysql.com/ MySQL], version 4.1 or later
    49  * [http://sf.net/projects/mysql-python MySQLdb], version 1.2.1 or later
     57 * [http://sf.net/projects/mysql-python MySQLdb], version 1.2.2 or later
    5058
    5159=== Optional Requirements ===
     
    5563'''Please note:''' if using Subversion, Trac must be installed on the '''same machine'''. Remote repositories are currently not supported.
    5664
    57  * [http://subversion.tigris.org/ Subversion], version >= 1.0. (versions recommended: 1.2.4, 1.3.2 or 1.4.2) and the '''''corresponding''''' Python bindings. For troubleshooting, check TracSubversion
     65 * [http://subversion.tigris.org/ Subversion], version >= 1.0. (versions recommended: 1.2.4, 1.3.2 or 1.4.2) and the '''''corresponding''''' Python bindings. For troubleshooting, check [trac:TracSubversion TracSubversion]
    5866   * Trac uses the [http://svnbook.red-bean.com/svnbook-1.1/ch08s02.html#svn-ch-8-sect-2.3 SWIG] bindings included in the Subversion distribution, '''not''' [http://pysvn.tigris.org/ PySVN] (which is sometimes confused with the standard SWIG bindings).
    5967   * If Subversion was already installed without the SWIG bindings, on Unix you'll need to re-`configure` Subversion and `make swig-py`, `make install-swig-py`.
    6068   * There are [http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91 pre-compiled bindings] available for win32.
    61  * Support for other version control systems is provided via third-parties. See PluginList and VersioningSystemBackend.
     69 * Support for other version control systems is provided via third-parties. See [trac:PluginList PluginList] and [trac:VersioningSystemBackend VersioningSystemBackend].
    6270
    6371==== Web Server ====
    6472 * A CGI-capable web server (see TracCgi), or
    6573 * a [http://www.fastcgi.com/ FastCGI]-capable web server (see TracFastCgi), or
    66  * [http://httpd.apache.org/ Apache] with [http://code.google.com/p/modwsgi/ mod_wsgi] (see [wiki:TracModWSGI])
     74 * an [http://tomcat.apache.org/connectors-doc/ajp/ajpv13a.html AJP]-capable web server (see [trac:TracOnWindowsIisAjp TracOnWindowsIisAjp]), or
     75 * [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)
    6776    * 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.
    68  * [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)
    6978    * When installing mod_python the development versions of Python and Apache are required (actually the libraries and header files)
    7079
    71 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.
    7281
    7382==== Other Python Utilities ====
     83 * [http://babel.edgewall.org Babel], version >= 0.9.2 for localization support
    7484 * [http://docutils.sourceforge.net/ docutils], version >= 0.3.9 for WikiRestructuredText.
    7585 * [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.
     
    7787 * [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.
    7888
    79 '''Attention''': The various available versions of these dependencies are not necessarily interchangable, 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 MailingList or IrcChannel.
    80 
    81 Please refer to the documentation of these packages to find out how they are best installed. In addition, most of the [wiki: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!).
     89'''Attention''': The various available versions of these dependencies are not necessarily interchangable, 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 MailingList] or [trac:IrcChannel IrcChannel].
     90
     91Please 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!).
    8292
    8393== Installing Trac ==
     
    8595One way to install Trac is using `setuptools`.
    8696With setuptools you can install Trac from the subversion repository; for example,
    87 to install release version 0.11b2 do:
    88 {{{
    89 easy_install http://svn.edgewall.org/repos/trac/tags/trac-0.11b2
     97to install release version 0.12dev do:
     98{{{
     99easy_install http://svn.edgewall.org/repos/trac/trunk
    90100}}}
    91101
     
    94104$ python ./setup.py install
    95105}}}
    96 
    97 ''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]]
    98110
    99111This will byte-compile the python source code and install it as an .egg file or folder in the `site-packages` directory
     
    101113
    102114The 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.
     115
     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)
    103121
    104122=== Advanced Options ===
     
    167185 * TracModPython if you use the mod_python method.
    168186
    169 == Trac 0.11 & SVN on Mac OS X Leopard (10.5) ==
    170 
    171  * 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 
    172220
    173221== Using Trac ==
     
    179227'' Enjoy! ''
    180228
    181 [wiki:TracTeam The Trac Team]
     229[trac:TracTeam The Trac Team]
    182230
    183231----
    184 See also:  TracGuide, TracCgi, TracFastCgi, TracModPython, [wiki:TracModWSGI], TracUpgrade, TracPermissions
    185 
     232See also:  TracInstallPlatforms, TracGuide, TracCgi, TracFastCgi, TracModPython, [wiki:TracModWSGI], TracUpgrade, TracPermissions