|Version 56 (modified by 16 years ago) ( diff ),|
Trac on Fedora Core
Installing Trac On Fedora Core 4 (and higher) is easy with Yum and involves only 3 steps:
1) Verify you have configured Yum to use the Extras repository (which is enabled by default in Fedora Core 4 and higher) and run the following command in a terminal window:
$ sudo yum install trac
Yum will take care of all dependencies on which the Trac package depends (including the python-clearsilver package) and will fetch and install them for you automatically.
2) Create a new project environment. An environment is basically a directory that contains a human-readable configuration file and various other files and directories.
Create a subverion repository if you don't already have one, for example in /srv/svn:
$ sudo mkdir -p /srv/svn $ sudo svnadmin create --fs-type fsfs /srv/svn
Next you need to decide where to store your trac project and create the directory, for example in the new directory /srv/trac:
$ sudo mkdir -p /srv/trac
Then create a new environment using trac-admin, as in this example for project foobar
$ sudo trac-admin /srv/trac/foobar initenv
Now make it owned by apache:
$ sudo chown -R apache /srv/trac $ sudo chown -R apache /srv/svn
3) Next, you need to edit (is this the exact contents of this file, or is this appended to what is already there??) the file /etc/httpd/conf.d/trac.conf to point to your new project environment, as in this example (using mod_python):
<Location /foobar> SetHandler mod_python PythonHandler trac.web.modpython_frontend PythonOption TracEnv /srv/trac/foobar PythonOption TracUriRoot /foobar </Location> <Location "/foobar/login"> AuthType Basic AuthName "alexandria" AuthUserFile /opt/trac/trac.htpasswd Require valid-user </Location>
The example above assumes you have a trac project environment setup in /srv/trac/foobar/ directory, described in step 2 and a htpasswd file in /opt/trac/trac.htpasswd (ie the file is named: /opt/trac/trac.htpasswd/.htpasswd ??)for authentication purposes (a FC5 specific example is needed here and would save countless hours)(see also wiki:TracModPython (too generic)).
You will need to restart apache after editing trac.conf:
$ sudo service httpd restart
Verify your Trac installation by pointing your browser at the correct URL for your Trac server (e.g. localhost/?????).
Notes on the Fedora Extras Trac package:
- trac.cgi and trac.fcgi are installed in /var/www/cgi-bin/ (actually, /usr/share/trac/cgi-bin for FC5).
- apache webserver config file is installed in /etc/httpd/conf.d/trac.conf
If you happen to come across any packaging issues, feature requests or problems on Fedora, you can submit a bugzilla bug for the Trac package at https://bugzilla.redhat.com/bugzilla/easy_enter_bug.cgi.
Be sure to check out the generic installation instructions in the TracGuide
Fedora Core 5 ships with SELinux enabled by default. You need to make the Trac and Subversion directory accessible to the webserver. See http://fedora.redhat.com/docs/selinux-apache-fc3/ for details.
$ sudo chcon -R -t httpd_sys_content_t /srv/trac $ sudo chcon -R -t httpd_sys_content_t /srv/svn