Changes between Version 1 and Version 2 of TracInstall
- Timestamp:
- 03/20/09 12:02:34 (16 years ago)
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 }}} 2 7 [[TracGuideToc]] 3 8 4 9 Trac 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. 5 10 11 Since 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. 12 If you're interested in contributing new translations for other languages or enhance the existing translations, then please have a look at ["TracL10N"]. 13 6 14 What 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. 7 15 8 16 == 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.1117 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). (You also might want to install python-dev to build genshi) 18 {{{ 19 sudo easy_install http://svn.edgewall.org/repos/trac/trunk 12 20 }}} 13 21 … … 24 32 * You also need a database system and the corresponding python drivers for it. 25 33 The database can be either SQLite, PostgreSQL or ''MySQL (experimental)''. 26 * optional if some plugins require it: [http://www.clearsilver.net/ ClearSilver]27 34 28 35 === For SQLite === 29 36 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 PySqlite32 33 ''Note: It appears that PySQLite 2.x is required for Trac 0.9+/SQLite 3.xif 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.'' 34 41 35 42 ''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).'' … … 38 45 39 46 * [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] 41 49 42 50 '''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. … … 44 52 === For MySQL === 45 53 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 MySqlDbfor 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. 47 55 48 56 * [http://mysql.com/ MySQL], version 4.1 or later 49 * [http://sf.net/projects/mysql-python MySQLdb], version 1.2. 1or later57 * [http://sf.net/projects/mysql-python MySQLdb], version 1.2.2 or later 50 58 51 59 === Optional Requirements === … … 55 63 '''Please note:''' if using Subversion, Trac must be installed on the '''same machine'''. Remote repositories are currently not supported. 56 64 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 TracSubversion65 * [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] 58 66 * 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). 59 67 * 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`. 60 68 * 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]. 62 70 63 71 ==== Web Server ==== 64 72 * A CGI-capable web server (see TracCgi), or 65 73 * 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) 67 76 * 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) 69 78 * When installing mod_python the development versions of Python and Apache are required (actually the libraries and header files) 70 79 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.80 For 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. 72 81 73 82 ==== Other Python Utilities ==== 83 * [http://babel.edgewall.org Babel], version >= 0.9.2 for localization support 74 84 * [http://docutils.sourceforge.net/ docutils], version >= 0.3.9 for WikiRestructuredText. 75 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. … … 77 87 * [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. 78 88 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 91 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!). 82 92 83 93 == Installing Trac == … … 85 95 One way to install Trac is using `setuptools`. 86 96 With setuptools you can install Trac from the subversion repository; for example, 87 to install release version 0.1 1b2do:88 {{{ 89 easy_install http://svn.edgewall.org/repos/trac/t ags/trac-0.11b297 to install release version 0.12dev do: 98 {{{ 99 easy_install http://svn.edgewall.org/repos/trac/trunk 90 100 }}} 91 101 … … 94 104 $ python ./setup.py install 95 105 }}} 96 97 ''Note: you'll need root permissions or equivalent for this step.'' 106 See 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]] 98 110 99 111 This will byte-compile the python source code and install it as an .egg file or folder in the `site-packages` directory … … 101 113 102 114 The 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 116 If 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) 103 121 104 122 === Advanced Options === … … 167 185 * TracModPython if you use the mod_python method. 168 186 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 189 You 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 193 All 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 195 If 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 203 Next 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 {{{ 206 REPOS="$1" 207 REV="$2" 208 TRAC_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 213 Make 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 172 220 173 221 == Using Trac == … … 179 227 '' Enjoy! '' 180 228 181 [ wiki:TracTeam The Trac Team]229 [trac:TracTeam The Trac Team] 182 230 183 231 ---- 184 See also: TracGuide, TracCgi, TracFastCgi, TracModPython, [wiki:TracModWSGI], TracUpgrade, TracPermissions 185 232 See also: TracInstallPlatforms, TracGuide, TracCgi, TracFastCgi, TracModPython, [wiki:TracModWSGI], TracUpgrade, TracPermissions