Changes between Version 86 and Version 87 of TracOnFedoraCore
- Timestamp:
- Oct 26, 2015, 8:31:28 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracOnFedoraCore
v86 v87 1 = Trac on Fedora Core =1 = Trac on Fedora Core 2 2 3 3 Installing Trac On Fedora Core 4 (and higher), and also on RHEL 4 or higher is easy with Yum and involves the following steps: … … 5 5 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: 6 6 7 {{{ 8 7 {{{#!sh 8 $ sudo yum install trac mod_python mod_dav mod_dav_svn 9 9 }}} 10 10 11 11 Yum will fetch and install all dependencies on which the Trac package depends, including the `python-clearsilver` package. 12 12 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`. 14 14 15 15 2. Create a new project environment: a directory that contains a human-readable configuration file and other files and directories. 16 16 17 17 Create a subversion repository if you don't already have one, for example in `/srv/svn`: 18 {{{ 19 20 $ sudo svnadmin create--fs-type fsfs /srv/svn18 {{{#!sh 19 $ sudo mkdir -p /srv/svn 20 $ sudo svnadmin create --fs-type fsfs /srv/svn 21 21 }}} 22 22 23 23 Next 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/trac24 {{{#!sh 25 $ sudo mkdir -p /srv/trac 26 26 }}} 27 27 28 28 Then create a new environment using [wiki:TracAdmin trac-admin], as in this example for project `foobar`: 29 {{{ 30 29 {{{#!sh 30 $ sudo trac-admin /srv/trac/foobar initenv 31 31 }}} 32 32 33 33 Now make it owned by Apache: 34 {{{ 35 36 34 {{{#!sh 35 $ sudo chown -R apache /srv/trac 36 $ sudo chown -R apache /srv/svn 37 37 }}} 38 38 39 39 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: 40 40 41 {{{ 41 {{{#!apache 42 42 # The Location is the part after the host (http://example.com<Location>) that 43 43 # you want to serve the Trac site … … 66 66 <IfModule mod_dav.c> 67 67 <Location /svn> 68 69 70 71 68 # Uncomment this to enable the repository, 69 DAV svn 70 # Set this to the path to your repository 71 SVNPath /srv/svn 72 72 </Location> 73 73 </IfModule> … … 78 78 You will need to tell Apache to reload configuration after editing `trac.conf`: 79 79 80 {{{ 81 80 {{{#!sh 81 $ sudo service httpd reload 82 82 }}} 83 83 … … 109 109 Fedora 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. 110 110 111 {{{ 112 113 111 {{{#!sh 112 $ sudo chcon -R -t httpd_sys_content_t /srv/trac 113 $ sudo chcon -R -t httpd_sys_content_t /srv/svn 114 114 }}} 115 115 116 116 If 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: 117 117 118 {{{ 119 120 118 {{{#!sh 119 /srv/trac(/.*)? system_u:object_r:httpd_sys_content_t 120 /srv/svn(/.*)? system_u:object_r:httpd_sys_content_t 121 121 }}} 122 122 123 123 to 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: 124 124 125 {{{ 126 127 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 128 128 }}}