博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
27.2. Trac
阅读量:6678 次
发布时间:2019-06-25

本文共 6533 字,大约阅读时间需要 21 分钟。

http://trac.edgewall.org/

[root@development ~]# yum install python-setuptools[root@development ~]# easy_install Trac[root@development ~]# trac-admin /var/www/myproject initenv

27.2.1. trac.ini

subversion 仓库配置

vim /srv/example/conf/trac.inirepository_dir = /svnroot/example.com

27.2.2. standalone

tracd -s --port 8000 /var/www/myproject

multiple projects

tracd --port 8000 /var/www/trac/project1/ /var/www/trac/project2 ...ortracd --port 8000 -e /var/www/trac/

27.2.3. Using Authentication

Using Authentication

To create a .passwd file using htdigest:

htdigest -c /var/www/trac/.passwd localhost neo

then for additional users:

htdigest /var/www/trac/.passwd localhost netkiller

bind ip

tracd -d --host 192.168.3.9 --port 8000 --auth=*,/srv/trac/.passwd,localhost -e /srv/trac

$ tracd -p 8080 \   --auth=project1,/path/to/users.htdigest,mycompany.com \   --auth=project2,/path/to/users.htdigest,mycompany.com \   /path/to/project1 /path/to/project2tracd -p 8000 \   --auth=*,/var/www/trac/.passwd,localhost \   -e /var/www/trac/

27.2.4. trac-admin

# trac-admin /srv/example helptrac-admin - The Trac Administration Console 0.12.3Usage: trac-admin  [command [subcommand] [option ...]]Invoking trac-admin without command starts interactive mode.help                 Show documentationinitenv              Create and initialize a new environmentattachment add       Attach a file to a resourceattachment export    Export an attachment from a resource to a file or stdoutattachment list      List attachments of a resourceattachment remove    Remove an attachment from a resourcechangeset added      Notify trac about changesets added to a repositorychangeset modified   Notify trac about changesets modified in a repositorycomponent add        Add a new componentcomponent chown      Change component ownershipcomponent list       Show available componentscomponent remove     Remove/uninstall a componentcomponent rename     Rename a componentconfig get           Get the value of the given option in "trac.ini"config remove        Remove the specified option from "trac.ini"config set           Set the value for the given option in "trac.ini"deploy               Extract static resources from Trac and all pluginshotcopy              Make a hot backup copy of an environmentmilestone add        Add milestonemilestone completed  Set milestone complete datemilestone due        Set milestone due datemilestone list       Show milestonesmilestone remove     Remove milestonemilestone rename     Rename milestonepermission add       Add a new permission rulepermission list      List permission rulespermission remove    Remove a permission rulepriority add         Add a priority value optionpriority change      Change a priority valuepriority list        Show possible ticket prioritiespriority order       Move a priority value up or down in the listpriority remove      Remove a priority valuerepository add       Add a source repositoryrepository alias     Create an alias for a repositoryrepository list      List source repositoriesrepository remove    Remove a source repositoryrepository resync    Re-synchronize trac with repositoriesrepository set       Set an attribute of a repositoryrepository sync      Resume synchronization of repositoriesresolution add       Add a resolution value optionresolution change    Change a resolution valueresolution list      Show possible ticket resolutionsresolution order     Move a resolution value up or down in the listresolution remove    Remove a resolution valuesession add          Create a session for the given sidsession delete       Delete the session of the specified sidsession list         List the name and email for the given sidssession purge        Purge all anonymous sessions older than the given agesession set          Set the name or email attribute of the given sidseverity add         Add a severity value optionseverity change      Change a severity valueseverity list        Show possible ticket severitiesseverity order       Move a severity value up or down in the listseverity remove      Remove a severity valueticket remove        Remove ticketticket_type add      Add a ticket typeticket_type change   Change a ticket typeticket_type list     Show possible ticket typesticket_type order    Move a ticket type up or down in the listticket_type remove   Remove a ticket typeupgrade              Upgrade database to current versionversion add          Add versionversion list         Show versionsversion remove       Remove versionversion rename       Rename versionversion time         Set version datewiki dump            Export wiki pages to files named by titlewiki export          Export wiki page to file or stdoutwiki import          Import wiki page from file or stdinwiki list            List wiki pageswiki load            Import wiki pages from fileswiki remove          Remove wiki pagewiki rename          Rename wiki pagewiki replace         Replace the content of wiki pages from files (DANGEROUS!)wiki upgrade         Upgrade default wiki pages to current version

27.2.4.1. Permissions

BROWSER_VIEWCHANGESET_VIEWCONFIG_VIEWEMAIL_VIEWFILE_VIEWLOG_VIEWMILESTONE_ADMINMILESTONE_CREATEMILESTONE_DELETEMILESTONE_MODIFYMILESTONE_VIEWPERMISSION_ADMINPERMISSION_GRANTPERMISSION_REVOKEREPORT_ADMINREPORT_CREATEREPORT_DELETEREPORT_MODIFYREPORT_SQL_VIEWREPORT_VIEWROADMAP_ADMINROADMAP_VIEWSEARCH_VIEWTICKET_ADMINTICKET_APPENDTICKET_CHGPROPTICKET_CREATETICKET_EDIT_CCTICKET_EDIT_COMMENTTICKET_EDIT_DESCRIPTIONTICKET_MODIFYTICKET_VIEWTIMELINE_VIEWTRAC_ADMINVERSIONCONTROL_ADMINWIKI_ADMINWIKI_CREATEWIKI_DELETEWIKI_MODIFYWIKI_RENAMEWIKI_VIEW

admin

$ trac-admin /path/to/projenv permission add neo TICKET_ADMIN  TRAC_ADMIN  WIKI_ADMIN

group

$ trac-admin /path/to/projenv permission add admin MILESTONE_ADMIN PERMISSION_ADMIN REPORT_ADMIN ROADMAP_ADMIN TICKET_ADMIN TRAC_ADMIN VERSIONCONTROL_ADMIN WIKI_ADMIN$ trac-admin /path/to/projenv permission add developer WIKI_ADMIN$ trac-admin /path/to/projenv permission add developer REPORT_ADMIN$ trac-admin /path/to/projenv permission add developer TICKET_ADMIN

user

$ trac-admin /path/to/projenv permission add bob developer$ trac-admin /path/to/projenv permission add john developer

27.2.4.2. Resync

# trac-admin /srv/example repository resync '(default)'

旧版本trac: trac-admin /srv/trac/neo resync

Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a>comments powered by
Disqus

原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

你可能感兴趣的文章
cpio
查看>>
浅谈深度学习
查看>>
C++异常安全的赋值运算符重载 【微软面试100题 第五十五题】
查看>>
HDU 3535
查看>>
字符串指针
查看>>
ubuntu设置开机启动项
查看>>
进制与进制转换DAY2
查看>>
orcale 之 SQL 数据查询
查看>>
Unity引擎的Player Settings介绍
查看>>
Windows 更新的下载文件 保存位置
查看>>
[html] Doctype
查看>>
阅读笔记九
查看>>
求解形式幂级数的一阶微分方程
查看>>
life and penis
查看>>
asp.net 源码坊今日更新
查看>>
C#面向对象(四):其他面向对象知识
查看>>
bzoj2539
查看>>
My thoughts after NOIP 2018(1)
查看>>
360 2015校园招聘 第一题
查看>>
Git上传代码的步骤
查看>>