博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
1.2. CentOS 安装
阅读量:7073 次
发布时间:2019-06-28

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

http://trac.edgewall.org/

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

1.2.1. trac.ini

subversion 仓库配置

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

1.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/

1.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/

1.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
1.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
1.2.4.2. Resync
# trac-admin /srv/example repository resync '(default)'

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

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

你可能感兴趣的文章
ASP.Net MVC开发基础学习笔记(1):走向MVC模式
查看>>
虚函数可不可以是内联函数
查看>>
据说看完这21个故事的人,30岁前都成了亿万富翁
查看>>
HDOJ-4505 小Q系列故事——电梯里的爱情
查看>>
【转】Navigation Drawer(导航抽屉)
查看>>
Linux Shell常用技巧(十)
查看>>
【从零之三(更)】自定义类中调用讯飞语音包错误解决办法
查看>>
【源代码】LinkedHashMap源代码剖析
查看>>
Android InputStream转Bitmap
查看>>
记录水电系统开发的心理【1】
查看>>
【Html5】-- 塔台管制
查看>>
WiFi万能钥匙蹭网原理详细剖析
查看>>
浅谈JavaScript中的继承
查看>>
蜂鸟运单系统架构及实现
查看>>
Lambda表达式(Java)
查看>>
Docker Registry Server 搭建,配置免费HTTPS证书,及拥有权限认证、TLS 的私有仓库
查看>>
Java 8 并发篇 - 冷静分析 Synchronized(上)
查看>>
在 Node.js 中检测端口 port 是否被占用
查看>>
swift基础学习(九)
查看>>
MPAndroidChart绘制曲线图、柱状图总结
查看>>