Changes between Version 3 and Version 4 of TracInstall


Ignore:
Timestamp:
Feb 13, 2011, 9:57:06 AM (4 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracInstall

    v3 v4  
    5555
    5656You need to install the database and its Python bindings:
    57  * [http://www.postgresql.org/ PostgreSQL]
     57 * [http://www.postgresql.org/ PostgreSQL], version 8.0 or later
    5858 * [http://pypi.python.org/pypi/psycopg2 psycopg2]
    5959
     
    7575
    7676===== Subversion =====
    77  * [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.
     77 * [http://subversion.apache.org/ Subversion], 1.5.x or 1.6.x and the '''''corresponding''''' Python bindings. 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).
    7878
    7979There 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.)
     
    132132A few examples:
    133133
    134  - install Trac 0.12:
     134 - first install of the latest stable version Trac 0.12.1, with i18n support:
    135135   {{{
    136    easy_install Trac==0.12
     136   easy_install Babel==0.9.5 Genshi==0.6
     137   easy_install Trac
    137138   }}}
    138 
    139  - install latest development version 0.12dev:
     139   ''It's very important to run the two `easy_install` commands separately, otherwise the message catalogs won't be generated.''
     140
     141 - upgrade to the latest stable version of Trac:
    140142   {{{
    141    easy_install Trac==dev
     143   easy_install -U Trac
    142144   }}}
    143    Note that in this case you won't have the possibility to run a localized version of Trac;
    144    either use a released version or install from source
     145
     146 - upgrade to the latest trunk development version (0.13dev):
     147   {{{
     148   easy_install -U Trac==dev
     149   }}}
     150
     151For upgrades, reading the TracUpgrade page is mandatory, of course.
     152
     153=== From source
     154If 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]].
     155
     156Be 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].
     157
     158Once you've unpacked the Trac archive or performed the checkout, move in the top-level folder and do:
     159{{{
     160$ python ./setup.py install
     161}}}
     162
     163''You'll need root permissions or equivalent for this step.''
     164
     165This will byte-compile the python source code and install it as an .egg file or folder in the `site-packages` directory
     166of your Python installation. The .egg will also contain all other resources needed by standard Trac, such as htdocs and templates.
     167
     168The 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.
     169
     170If you install from source and want to make Trac available in other languages, make sure  Babel is installed. Only then, perform the `install` (or simply redo the `install` once again afterwards if you realize Babel was not yet installed):
     171{{{
     172$ python ./setup.py install
     173}}}
     174Alternatively, you can do a `bdist_egg` and copy the .egg from dist/ to the place of your choice, or you can create a Windows installer (`bdist_wininst`).
     175
     176=== Advanced Options ===
     177
     178To install Trac to a custom location, or find out about other advanced installation options, run:
     179{{{
     180easy_install --help
     181}}}
     182
     183Also see [http://docs.python.org/inst/inst.html Installing Python Modules] for detailed information.
     184
     185Specifically, you might be interested in:
     186{{{
     187easy_install --prefix=/path/to/installdir
     188}}}
     189or, if installing Trac to a Mac OS X system:
     190{{{
     191easy_install --prefix=/usr/local --install-dir=/Library/Python/2.5/site-packages
     192}}}
     193Note: If installing on Mac OS X 10.6 running {{{ easy_install http://svn.edgewall.org/repos/trac/trunk }}} will install into {{{ /usr/local }}} and {{{ /Library/Python/2.6/site-packages }}} by default
     194
     195The 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.
    145196
    146197=== Using `pip`
     
    148199To get a trac installation up and running in less than 5 minutes:
    149200
    150 Assuming you want to have your entire pip installation in /opt/user/trac
     201Assuming you want to have your entire pip installation in /opt/user/trac:
    151202
    152203 -
     
    162213Make sure your OS specific headers are available for pip to automatically build PostgreSQL (libpq-dev) or MySQL (libmysqlclient-dev) bindings.
    163214
    164 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
    165 
    166 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)
     215pip 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 .
     216
     217All 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)
    167218
    168219Additionally, you can install several trac plugins (listed [http://pypi.python.org/pypi?:action=search&term=trac&submit=search here]) through pip.
    169220
    170 
    171 
    172 === From source
    173 Of course, using the python-typical setup at the top of the source directory also works.
    174 
    175 You can obtain the source for a .tar.gz or .zip file corresponding to a release (e.g. Trac-0.12.tar.gz), or you can get the source directly from the repository (see [trac:SubversionRepository] for details).
    176 
    177 {{{
    178 $ python ./setup.py install
    179 }}}
    180 
    181 ''You'll need root permissions or equivalent for this step.''
    182 
    183 This will byte-compile the python source code and install it as an .egg file or folder in the `site-packages` directory
    184 of your Python installation. The .egg will also contain all other resources needed by standard Trac, such as htdocs and templates.
    185 
    186 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.
    187 
    188 If you install from source and want to make Trac available in other languages, make sure  Babel is installed. Only then, perform the `install` (or simply redo the `install` once again afterwards if you realize Babel was not yet installed):
    189 {{{
    190 $ python ./setup.py install
    191 }}}
    192 Alternatively, you can do a `bdist_egg` and copy the .egg from dist/ to the place of your choice, or you can create a Windows installer (`bdist_wininst`).
    193 
    194 === Advanced Options ===
    195 
    196 To install Trac to a custom location, or find out about other advanced installation options, run:
    197 {{{
    198 easy_install --help
    199 }}}
    200 
    201 Also see [http://docs.python.org/inst/inst.html Installing Python Modules] for detailed information.
    202 
    203 Specifically, you might be interested in:
    204 {{{
    205 easy_install --prefix=/path/to/installdir
    206 }}}
    207 or, if installing Trac to a Mac OS X system:
    208 {{{
    209 easy_install --prefix=/usr/local --install-dir=/Library/Python/2.5/site-packages
    210 }}}
    211 Note: If installing on Mac OS X 10.6 running {{{ easy_install http://svn.edgewall.org/repos/trac/trunk }}} will install into {{{ /usr/local }}} and {{{ /Library/Python/2.6/site-packages }}} by default
    212 
    213 The 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.
    214221
    215222
     
    236243# chown -R apache.apache /path/to/myproject
    237244}}}
     245
     246{{{#!div class=important
     247'''Warning:''' Please only use ASCII-characters for account name and project path, unicode characters are not supported there.
     248}}}
     249
    238250
    239251== Running the Standalone Server ==