close
Warning:
Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.
- Timestamp:
-
Jul 14, 2008, 10:28:16 AM (16 years ago)
- Author:
-
trac
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v1
|
v2
|
|
2 | 2 | [[TracGuideToc]] |
3 | 3 | |
4 | | '''NOTE: this page is now for 0.11, which will be released soon. For installing previous Trac versions, please refer to wiki:0.10/TracInstall.''' |
5 | | |
6 | | 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.com Genshi] templating system. |
| 4 | 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. |
7 | 5 | |
8 | 6 | 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. |
… |
… |
|
11 | 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). |
12 | 10 | {{{ |
13 | | sudo easy_install Pygments |
14 | | sudo easy_install Genshi |
15 | | sudo easy_install Trac |
| 11 | sudo easy_install Trac==0.11 |
16 | 12 | }}} |
17 | 13 | |
… |
… |
|
25 | 21 | * See instructions in ["TracOnWindows/Python2.5"] |
26 | 22 | * [http://peak.telecommunity.com/DevCenter/setuptools setuptools], version >= 0.6 |
27 | | * [http://genshi.edgewall.org/wiki/Download Genshi], version >= 0.3.6 |
| 23 | * [http://genshi.edgewall.org/wiki/Download Genshi], version >= 0.4.1 |
28 | 24 | * You also need a database system and the corresponding python drivers for it. |
29 | 25 | The database can be either SQLite, PostgreSQL or ''MySQL (experimental)''. |
… |
… |
|
44 | 40 | * [http://initd.org/projects/psycopg2 psycopg2] or [http://pypgsql.sourceforge.net/ pyPgSQL] |
45 | 41 | |
| 42 | '''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. |
| 43 | |
46 | 44 | === For MySQL === |
47 | 45 | |
48 | | '''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 informations. |
| 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. |
49 | 47 | |
50 | 48 | * [http://mysql.com/ MySQL], version 4.1 or later |
… |
… |
|
66 | 64 | * A CGI-capable web server (see TracCgi), or |
67 | 65 | * 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]) |
| 67 | * 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 | 68 | * [http://httpd.apache.org/ Apache] with [http://www.modpython.org/ mod_python 3.1.3+] (see TracModPython) |
69 | 69 | * When installing mod_python the development versions of Python and Apache are required (actually the libraries and header files) |
70 | | * [http://httpd.apache.org/ Apache] with [http://code.google.com/p/modwsgi/ mod_wsgi] (see [wiki:TracModWSGI]) |
71 | | * While mod_wsgi is very new and somewhat experimental, this should work with Apache 1.3, 2.0 or 2.2 and promises to deliver more performance than using mod_python. |
72 | 70 | |
73 | 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. |
… |
… |
|
85 | 83 | == Installing Trac == |
86 | 84 | |
87 | | Because of setuptools you can do, with the release tag, as well as with trunk: |
| 85 | One way to install Trac is using `setuptools`. |
| 86 | With setuptools you can install Trac from the subversion repository; for example, |
| 87 | to install release version 0.11b2 do: |
88 | 88 | {{{ |
89 | | easy_install http://svn.edgewall.com/repos/trac/tags/trac-0.11 |
| 89 | easy_install http://svn.edgewall.org/repos/trac/tags/trac-0.11b2 |
90 | 90 | }}} |
91 | 91 | |
… |
… |
|
97 | 97 | ''Note: you'll need root permissions or equivalent for this step.'' |
98 | 98 | |
99 | | This will byte-compile the python source code and install it in the `site-packages` directory |
100 | | of your Python installation. The directories `cgi-bin`, `templates`, `htdocs`, `wiki-default` and `wiki-macros` are all copied to `$prefix/share/trac/`. `conf` and `plugins` stub directories are also created under `$prefix/share/trac/`. |
| 99 | This will byte-compile the python source code and install it as an .egg file or folder in the `site-packages` directory |
| 100 | of your Python installation. The .egg will also contain all other resources needed by standard Trac, such as htdocs and templates. |
101 | 101 | |
102 | 102 | 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 | 115 | easy_install --prefix=/path/to/installdir |
116 | 116 | }}} |
| 117 | or, if installing Trac to a Mac OS X system: |
| 118 | {{{ |
| 119 | easy_install --prefix=/usr/local --install-dir=/Library/Python/2.5/site-packages |
| 120 | }}} |
| 121 | |
| 122 | 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. |
117 | 123 | |
118 | 124 | == Creating a Project Environment == |
… |
… |
|
129 | 135 | Also note that the values you specify here can be changed later by directly editing the [wiki:TracIni] configuration file. |
130 | 136 | |
131 | | ''Note: The user account under which the web server runs will require write permissions to the environment directory and all the files inside.'' |
| 137 | ''Note: The user account under which the web server runs will require write permissions to the environment directory and all the files inside. On Linux, with the web server running as user apache and group apache, enter:'' |
| 138 | |
| 139 | chown -R apache.apache /path/to/myproject |
132 | 140 | |
133 | 141 | |
… |
… |
|
139 | 147 | }}} |
140 | 148 | |
141 | | Then, fire up a browser and visit `http://localhost:8000/`. You should get a simple listing of all environments that tracd knows about. Follow the link to the environment you just created, and you should see Trac in action. |
| 149 | Then, fire up a browser and visit `http://localhost:8000/`. You should get a simple listing of all environments that tracd knows about. Follow the link to the environment you just created, and you should see Trac in action. If you only plan on managing a single project with trac you can have the standalone server skip the environment list by starting it like this: |
| 150 | {{{ |
| 151 | $ tracd -s --port 8000 /path/to/myproject |
| 152 | }}} |
142 | 153 | |
143 | 154 | |
144 | 155 | == Running Trac on a Web Server == |
145 | 156 | |
146 | | 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. |
| 157 | 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. |
147 | 158 | |
148 | 159 | If you're not afraid of running development code, you can also try running Trac on [wiki:TracModWSGI mod_wsgi]. This should deliver even better performance than mod_python, but the module is not considered stable just yet. |
… |
… |
|
155 | 166 | * TracCgi if you use the CGI or FastCGI methods. |
156 | 167 | * TracModPython if you use the mod_python method. |
| 168 | |
| 169 | == Trac 0.11 & SVN on Mac OS X Leopard (10.5) == |
| 170 | |
| 171 | * TracOnLeopardServer |
157 | 172 | |
158 | 173 | == Using Trac == |
… |
… |
|
168 | 183 | ---- |
169 | 184 | See also: TracGuide, TracCgi, TracFastCgi, TracModPython, [wiki:TracModWSGI], TracUpgrade, TracPermissions |
| 185 | |