“UbuntuHelp:Trac”的版本间的差异
来自Ubuntu中文
小 |
小 |
||
第8行: | 第8行: | ||
apt-get install libapache2-mod-python | apt-get install libapache2-mod-python | ||
apt-get install python-setuptools | apt-get install python-setuptools | ||
+ | </nowiki></pre> | ||
+ | You may have to stop your apache2 server before trying to install libapache2-mod-python: | ||
+ | <pre><nowiki> | ||
+ | /etc/init.d/apache2 stop | ||
</nowiki></pre> | </nowiki></pre> | ||
=== Installation === | === Installation === | ||
第51行: | 第55行: | ||
</nowiki></pre> | </nowiki></pre> | ||
Furthermore, for a project listing, you need the following index.cgi in /var/www/projects: | Furthermore, for a project listing, you need the following index.cgi in /var/www/projects: | ||
− | This is a perl script and | + | This is a perl script and therefore you need perl installed. |
<pre><nowiki> | <pre><nowiki> | ||
#!/usr/bin/perl | #!/usr/bin/perl | ||
第76行: | 第80行: | ||
or die "Unable to open root directory ($trac_path)"; | or die "Unable to open root directory ($trac_path)"; | ||
</nowiki></pre> | </nowiki></pre> | ||
− | You can now create new | + | You can now create new projects using trac-admin like described on [http://trac.edgewall.org/wiki/TracAdmin]. |
If you would like to use the latest version of Trac (right now 0.11), you can get the version from subversion using: | If you would like to use the latest version of Trac (right now 0.11), you can get the version from subversion using: | ||
<pre><nowiki> | <pre><nowiki> |
2009年5月12日 (二) 19:08的版本
Trac is an enhanced wiki and issue tracking system for software development projects. Trac uses a minimalistic approach to web-based software project management. Our mission is to help developers write great software while staying out of the way. Trac should impose as little as possible on a team's established development process and policies.
Dependencies
For the installation of Trac we need Python, as well as Apache and Subversion. Therefor install apache2 and Subversion. Trac is programmed in Python and therefor a module for the usage of python in apache is required. Since Python 2.5 and apache play well together using the mod-python, we are going to use it for the following installation as well.
apt-get install libapache2-mod-python apt-get install python-setuptools
You may have to stop your apache2 server before trying to install libapache2-mod-python:
/etc/init.d/apache2 stop
Installation
To install Trac, we can now just use the version in the repository by typing:
apt-get install trac
For the usage of multiple projects in trac, you can define the apahe-configuration file (/etc/apache2/conf.d/trac.conf) as follows:
# Trac static content Alias /trac "/usr/share/trac/htdocs" <Directory "/usr/share/trac/htdocs"> Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all </Directory> # Trac project directory (for project listing) <Directory "/var/www/projects"> AllowOverride None Options Indexes +ExecCGI MultiViews FollowSymLinks AddHandler cgi-script .cgi Order allow,deny Allow from all </Directory> # use the following for one authorization for all projects <LocationMatch "/projects/[[:alnum:]]+/login"> AuthType Basic AuthName "trac" AuthUserFile /etc/apache2/htpasswd Require valid-user </LocationMatch> <Location /projects> SetHandler mod_python PythonInterpreter main_interpreter PythonHandler trac.web.modpython_frontend PythonOption TracEnvParentDir /var/trac PythonOption TracUriRoot /projects </Location>
Furthermore, for a project listing, you need the following index.cgi in /var/www/projects: This is a perl script and therefore you need perl installed.
#!/usr/bin/perl use strict; my $trac_path = "/var/trac"; my $trac_location = "/projects"; my $projectAvailable = "false"; # Send header print "Content-Type: text/html\n\n"; # Send content print "<html>\n"; print " <head>\n"; print " <title>Project listing</title>\n"; print " </head>\n\n"; print " <body>\n"; print " <h1>Project listing</h1>\n"; print " <ul id=\"trac\">\n"; opendir(ROOT, $trac_path) or die "Unable to open root directory ($trac_path)";
You can now create new projects using trac-admin like described on [1]. If you would like to use the latest version of Trac (right now 0.11), you can get the version from subversion using:
svn co https://svn.edgewall.org/repos/trac/trunk trac
To install this version, use:
cd trac python setup.py install --prefix=/usr