Debian下安装Trac,并配置使用Hg

Debian下安装Trac,并配置使用Hg

安装:

apt-get install trac
apt-get install trac-mercurial


建立Trac项目:

trac-admin /path/to/projectenv initenv

 

提示版本控制系统类型时输入hg而不是Mercurial
接着会询问版本库的位置,直接输入绝对路即可

启用trac-mercurial插件:

在/path/to/projectenv/conf/trac.ini里添加以下内容:

[components]
tracext.hg.* = enabled



部署到Apache:

生成部署目录:

trac-admin projectenv/ deploy trac-deploy

增加Apache配置文件:

WSGIScriptAlias /trac /path/to/trac-deploy/cgi-bin/trac.wsgi
<Directory "/path/to/trac-deploy/cgi-bin/">
Order Deny,Allow
Allow from all
</Directory>

<Location /trac/login>
AuthType Basic
AuthName "Trac Site 1"
AuthUserFile /path/to/trac-deploy/trac.htpasswd
Require valid-user
</Location>

ErrorLog /var/log/apache2/trac_error.log
LogLevel warn
CustomLog /var/log/apache2/trac_access.log combined


创建用户:

htpasswd -c trac.htpasswd username
htpasswd trac.htpasswd username


汉化:

获得汉化文件:svn co http://trac-hacks.org/svn/zoomquiettranslation/trunk/0.11.x

trac-admin /path/to/projectenv wiki load 0.11.x/default-pages


将0.11.xZhTracGuideToc.py 文件拷到 /path/to/projectenv/plugins 目录下
最后向 /path/to/projectenv/conf/trac.ini 增加以下内容。

[mainnav]
wiki.href = /wiki/ZhWikiStart

[metanav]
help.href = /wiki/ZhTracGuide



参考资料:
http://svn.debian.org/viewsvn/python-apps/packages/trac/trunk/debian/README.Debian?view=markup
https://code.google.com/p/modwsgi/wiki/IntegrationWithTrac
http://trac.edgewall.org/wiki/TracMercurial
http://trac.edgewall.org/wiki/TracIni
http://book.chinaz.com/docs/apache/2_2/programs/htpasswd.html
http://www.chenwang.net/2009/11/25/windows-%E4%B8%8B%E5%AE%89%E8%A3%85-trac%EF%BC%8C%E5%B9%B6%E9%85%8D%E7%BD%AE%E4%BD%BF%E7%94%A8mercurial-hg/

posted on 2010-08-08 16:32  ddper  阅读(422)  评论(0编辑  收藏  举报

导航