Chinaunix首页 | 论坛 | 博客
  • 博客访问: 265234
  • 博文数量: 74
  • 博客积分: 1470
  • 博客等级: 上尉
  • 技术积分: 793
  • 用 户 组: 普通用户
  • 注册时间: 2008-11-25 21:01
文章分类

全部博文(74)

文章存档

2011年(1)

2010年(32)

2009年(32)

2008年(9)

我的朋友

分类: LINUX

2009-07-25 16:55:50

trac 是一个用 Python 编写的相当好的 Issue trace 工具。提供了如下的功能:

  • 增强的 Wiki
  • Issue Trace
  • Bugs 报告
  • 项目任务
  • 性能要求
  • Timeline 功能
  • Subversion 仓库浏览
  • 更改源码
trac安装过程如下:

1. 安装trac
sudo apt-get install trac
sudo apt-get install libapache2-mod-python


2. 创建trac项目环境
sudo mkdir /home/xulei/trac
sudo trac-admin /home/xulei/trac/myproject initenv

Creating a new Trac environment at /home/xulei/trac/myproject

Trac will first ask a few questions about your environment
in order to initalize and prepare the project database.

Please enter the name of your project.
This name will be used in page titles and descriptions.

Project Name [My Project]> myproject # 输入项目名称

Please specify the connection string for the database to use.
By default, a local SQLite database is created in the environment
directory. It is also possible to use an already existing
PostgreSQL database (check the Trac documentation for the exact
connection string syntax).

Database connection string [sqlite:db/trac.db]> # 使用默认的 SQLite 数据库,直接回车即可

Please specify the absolute path to the project Subversion repository.
Repository must be local, and trac-admin requires read+write
permission to initialize the Trac database.

Path to repository [/var/svn/test]> /home/xulei/svn/repo # 输入 svn仓库的路径

Please enter location of Trac page templates.
Default is the location of the site-wide templates installed with Trac.

Templates directory [/usr/share/trac/templates]> # 使用默认的 Trac page templates,直接回车即可

Creating and Initializing Project
Configuring Project
trac.repository_dir
trac.database
trac.templates_dir
project.name
Installing default wiki pages
/usr/share/trac/wiki-default/TracReports => TracReports
/usr/share/trac/wiki-default/TracModPython => TracModPython
/usr/share/trac/wiki-default/TracNotification => TracNotification
/usr/share/trac/wiki-default/RecentChanges => RecentChanges
/usr/share/trac/wiki-default/TracRoadmap => TracRoadmap
/usr/share/trac/wiki-default/WikiDeletePage => WikiDeletePage
/usr/share/trac/wiki-default/TracChangeset => TracChangeset
/usr/share/trac/wiki-default/TracEnvironment => TracEnvironment
/usr/share/trac/wiki-default/TracFastCgi => TracFastCgi
/usr/share/trac/wiki-default/WikiMacros => WikiMacros
/usr/share/trac/wiki-default/TracLogging => TracLogging
/usr/share/trac/wiki-default/TracAccessibility => TracAccessibility
/usr/share/trac/wiki-default/TracTicketsCustomFields => TracTicketsCustomFields
/usr/share/trac/wiki-default/WikiHtml => WikiHtml
/usr/share/trac/wiki-default/WikiStart => WikiStart
/usr/share/trac/wiki-default/WikiPageNames => WikiPageNames
/usr/share/trac/wiki-default/WikiRestructuredText => WikiRestructuredText
/usr/share/trac/wiki-default/CamelCase => CamelCase
/usr/share/trac/wiki-default/TracTickets => TracTickets
/usr/share/trac/wiki-default/TracSupport => TracSupport
/usr/share/trac/wiki-default/TracStandalone => TracStandalone
/usr/share/trac/wiki-default/TracInterfaceCustomization => TracInterfaceCustomization
/usr/share/trac/wiki-default/TracAdmin => TracAdmin
/usr/share/trac/wiki-default/SandBox => SandBox
/usr/share/trac/wiki-default/TracGuide => TracGuide
/usr/share/trac/wiki-default/TracLinks => TracLinks
/usr/share/trac/wiki-default/TracQuery => TracQuery
/usr/share/trac/wiki-default/TracUnicode => TracUnicode
/usr/share/trac/wiki-default/TracUpgrade => TracUpgrade
/usr/share/trac/wiki-default/WikiNewPage => WikiNewPage
/usr/share/trac/wiki-default/TitleIndex => TitleIndex
/usr/share/trac/wiki-default/TracWiki => TracWiki
/usr/share/trac/wiki-default/TracBackup => TracBackup
/usr/share/trac/wiki-default/TracPermissions => TracPermissions
/usr/share/trac/wiki-default/TracImport => TracImport
/usr/share/trac/wiki-default/TracInstall => TracInstall
/usr/share/trac/wiki-default/TracPlugins => TracPlugins
/usr/share/trac/wiki-default/TracSyntaxColoring => TracSyntaxColoring
/usr/share/trac/wiki-default/TracTimeline => TracTimeline
/usr/share/trac/wiki-default/WikiRestructuredTextLinks => WikiRestructuredTextLinks
/usr/share/trac/wiki-default/TracBrowser => TracBrowser
/usr/share/trac/wiki-default/TracCgi => TracCgi
/usr/share/trac/wiki-default/TracIni => TracIni
/usr/share/trac/wiki-default/TracRss => TracRss
/usr/share/trac/wiki-default/WikiFormatting => WikiFormatting
/usr/share/trac/wiki-default/TracSearch => TracSearch
/usr/share/trac/wiki-default/WikiProcessors => WikiProcessors
Indexing repository

---------------------------------------------------------------------
Project environment for 'myproject' created.
If you'd like to take this new project environment for a test drive,
try running the Trac standalone web server `tracd`:

tracd --port 8000 /home/xulei/trac/myproject

Then point your browser to
There you can also browse the documentation for your installed
version of Trac, including information on further setup (such as
deploying Trac to a real web serve

3. 配置apache2

<Location /trac>
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracEnv /home/xulei/trac
SetEnv PYTHON_EGG_CACHE /tmp
PythonOption TracUriRoot /trac
AuthType Basic
AuthName "test's trac"
AuthUserFile /etc/apache2/dav_svn.passwd #使用svn的用户和密码
Require valid-user
</Location>



4. 修改trac环境的权限
sudo chown -R root.www-data /home/xulei/trac/myproject
 
5. 重新启动 Apache
sudo a2enmod mod_python
sudo /etc/init.d/apache2 restart

6. 测试
打开浏览器,输入:
用/etc/apache2/dav_svn.passwd里的用户登录

参考:
搭建apache+svn+trac平台:
http://blog.chinaunix.net/u/20986/showart_469559.html
Install Trac under Ubuntu:
ubuntu下安装trac全过程:
基于Ubuntu构建协作平台之服务器端篇——Trac:
How to setup a Ubuntu development server  - part 2:http://ariejan.net/2006/12/02/how-to-setup-a-ubuntu-development-server-part-2/
阅读(1352) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~