个人工具
登录
查看“UbuntuHelp:Trac/zh”的源代码 - Ubuntu中文
UbuntuHelp
讨论
查看源代码
历史
搜索
导航
首页
最近更改
随机页面
页面分类
帮助
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息
查看“UbuntuHelp:Trac/zh”的源代码
来自Ubuntu中文
←
UbuntuHelp:Trac/zh
跳转至:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{From|https://help.ubuntu.com/community/Trac/zh}} {{Languages|UbuntuHelp:Trac}} Trac 是用于软件项目开发的 WIKI 和问题跟踪系统。Trac 是一个基于 web 的软件项目管理,简洁的解决方案。 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. === 依赖 === For the installation of Trac we need Python, as well as Apache and Subversion. Therefor install [[UbuntuHelp:ApacheMySQLPHP|apache2]] and [[UbuntuHelp:SubversionInstall|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. <pre><nowiki> apt-get install libapache2-mod-python 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> === 安装 === 要安装 Trac,我只要敲出下面的命令就可以安装仓库里的版本了: To install Trac, we can now just use the version in the repository by typing: <pre><nowiki> apt-get install trac </nowiki></pre> 而要在使用 Trac 来服务多个项目,你还要在 apache 配置文件 (/etc/apache2/conf.d/trac.conf) 中定义下面一些东西: For the usage of multiple projects in trac, you can define the apahe-configuration file (/etc/apache2/conf.d/trac.conf) as follows: <pre><nowiki> # Trac 静态内容 # 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 项目目录(显示列表) # 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> </nowiki></pre> 还有,要显示项目列表,/var/www/projects 中还需要 index.cgi 文件: Furthermore, for a project listing, you need the following index.cgi in /var/www/projects: 这是一个 perl 脚本,因此需要已安装了 perl。 This is a perl script and therefore you need perl installed. <pre><nowiki> #!/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)"; </nowiki></pre> 你可以使用 trac-admin [http://trac.edgewall.org/wiki/TracAdmin|详情请见]。 You can now create new projects using trac-admin like described on [http://trac.edgewall.org/wiki/TracAdmin]. 如果你想使用最新版的 Trac, 你可以使用下面的命令从 subversion 上获取最新版本: 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> svn co https://svn.edgewall.org/repos/trac/trunk trac </nowiki></pre> To install this version, use: 使用下面的代码来安装这个版本: <pre><nowiki> cd trac python setup.py install --prefix=/usr </nowiki></pre> [[category:UbuntuHelp]]
该页面使用的模板:
模板:From
(
查看源代码
)
模板:Languages
(
查看源代码
)(受保护)
模板:Languages/Lang
(
查看源代码
)(受保护)
返回至
UbuntuHelp:Trac/zh
。