Edgewall Software

Changes between Version 86 and Version 87 of TracOnFedoraCore


Ignore:
Timestamp:
Oct 26, 2015, 8:31:28 PM (9 years ago)
Author:
figaro
Comment:

Cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • TracOnFedoraCore

    v86 v87  
    1 = Trac on Fedora Core =
     1= Trac on Fedora Core
    22
    33Installing Trac On Fedora Core 4 (and higher), and also on RHEL 4 or higher is easy with Yum and involves the following steps:
     
    55 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:
    66
    7 {{{
    8   $ sudo yum install trac mod_python mod_dav mod_dav_svn
     7{{{#!sh
     8$ sudo yum install trac mod_python mod_dav mod_dav_svn
    99}}}
    1010
    1111Yum will fetch and install all dependencies on which the Trac package depends, including the `python-clearsilver` package.
    1212
    13 ''NOTE:'' If you are on Fedora 7 and using SQLite as the database, you will need to also install `python-sqlite2`.
     13'''Note:''' If you are on Fedora 7 and using SQLite as the database, you will need to also install `python-sqlite2`.
    1414
    1515 2. Create a new project environment: a directory that contains a human-readable configuration file and other files and directories.
    1616
    1717Create a subversion repository if you don't already have one, for example in `/srv/svn`:
    18 {{{
    19  $ sudo mkdir -p /srv/svn
    20  $ sudo svnadmin create --fs-type fsfs /srv/svn
     18{{{#!sh
     19$ sudo mkdir -p /srv/svn
     20$ sudo svnadmin create --fs-type fsfs /srv/svn
    2121}}}
    2222
    2323Next you need to decide where to store your Trac project and create the directory, for example in the new directory `/srv/trac`:
    24 {{{
    25  $ sudo mkdir -p /srv/trac
     24{{{#!sh
     25$ sudo mkdir -p /srv/trac
    2626}}}
    2727
    2828Then create a new environment using [wiki:TracAdmin trac-admin], as in this example for project `foobar`:
    29 {{{
    30  $ sudo trac-admin /srv/trac/foobar initenv
     29{{{#!sh
     30$ sudo trac-admin /srv/trac/foobar initenv
    3131}}}
    3232
    3333Now make it owned by Apache:
    34 {{{
    35  $ sudo chown -R apache /srv/trac
    36  $ sudo chown -R apache /srv/svn
     34{{{#!sh
     35$ sudo chown -R apache /srv/trac
     36$ sudo chown -R apache /srv/svn
    3737}}}
    3838
    3939 3. Next, you need to edit the file ''/etc/httpd/conf.d/trac.conf'' to point to your new project environment, as in this example using mod_python:
    4040
    41 {{{
     41{{{#!apache
    4242# The Location is the part after the host (http://example.com<Location>) that
    4343# you want to serve the Trac site
     
    6666<IfModule mod_dav.c>
    6767<Location /svn>
    68     # Uncomment this to enable the repository,
    69     DAV svn
    70     # Set this to the path to your repository
    71     SVNPath /srv/svn
     68   # Uncomment this to enable the repository,
     69   DAV svn
     70   # Set this to the path to your repository
     71   SVNPath /srv/svn
    7272</Location>
    7373</IfModule>
     
    7878You will need to tell Apache to reload configuration after editing `trac.conf`:
    7979
    80 {{{
    81   $ sudo service httpd reload
     80{{{#!sh
     81$ sudo service httpd reload
    8282}}}
    8383
     
    109109Fedora Core 5 ships with SELinux enabled by default. You need to make the Trac and Subversion directory accessible to the webserver. If you put these contents under {{{/var/www/trac}}} and {{{/var/www/svn}}} to follow !RedHat's standard for location of web contents, you don't need to do anything extra for SELinux. But if you want an alternative location such as {{{/srv}}}, follow these guidelines and read the notes at [http://fedora.redhat.com/docs/selinux-apache-fc3/] for details.
    110110
    111 {{{
    112  $ sudo chcon -R -t httpd_sys_content_t /srv/trac
    113  $ sudo chcon -R -t httpd_sys_content_t /srv/svn
     111{{{#!sh
     112$ sudo chcon -R -t httpd_sys_content_t /srv/trac
     113$ sudo chcon -R -t httpd_sys_content_t /srv/svn
    114114}}}
    115115
    116116If you put these under {{{/srv/www/trac}}} and {{{/srv/www/svn}}} instead, the {{{restorecon}}} command will know that these attributes should be preserved. Alternatively, you can teach {{{restorecon}}} about these two directories by adding the lines:
    117117
    118 {{{
    119  /srv/trac(/.*)?    system_u:object_r:httpd_sys_content_t
    120  /srv/svn(/.*)?     system_u:object_r:httpd_sys_content_t
     118{{{#!sh
     119/srv/trac(/.*)?    system_u:object_r:httpd_sys_content_t
     120/srv/svn(/.*)?     system_u:object_r:httpd_sys_content_t
    121121}}}
    122122
    123123to the file {{{/etc/selinux/targeted/contexts/files/filecontexts.local}}}. You may need to create this file if it is not already present. If SELinux continues to block write access for Trac, you may have the `httpd_unified` policy turned off. In this case, try these lines instead:
    124124
    125 {{{
    126  /srv/trac(/.*)?    system_u:object_r:httpd_sys_content_rw_t
    127  /srv/svn(/.*)?     system_u:object_r:httpd_sys_content_rw_t
     125{{{#!sh
     126/srv/trac(/.*)?    system_u:object_r:httpd_sys_content_rw_t
     127/srv/svn(/.*)?     system_u:object_r:httpd_sys_content_rw_t
    128128}}}