| 1 |
Trac Installation Guide |
|---|
| 2 |
======================= |
|---|
| 3 |
Trac is a lightweight project management tool that is implemented as a |
|---|
| 4 |
web-based application. Trac is written in the Python programming language and |
|---|
| 5 |
can use SQLite or PostgreSQL as database. For HTML rendering, Trac uses the |
|---|
| 6 |
Genshi templating system. |
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
Note that you should also read the trac/wiki/default-pages/TracInstall |
|---|
| 10 |
documentation file present in the source distribution. |
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
Requirements |
|---|
| 14 |
------------ |
|---|
| 15 |
To install Trac, the following software packages must be installed: |
|---|
| 16 |
|
|---|
| 17 |
* Python, version >= 2.3. |
|---|
| 18 |
+ Please keep in mind, that for RPM-based systems you will also need |
|---|
| 19 |
python-devel and python-xml packages. |
|---|
| 20 |
* Genshi, version >= 0.4.1 (0.5dev recommended) |
|---|
| 21 |
* Optionally, Subversion, version >= 1.0. (>= 1.1.x recommended)and Subversion SWIG Python bindings (not PySVN). |
|---|
| 22 |
* PySQLite, version 2.x for SQLite 3.x |
|---|
| 23 |
* A web server capable of executing CGI/FastCGI scripts, or Apache HTTPD with |
|---|
| 24 |
mod_python. (Trac also comes with a standalone server) |
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
Installing Trac |
|---|
| 28 |
--------------- |
|---|
| 29 |
The command: |
|---|
| 30 |
|
|---|
| 31 |
$ python ./setup.py install |
|---|
| 32 |
|
|---|
| 33 |
will byte-compile the python source code and install it in the |
|---|
| 34 |
site-packages directory of your python installation. The directories cgi-bin, |
|---|
| 35 |
templates, htdocs and wiki-default are all copied to ``$prefix/share/trac/``. |
|---|
| 36 |
|
|---|
| 37 |
The script will also install the trac-admin command-line tool, used to create |
|---|
| 38 |
and maintain project environments. Trac-admin is the command center of Trac. |
|---|
| 39 |
|
|---|
| 40 |
Note: you'll need root permissions or equivalent for this step. |
|---|
| 41 |
|
|---|
| 42 |
To install Trac in a different location, or use other advanced installation |
|---|
| 43 |
options, run: |
|---|
| 44 |
|
|---|
| 45 |
$ python ./setup.py --help |
|---|
| 46 |
|
|---|
| 47 |
|
|---|
| 48 |
Installing Trac on Windows |
|---|
| 49 |
-------------------------- |
|---|
| 50 |
If you downloaded the Trac installer (the .exe file), installing is simply a |
|---|
| 51 |
matter of running the installer. After running the installer, configuration |
|---|
| 52 |
and installation is the same as for other platforms. |
|---|
| 53 |
|
|---|
| 54 |
|
|---|
| 55 |
Creating a Project Environment |
|---|
| 56 |
------------------------------ |
|---|
| 57 |
A Trac environment is the backend storage format where Trac stores information |
|---|
| 58 |
like wiki pages, tickets, reports, settings, etc. A Trac environment consists |
|---|
| 59 |
of the environment configuration file (trac.ini), custom templates, log files, |
|---|
| 60 |
and more. |
|---|
| 61 |
|
|---|
| 62 |
A new Trac environment is created with trac-admin: |
|---|
| 63 |
|
|---|
| 64 |
$ trac-admin /path/to/projectenv initenv |
|---|
| 65 |
|
|---|
| 66 |
Note: The user account under which the web server is run needs write permission |
|---|
| 67 |
to the environment directory and all the files inside. |
|---|
| 68 |
|
|---|
| 69 |
trac-admin will prompt you for the name of the project, where your subversion |
|---|
| 70 |
repository is located, what database you want to use, etc. |
|---|
| 71 |
|
|---|
| 72 |
|
|---|
| 73 |
Running the Standalone Server |
|---|
| 74 |
----------------------------- |
|---|
| 75 |
After having created a Trac environment, you can easily try the web interface |
|---|
| 76 |
by running the standalone server tracd: |
|---|
| 77 |
|
|---|
| 78 |
$ tracd --port 8000 /path/to/projectenv |
|---|
| 79 |
|
|---|
| 80 |
Then, fire up a browser and visit http://localhost:8000/. You should get a |
|---|
| 81 |
simple listing of all environments that tracd knows about. Follow the link |
|---|
| 82 |
to the environment you just created, and you should see Trac in action. |
|---|
| 83 |
|
|---|
| 84 |
|
|---|
| 85 |
Running Trac on a Web Server |
|---|
| 86 |
---------------------------- |
|---|
| 87 |
Trac provides three options for connecting to a "real" web server: CGI, FastCGI |
|---|
| 88 |
and mod_python. For decent performance, it is recommended that you use either |
|---|
| 89 |
FastCGI or mod_python. |
|---|
| 90 |
|
|---|
| 91 |
Please refer to the TracInstall page for details on these setups. You can find |
|---|
| 92 |
it either in the wiki of the Trac project you just created, or on the main Trac |
|---|
| 93 |
site. |
|---|
| 94 |
|
|---|
| 95 |
|
|---|
| 96 |
Using Trac |
|---|
| 97 |
---------- |
|---|
| 98 |
Once you have your Trac site up and running, you should be able to browse your |
|---|
| 99 |
subversion repository, create tickets, view the timeline, etc. |
|---|
| 100 |
|
|---|
| 101 |
Keep in mind that anonymous (not logged in) users can by default access most |
|---|
| 102 |
but not all of the features. You will need to configure authentication and |
|---|
| 103 |
grant additional permissions to authenticated users to see the full set of |
|---|
| 104 |
features. |
|---|
| 105 |
|
|---|
| 106 |
For further documentation, see the TracGuide wiki page. |
|---|
| 107 |
|
|---|
| 108 |
Enjoy! |
|---|
| 109 |
|
|---|
| 110 |
/The Trac Team |
|---|
| 111 |
|
|---|
| 112 |
Please also consider joining the mailing list at |
|---|
| 113 |
<http://lists.edgewall.com/mailman/listinfo/trac/>. |
|---|
| 114 |
|
|---|
| 115 |
|
|---|
| 116 |
Visit the Trac open source project at <http://trac.edgewall.org/> |
|---|