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

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

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

172.2.1. trac.ini

subversion 仓库配置

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

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

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

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

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

原文出处:Netkiller 系列 手札

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

你可能感兴趣的文章
Linux signal 那些事儿(2)【转】
查看>>
InfluxDB安装及配置
查看>>
Dynamics CRM Microsoft SQL Server 指定的数据库具有更高的版本号
查看>>
PAT Perfect Sequence (25)
查看>>
java.exe进程来源排查录
查看>>
点滴记录——Ubuntu 14.04中Solr与Tomcat整合安装
查看>>
C++实现KMP模式匹配算法
查看>>
ubuntu linux下建立stm32开发环境: GCC安装以及工程Makefile建立
查看>>
记录锁
查看>>
JSONObject与JSONArray的使用
查看>>
[SQL Server] 数据库日志文件自动增长导致连接超时的分析
查看>>
<html:form>标签
查看>>
除了《一无所有》,我一无所有
查看>>
每日英语:China Seeks to Calm Anxiety Over Rice
查看>>
C++中struct和class的区别 [转]
查看>>
C++ ofstream和ifstream详细用法
查看>>
Mysql 连接查询 Mysql支持的连接查询有哪些
查看>>
Hive Streaming 追加 ORC 文件
查看>>
打开Apache自带的Web监视器
查看>>
eclipse插件
查看>>