Edgewall Software

Changes between Version 351 and Version 352 of TracInstall


Ignore:
Timestamp:
Jul 16, 2012, 10:21:04 PM (12 years ago)
Author:
trac
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • TracInstall

    v351 v352  
    22#!div style="margin-top: .5em; padding: 0 1em; background-color: #ffd; border:1px outset #ddc; text-align: center"
    33
    4   '''NOTE: this page is for 0.12, the current version. \\
    5   For installing previous Trac versions, please refer to [[0.11/TracInstall]]; the installations notes for the next version of Trac are available in [[0.13/TracInstall]]'''
    6 }}}
    7 = Trac Installation Guide for 0.12 =
     4  '''NOTE: this page is for 0.13, the "next" version. \\
     5  For installing previous Trac versions, please refer to [[wiki:/TracInstall]] (for Trac 0.12) or even [[0.11/TracInstall]]'''
     6}}}
     7= Trac Installation Guide for 0.13 =
    88[[TracGuideToc]]
    99[[TranslatedPages]]
     
    1111Trac 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.
    1212
    13 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 **first** have installed the optional package [#OtherPythonPackages Babel]. Lacking Babel, you will only get the default English version, as usual. If you install Babel later on, you will need to re-install Trac.
    14 
    15 If 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].
    16 
    17 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:wiki: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.
     13Since 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.
     14
     15If you're interested in contributing new translations for other languages or enhance the existing translations, then please have a look at [[trac:TracL10N]].
     16
     17What 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.
    1818
    1919[[PageOutline(2-3,Installation Steps,inline)]]
     
    2323To install Trac, the following software packages must be installed:
    2424
    25  * [http://www.python.org/ Python], version >= 2.4 and < 3.0
    26    //(note that we dropped the support for Python 2.3 in this release and that this will be the last Trac release supporting Python 2.4)//
     25 * [http://www.python.org/ Python], version >= 2.5 and < 3.0
     26   (note that we dropped the support for Python 2.4 in this release)
    2727 * [http://peak.telecommunity.com/DevCenter/setuptools setuptools], version >= 0.6
    28  * [http://genshi.edgewall.org/wiki/Download Genshi], version >= 0.6 (but < 0.7dev, i.e. don't use Genshi trunk)
     28 * [http://genshi.edgewall.org/wiki/Download Genshi], version >= 0.6
    2929
    3030You also need a database system and the corresponding python bindings.
     
    3333==== For the SQLite database #ForSQLite
    3434
    35 If you're using Python 2.5 or 2.6, you already have everything you need.
    36 
    37 If you're using Python 2.4 and need pysqlite, you can download from
    38 [http://code.google.com/p/pysqlite/downloads/list google code] the Windows installers or the tar.gz archive for building from source:
     35As you must be using Python 2.5, 2.6 or 2.7, you already have the SQLite database bindings bundled with the standard distribution of Python (the `sqlite3` module).
     36
     37However, if you'd like, you can download the latest and greatest version of [[trac:Pysqlite]] from
     38[http://code.google.com/p/pysqlite/downloads/list google code], where you'll find the Windows
     39installers or the `tar.gz` archive for building from source:
    3940{{{
    4041$ tar xvfz <version>.tar.gz
     
    4344}}}
    4445 
    45 This will extract the SQLite code and build the bindings.
    46 
    47 To install SQLite, your system may require the development headers. Without these you will get various GCC related errors when attempting to build:
    48 
    49 {{{
    50 $ apt-get install libsqlite3-dev
    51 }}}
    52 
    53 SQLite 2.x is no longer supported, and neither is !PySqlite 1.1.x.
    54 
    55 A known bug !PySqlite versions 2.5.2-4 prohibits upgrade of trac databases
     46This will download the latest SQLite code and build the bindings.
     47
     48SQLite 2.x is no longer supported.
     49
     50A known bug PySqlite versions 2.5.2-4 prohibits upgrade of trac databases
    5651from 0.11.x to 0.12. Please use versions 2.5.5 and newer or 2.5.1 and
    57 older. See [trac:#9434] for more detail.
    58 
    59 See additional information in [trac:PySqlite].
     52older. See #9434 for more detail.
     53
     54See additional information in [trac:PySqlite PySqlite].
    6055
    6156==== For the PostgreSQL database #ForPostgreSQL
     
    8277
    8378===== Subversion =====
    84 
    85 [http://subversion.apache.org/ Subversion] 1.5.x or 1.6.x and the '''''corresponding''''' Python bindings.
    86 
    87 There are [http://subversion.apache.org/packages.html pre-compiled SWIG bindings] available for various platforms. See also the TracSubversion page for details about Windows packages.
    88 
    89 Older versions starting from 1.4.0, etc. should still work. For troubleshooting information, check the [trac:TracSubversion#Troubleshooting TracSubversion] page. Versions prior to 1.4.0 won't probably work since trac uses svn core functionality (e.g. svn_path_canonicalize) that is not implemented in the python swig wrapper in svn <= 1.3.x (although it exists in the svn lib itself).
     79 * [http://subversion.apache.org/ Subversion], 1.5.x or 1.6.x and the '''''corresponding''''' Python bindings. Older versions starting from 1.0, like 1.2.4, 1.3.2 or 1.4.2, etc. should still work. For troubleshooting information, check the [trac:TracSubversion#Troubleshooting TracSubversion] page.
     80
     81There are [http://subversion.apache.org/packages.html pre-compiled SWIG bindings] available for various platforms. (Good luck finding precompiled SWIG bindings for any Windows package at that listing. TracSubversion points you to [http://alagazam.net Algazam], which works for me under Python 2.6.)
    9082
    9183Note that Trac '''doesn't''' use [http://pysvn.tigris.org/ PySVN], neither does it work yet with the newer `ctype`-style bindings.
    9284
    93 '''Please note:''' if using Subversion, Trac must be installed on the '''same machine'''. Remote repositories are currently [trac:#493 not supported].
     85
     86'''Please note:''' if using Subversion, Trac must be installed on the '''same machine'''. Remote repositories are currently [trac:ticket:493 not supported].
    9487
    9588
     
    10396Alternatively you configure Trac to run in any of the following environments.
    10497 * [http://httpd.apache.org/ Apache] with
    105    - [http://code.google.com/p/modwsgi/ mod_wsgi], see [wiki:TracModWSGI] (preferred)
    106    - //[http://modpython.org/ mod_python 3.3.1], see TracModPython (deprecated)//
    107  * any [http://www.fastcgi.com/ FastCGI]-capable web server, see TracFastCgi
    108  * any [http://tomcat.apache.org/connectors-doc/ajp/ajpv13a.html AJP]-capable web
    109    server, see [trac:TracOnWindowsIisAjp]
    110  * IIS with [http://code.google.com/p/isapi-wsgi/ Isapi-wsgi], see [trac:TracOnWindowsIisIsapi]
    111  * //as a last resort, a CGI-capable web server (see TracCgi), but usage of Trac as a cgi script
    112    is highly discouraged, better use one of the previous options.//
     98   - [http://code.google.com/p/modwsgi/ mod_wsgi], see [wiki:TracModWSGI] and
     99     http://code.google.com/p/modwsgi/wiki/IntegrationWithTrac
     100   - [http://modpython.org/ mod_python 3.3.1], deprecated: see TracModPython)
     101 * a [http://www.fastcgi.com/ FastCGI]-capable web server (see TracFastCgi)
     102 * an [http://tomcat.apache.org/connectors-doc/ajp/ajpv13a.html AJP]-capable web
     103   server (see [trac:TracOnWindowsIisAjp TracOnWindowsIisAjp])
     104 * a CGI-capable web server (see TracCgi), '''but usage of Trac as a cgi script
     105   is highly discouraged''', better use one of the previous options.
    113106   
    114107
    115108==== Other Python Packages ====
    116109
    117  * [http://babel.edgewall.org Babel], version 0.9.5,
    118    needed for localization support[[BR]]
    119    ''Note: '' If you want to be able to use the Trac interface in other languages, then make sure you first have installed the optional package Babel. Lacking Babel, you will only get the default english version, as usual. If you install Babel later on, you will need to re-install Trac.
     110 * [http://babel.edgewall.org Babel], version >= 0.9.5,
     111   needed for localization support
    120112 * [http://docutils.sourceforge.net/ docutils], version >= 0.3.9
    121113   for WikiRestructuredText.
     
    141133A few examples:
    142134
    143  - first install of the latest stable version Trac 0.12.3, with i18n support:
     135 - install Trac 0.13:
    144136   {{{
    145    easy_install Babel==0.9.5
    146    easy_install Trac
     137   easy_install Trac==0.13
    147138   }}}
    148    ''It's very important to run the two `easy_install` commands separately, otherwise the message catalogs won't be generated.''
    149 
    150  - upgrade to the latest stable version of Trac:
     139   (NOT YET ENABLED)
     140 - install latest development version 0.13dev:
    151141   {{{
    152    easy_install -U Trac
     142   easy_install Trac==dev
    153143   }}}
    154 
    155  - upgrade to the latest trunk development version (0.13dev):
    156    {{{
    157    easy_install -U Trac==dev
    158    }}}
    159 
    160 For upgrades, reading the TracUpgrade page is mandatory, of course.
     144   Note that in this case you won't have the possibility to run a localized version of Trac;
     145   either use a released version or install from source
     146
     147=== Using `pip`
     148'pip' is an easy_install replacement that is very useful to quickly install python packages.
     149To get a trac installation up and running in less than 5 minutes:
     150
     151Assuming you want to have your entire pip installation in /opt/user/trac
     152
     153 -
     154{{{
     155pip -E /opt/user/trac install trac psycopg2
     156}}}
     157or
     158 -
     159{{{
     160pip -E /opt/user/trac install trac mysql-python
     161}}}
     162
     163Make sure your OS specific headers are available for pip to automatically build PostgreSQL (libpq-dev) or MySQL (libmysqlclient-dev) bindings.
     164
     165pip will automatically resolve all dependencies (like Genshi, pygments, etc.) and download the latest packages on pypi.python.org and create a self contained installation in /opt/user/trac
     166
     167All commands (tracd, trac-admin) are available in /opt/user/trac/bin . This can also be leveraged for mod_python (using PythonHandler directive) and mod_wsgi (using WSGIDaemonProcess directive)
     168
     169Additionally, you can install several trac plugins (listed [http://pypi.python.org/pypi?:action=search&term=trac&submit=search here]) through pip.
     170
     171
    161172
    162173=== From source
    163 If you want more control, you can download the source in archive form, or do a checkout from one of the official [[Trac:TracRepositories|source code repositories]].
    164 
    165 Be sure to have the prerequisites already installed. You can also obtain the Genshi and Babel source packages from http://www.edgewall.org and follow for them a similar installation procedure, or you can just `easy_install` those, see [#Usingeasy_install above].
    166 
    167 Once you've unpacked the Trac archive or performed the checkout, move in the top-level folder and do:
     174Of course, using the python-typical setup at the top of the source directory also works.
     175
     176You can obtain the source for a .tar.gz or .zip file corresponding to a release (e.g. Trac-0.13.tar.gz), or you can get the source directly from the repository (see Trac:SubversionRepository for details).
     177
    168178{{{
    169179$ python ./setup.py install
    170180}}}
    171181
    172 You'll need root permissions or equivalent for this step.
     182''You'll need root permissions or equivalent for this step.''
    173183
    174184This will byte-compile the python source code and install it as an .egg file or folder in the `site-packages` directory
     
    185195=== Advanced Options ===
    186196
    187 ==== Custom location with `easy_install`
    188 
    189197To install Trac to a custom location, or find out about other advanced installation options, run:
    190198{{{
     
    205213
    206214The 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.5/site-packages`, which is Apple's preferred location for third-party Python application installations.
    207 
    208 ==== Using `pip`
    209 'pip' is an easy_install replacement that is very useful to quickly install python packages.
    210 To get a trac installation up and running in less than 5 minutes:
    211 
    212 Assuming you want to have your entire pip installation in /opt/user/trac:
    213 
    214  -
    215 {{{
    216 pip -E /opt/user/trac install trac psycopg2
    217 }}}
    218 or
    219  -
    220 {{{
    221 pip -E /opt/user/trac install trac mysql-python
    222 }}}
    223 
    224 Make sure your OS specific headers are available for pip to automatically build PostgreSQL (libpq-dev) or MySQL (libmysqlclient-dev) bindings.
    225 
    226 pip will automatically resolve all dependencies (like Genshi, pygments, etc.) and download the latest packages on pypi.python.org and create a self contained installation in /opt/user/trac .
    227 
    228 All commands (tracd, trac-admin) are available in /opt/user/trac/bin. This can also be leveraged for mod_python (using !PythonHandler directive) and mod_wsgi (using WSGIDaemonProcess directive)
    229 
    230 Additionally, you can install several trac plugins (listed [http://pypi.python.org/pypi?:action=search&term=trac&submit=search here]) through pip.
    231 
    232215
    233216