配置 Trac(2)

创建以下目录

mkdir tmpsvn mkdir tmpsvn/simba mkdir tmpsvn/simba/branches (keep track of major forks in the code) mkdir tmpsvn/simba/tags (snapshots of an entire source tree are here) mkdir tmpsvn/simba/trunk (your first imported source code tree)

创建 svn 并且导入源代码

svnadmin create /srv/svn svn import tmpsvn/ file:///srv/svn -m "Initial import"

修改 trac 时需要的文件

vi /srv/trac/conf/trac.ini vi /srv/trac/templates/site_footer.cs vi /srv/trac/templates/site_header.cs vi /usr/share/trac/templates/header.cs vi /usr/share/trac/templates/wiki.cs vi /usr/share/trac/templates/footer.cs vi /usr/share/trac/htdocs/css/trac.cs

在 trac 代码中删除 “about and help/guide, search” 导航

vi /usr/lib/python2.4/site-packages/trac/web/chrome.py (close to the bottom) items.sort(navcmp) ----------------------------------------- # remove navigation items, see trac:#4191 itemsdup = list(items) for name,label in itemsdup: if ('-' + name) in order: items.remove((name,label)) ----------------------------------------- for name, text in items:

删除trac wiki里一些不必要的导航

vi /srv/trac/conf/trac.ini mainnav = wiki,-timeline,-roadmap,browser,-tickets,-newticket,search metanav = login,logout,-settings,-help,-about 数据备份

最后提一下备份,备份 mysql, trac 和 subversion

mysqldump -u bang -p trac > sb_sql_20070601 trac-admin /srv/trac hotcopy ./sb_trac-20070601 tar cvf sb_trac-20070601.tar sb_trac-20070601 gzip sb_trac-20070601.tar.gz svnadmin dump /srv/svn > sb_svn-20070601

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/ppgsd.html