Changes between Version 108 and Version 109 of TracOnDebian
- Timestamp:
- Jul 23, 2008, 12:13:55 AM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracOnDebian
v108 v109 1 1 = Installing and Running Trac on Debian = 2 3 {{{4 #!html5 <p style="background: #fdc; border: 2px solid #d00; font-style: italic; padding: 0 .5em; margin: 1em 0;">6 <strong>Note from mgood:</strong> I am currently in the process of rewriting this page. It is not currently complete, but should cover the most common topics already. If you have more questions you may want to refer back to the previous revision of this page I have finished.7 </p>8 }}}9 2 10 3 '''Note:''' ''This page does not provide step-by-step instructions for installing and configuring all of Trac. Use this page as a reference for installing the Debian software packages and the locations of configuration files, but you will need to read TracInstall and the other documentation sections for complete instructions on running and configuring Trac.'' 11 4 12 These instructions require the Debian Sarge release or newer. 13 Check http://packages.debian.org/trac to see the latest available Trac version for your Debian release. 14 Debian etch (stable) contains trac 0.10.3, 15 Debian (lenny, to be released in 2008) will probably have 0.11. 16 Debian sarge (oldstable) had 0.8.1, but 0.10.3 is available as backport. 5 '''Note:'''These Instructions are for ''Trac 0.11'' or better. 17 6 18 These instructions use the commandline tool `apt-get` to install the packages which you will need to run as the `root` user. If you prefer to use a graphical tool such as `synaptic` you can search for the package names mentioned to install them.19 7 20 == Required Packages == 8 The '''Trac''' package is named '''trac''' and is available from the ''main'' archive. 9 This package is Team Maintained by [http://alioth.debian.org/projects/pkg-trac Debian Trac Packaging Team]. 10 11 == Where To get info about trac in debian == 12 13 * Package Information: http://packages.debian.org/trac 14 Shows information about available versions, dependencies, file list and links to other resources. 15 16 * Package Tracking System: http://packages.qa.debian.org/t/trac.html 17 Shows the summary of all info about the package, including available versions, maintainers and number of bugs (in debian and ubuntu) 18 19 * Bug Tracking System: http://bugs.debian.org/trac 20 Show all bugs filled against trac and their status. 21 22 23 == Installing Trac == 24 25 To install '''trac''' just write in console: 21 26 22 27 {{{ 23 apt-get install trac 28 29 apt-get install trac 24 30 }}} 25 31 26 == Apache ==27 32 28 Trac can be run in [wiki:TracStandalone standalone mode], or with a web server of your choice. [http://httpd.apache.org/ Apache] is a recommended choice and packages are available for Debian: 33 This will get you the plain '''trac''' instalation. 34 You can also install plugins that support other version control system besides Subversion: 35 Their packages are: 36 37 * '''trac-git''' :: adds suport for the Git distributed version control system 29 38 30 39 {{{ 31 apt-get install apache2 40 apt-get install trac-git 41 }}} 42 43 44 * '''trac-mercurial''' :: adds suport for the mecurial distributed version control system 45 46 {{{ 47 apt-get install trac-mercurial 32 48 }}} 33 49 34 In addition to installing the server itself you will need to install one of the Apache modules mentioned below to allow the Trac application to run under Apache. Each subsection refers to the general Trac documentation for the Apache configuration necessary for that module. On Debian it is recommended to put your Trac Apache configuration statements into a new file called "/etc/apache2/sites-available/trac". Then use the following command to enable your Trac site: 50 51 * '''trac-bzr''' :: adds suport for the bzr distributed version control system 52 (at this point trac-bzr in debian is not compatible with trac 0.11, check [http://bugs.debian.org/490193] ) 35 53 36 54 {{{ 37 a2ensite trac 55 apt-get install trac-bzr 38 56 }}} 39 57 40 Most people won't run trac as a separate site and prefer it as /trac/ on the primary site. To get this to work, create a file /etc/apache2/conf.d/trac.conf with the following content: 58 59 There is also an important plugin to prevent ''spam'' on tickets, '''spamfilter''' 60 41 61 42 62 {{{ 43 ScriptAlias /trac /usr/lib/cgi-bin/trac.fcgi 44 45 <Location /trac> 46 SetEnv TRAC_ENV "/var/spool/trac/" 47 Options -Indexes 48 </Location> 49 50 <Location /cgi-bin/trac.cgi> 51 SetEnv TRAC_ENV "/var/spool/trac/" 52 </Location> 53 54 <Location /cgi-bin/trac.fcgi> 55 SetEnv TRAC_ENV "/var/spool/trac/" 56 </Location> 57 58 <Location "/trac/login"> 59 AuthName "svn" 60 AuthType Basic 61 AuthUserFile /etc/apache2/trac.htpasswd 62 require valid-user 63 </Location> 63 apt-get install spam filter 64 64 }}} 65 65 66 {{{ 67 htpasswd -c /etc/apache2/trac.htpasswd <user1> 68 htpasswd /etc/apache2/trac.htpasswd <user2> 69 ... 70 trac-admin /var/spool/trac 71 --> initenv 72 /etc/init.d/apache2 restart 73 }}} 66 == Files Location == 74 67 75 More detailed Apache documentation can be found in the package `apache2-doc`.68 '''Trac''' is installed in '''/usr/share/pyshared/trac''' and has no other place for files except '''/usr/share/doc''' and the ''tracd'' and ''trac-admin'' man-pages. 76 69 77 For Trac versions 0.8.x mod_python is recommended. Trac [milestone:0.9] also supports FastCGI. CGI instructions are provided, but this is not recommended since mod_python or FastCGI will give significantly better performance. 70 == Configuring Apache Webserver == 78 71 79 === mod_wsgi === 72 '''Trac''' on Debian depends on any webserver available, but it prefers Apache2. 80 73 81 See [wiki:TracModWSGI] for further instructions. 82 83 === mod_python === 84 85 {{{ 86 apt-get install libapache2-mod-python 87 a2enmod mod_python 88 }}} 89 90 See TracModPython for further instructions. 91 92 === FastCGI === 93 94 '''Note:''' ''FastCGI requires Trac [milestone:0.9] or higher.'' 95 96 {{{ 97 apt-get install libapache2-mod-fcgid 98 a2enmod fcgid 99 }}} 100 101 See TracFastCgi for further instructions. 102 103 === CGI === 104 105 The CGI module is included with the Apache2 packages, but you will need to ensure that the module is loaded in order to run CGI scripts: 106 107 {{{ 108 a2enmod cgi 109 }}} 110 111 See TracCgi for further instructions. 112 113 == SVN == 114 To install subversion mods for Apache, you must run nex: 115 {{{ 116 apt-get install subversion libapache2-svn subversion-tools 117 }}} 118 119 == Suggested Packages == 120 121 TracSyntaxColoring requires `pygments` (for trac >= 0.11) or `enscript` (before) and WikiRestructuredText requires `python-docutils`: 122 123 {{{ 124 apt-get install enscript python-docutils python-pygments 125 }}} 126 127 == Comments == 128 129 I have found that in Ubuntu, a2ensite trac complains about trac site being unexistent. Manu. 130 This is because you missread (or didn't read) the text (as I did in my first install attempt :-) ) 131 > 132 >On Debian it is recommended to put your Trac Apache configuration statements into a new file called "/etc/apache2/sites-available/trac". Then use the following command to enable your Trac site: HTH Marcel 133 134 135 136 Whilst trying to get Trac working on Debian Sarge with Python 2.3, I got the following error: 137 138 {{{ 139 PythonHandler trac.web.modpython_frontend: ImportError: No module named web 140 }}} 141 142 I found that I had to use this line in the Apache2 config rather than the one given: 143 144 {{{ 145 # PythonHandler trac.web.modpython_frontend 146 PythonHandler trac.ModPythonHandler 147 }}} 148 149 {{{ 150 #!html 151 <p style="background: #fdc; border: 2px solid #d00; font-style: italic; padding: 0 .5em; margin: 1em 0;"> This is because you installed the old/stable 0.8x version of trac, but the pythonhandler trac.web.modpython_frontend is for 0.9x which you get as unstable/testing! 152 </p> 153 }}} 154 155 I always have trouble finding this page so I'll post a link here. It's relevent enough that someone could merge it in... 156 [wiki:TracOnDebianSarge latest trac on sarge] 74 For fast configuration, please check ''README.Debian'' located in '''/usr/share/doc/trac''' . 75 For specific configurations, please check TracGuide and [http://trac.edgewall.org Trac's website].