30 | | If you're using Python 2.5 or newer, you'll have a bundled version of SQLite and the bindings. If you're using Python 2.4 or you want to use a specific version of SQLite and/or the bindings, you can grab them from: |
31 | | * [http://www.sqlite.org/ sqlite.org] |
32 | | * [http://pysqlite.org/ pysqlite.org] |
33 | | |
34 | | Note that SQLite v2.x databases are not supported anymore, you |
35 | | need to migrate them to SQLite v3.x. |
36 | | |
37 | | For details see the [trac:PySqlite PySqlite] page. |
38 | | |
| 30 | If you're using Python 2.5 or 2.6, you already have everything you need. |
| 31 | |
| 32 | If you're using Python 2.4 and need pysqlite, you can download from |
| 33 | [http://code.google.com/p/pysqlite/downloads/list google code] the Windows |
| 34 | installers or the tar.gz archive for building from source: |
| 35 | {{{ |
| 36 | $ tar xvfz <version>.tar.gz |
| 37 | $ cd <version> |
| 38 | $ python setup.py build_static install |
| 39 | }}} |
| 40 | |
| 41 | That way, the latest SQLite version will be downloaded and built into the |
| 42 | bindings. |
| 43 | |
| 44 | SQLite 2.x is no longer supported. For SQLite 3.x, the pysqlite 1.1.x |
| 45 | bindings are also no longer supported, use pysqlite 2.x. |
| 46 | |
| 47 | See additional information in [trac:PySqlite PySqlite]. |
192 | | Trac provides three options for connecting to a "real" web server: [wiki:TracCgi CGI], [wiki:TracFastCgi FastCGI], [wiki:TracModPython mod_python], [wiki:TracModWSGI mod_wsgi]. For decent performance, it is recommended that you use either FastCGI, mod_python or mod_wsgi. |
193 | | |
| 199 | Trac 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. |
| 200 | |
| 201 | |
| 202 | Trac also supports [trac:TracOnWindowsIisAjp AJP] which may be your choice if you want to connect to IIS. |
| 203 | |
| 204 | ==== Generating the Trac cgi-bin directory ==== |
| 205 | |
| 206 | In order for Trac to function properly with FastCGI or mod_python, you need to have a trac.cgi file. This is an executable which loads the appropriate Python code. It can be generated using the `deploy` option of [wiki:TracAdmin trac-admin]. |
| 207 | |
| 208 | There is, however, a bit of a chicken-and-egg problem. The [wiki:TracAdmin trac-admin] command requires an existing environment to function, but complains if the deploy directory already exists. This is a problem, because environments are often stored in a subdirectory of the deploy. The solution is to do something like this: |
| 209 | {{{ |
| 210 | mkdir -p /usr/share/trac/projects/my-project |
| 211 | trac-admin /usr/share/trac/projects/my-project initenv |
| 212 | trac-admin /usr/share/trac/projects/my-project deploy /tmp/deploy |
| 213 | mv /tmp/deploy/* /usr/share/trac |
| 214 | }}} |
| 215 | |
| 216 | ==== Setting up the Plugin Cache ==== |
| 217 | |
| 218 | 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. |