Changes between Version 7 and Version 8 of TracOnRHEL
- Timestamp:
- Feb 27, 2015, 2:55:27 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracOnRHEL
v7 v8 1 = Trac on RHEL =1 = Trac on RHEL 2 2 3 Installing Trac On RHEL 4 (and higher), is easy with Yum.3 Installing Trac on [http://www.redhat.com/en/technologies/linux-platforms/enterprise-linux RHEL 4+] is easy with the Yum package manager. 4 4 5 5 1. If you haven't already installed Yum, do so as appropriate for your operating system. … … 9 9 $ sudo yum install trac 10 10 }}} 11 Yum will take care of all dependencies on which the Trac package depends (including the python-clearsilver package) and will fetch andinstall them for you automatically.12 Note: With the current (0.11.5) version in RPMforge the mod_python dependency is missing, so if you haven't already installed mod_pythonyou also need to do:11 Yum will take care of all dependencies on which the Trac package depends (including the python-clearsilver package) and install them for you automatically. 12 '''Note''': the mod_python dependency may be missing in RPMforge, so if you haven't already installed mod_python, you also need to do: 13 13 {{{ 14 14 $ sudo yum install mod_python 15 15 }}} 16 16 1. Create a new project environment. An environment is basically a directory that contains a human-readable configuration file and various other files and directories. 17 a. Create a subversion repository if you don't already have one, for example in ''/srv/svn'':17 a. Create a Subversion repository if you don't already have one, for example in `/srv/svn`: 18 18 {{{ 19 19 $ sudo mkdir -p /var/www/svn/foobar 20 20 $ sudo svnadmin create --fs-type fsfs /var/www/svn/foobar 21 21 }}} 22 a. Next you need to decide where to store your trac project and create the directory, for example in the new directory /srv/trac:22 a. Next you need to decide where to store your Trac project and create the directory, for example in the new directory `/srv/trac`: 23 23 {{{ 24 24 $ sudo mkdir -p /var/www/trac 25 25 }}} 26 a. Then create a new environment using [wiki:TracAdmin trac-admin], as in this example for project ''foobar''26 a. Then create a new environment using [wiki:TracAdmin trac-admin], as in this example for project `foobar`: 27 27 {{{ 28 28 $ sudo trac-admin /var/www/trac/foobar initenv 29 29 }}} 30 a. Now make it owned by apache:30 a. Now make it owned by Apache: 31 31 {{{ 32 32 $ sudo chown -R apache:apache /var/www/trac/foobar 33 33 $ sudo chown -R apache:apache /var/www/svn/foobar 34 34 }}} 35 1. 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):35 1. 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): 36 36 {{{ 37 37 # The Location is the part after the host (http://example.com<Location>) that … … 58 58 }}} 59 59 60 = Apache Authentication =60 == Apache Authentication 61 61 62 The example above assumes you have a trac project environment setup in ''/var/www/trac/foobar/'' directory, described in step 2 and an htpasswd file at /var/www/trac/foobar/conf/trac.htpasswd for authentication purposes (see also wiki:TracModPython (too generic)).62 The example above assumes you have a Trac project environment setup in `/var/www/trac/foobar/` directory, described in step 2 and an htpasswd file at `/var/www/trac/foobar/conf/trac.htpasswd` for authentication purposes. See also a generic guide at TracModPython. 63 63 64 There are numerous other ways to authenticate users, but if you care about security ''do not'' use the same authentication for comand line Subversion clients as you do for Trac. This is because Subversion keeps its passwords for command lines locally, in your home directory, in clear text.64 There are other ways to authenticate users, but if you care about security '''do not''' use the same authentication for comand line Subversion clients as you do for Trac. This is because Subversion keeps its passwords for command lines locally, in your home directory, in clear text. 65 65 66 = Activating the web server =66 == Activating the web server 67 67 68 68 You will need to tell Apache to reload configuration after editing trac.conf: … … 72 72 }}} 73 73 74 Verify your Trac installation by pointing your browser at the correct URL for your Trac server (e.g. http://localhost/trac).74 Verify your Trac installation by pointing your browser at the correct URL for your Trac server, eg `http://localhost/trac`. 75 75 76 76 Notes on the RHEL package: 77 77 78 * trac.cgi and trac.fcgi are installed in /var/www/cgi-bin/ (actually, //usr/share/trac/cgi-bin/trac.fcgi for RHEL).79 * apache webserver config file is installed in /etc/httpd/conf.d/trac.conf78 * trac.cgi and trac.fcgi are installed in `/var/www/cgi-bin/`, or `//usr/share/trac/cgi-bin/trac.fcgi` for RHEL. 79 * Apache webserver config file is installed in `/etc/httpd/conf.d/trac.conf`. 80 80 81 If you happen to come across any packaging issues, feature requests or problems on RHEL, you can submit a bugzilla bug for the Trac package at [https://bugzilla.redhat.com/bugzilla/easy_enter_bug.cgi].81 If you happen to come across any packaging issues, feature requests or problems on RHEL, you can [https://bugzilla.redhat.com/bugzilla/easy_enter_bug.cgi submit a Bugzilla bug] for the Trac package. 82 82 83 Be sure to check out the generic installation instructions in the [wiki:TracGuide TracGuide] 83 Also check the generic installation instructions in the TracGuide. 84 84 85 == SELinux ==85 == SELinux 86 86 87 87 RHEL now ships with SELinux enabled by default. This means you need to make the Trac and Subversion directory accessible to the webserver. If you keep these contents under {{{/var/www/trac}}} and {{{/var/www/svn}}}, you don't need to do anything else. 88 88 89 If you want an alternative location such as {{{/srv}}} or {{{opt}}}, and many installers have their own ideas about where these should go, follow thiese guidelines and read the notes at [http://fedora.redhat.com/docs/selinux-apache-fc3/] for details.89 If you want an alternative location, such as {{{/srv}}} or {{{opt}}}, and many installers have their own ideas about where these should go, follow these guidelines and read the notes at [http://fedora.redhat.com/docs/selinux-apache-fc3/] for details. 90 90 91 91 {{{ … … 94 94 }}} 95 95 96 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 these lines to the file {{{/etc/selinux/targeted/contexts/files/filecontexts.local}}} 96 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 these lines to the file {{{/etc/selinux/targeted/contexts/files/filecontexts.local}}}: 97 97 98 98 {{{ … … 101 101 }}} 102 102 103 You may need to create this file if it is not already present: it's not present by default.103 You may need to create this file, because it is not present by default.