モノノフ日記

普通の日記です

Trac 0.10へプラグインをインストールする

プラグインの詳細はヘルプのTracPluginsに書いてあります。


またtrac-hacksで様々なプラグインが公開されているので必要に応じて入れると吉です。


  1. setuptoolsのインストール

  2. # cd /opt/work
    # wget http://peak.telecommunity.com/dist/ez_setup.py
    # python ./ez_setup.py

  3. WebAdminプラグインのインストール

  4. Webブラウザ経由でTracの設定が行えるようになるプラグイン。これは必須。


    # svn co http://svn.edgewall.com/repos/trac/sandbox/webadmin/ ./webadmin
    # cd /webadmin
    # python ./setup.py bdist_egg
    # cp /webadmin/dist/TracWebAdmin-0.1.2dev_rxxxx-py2.3.egg /home/www/xxx/trac/plugins
    # chown apache:apache /home/www/xxx/trac/plugins/TracWebAdmin-0.1.2dev_rxxxx-py2.3.egg

    /home/www/xxx/trac/conf/trac.iniを編集



    [trac]
    default_charset = UTF-8
    [components]
    webadmin.* = enabled

    Apacheを再起動すると有効になります


    # /sbin/service httpd restart

  5. AccountManagerPluginのインストール

  6. アカウントをWebAdminプラグインで管理できるようにするプラグイン


    # svn co http://trac-hacks.org/svn/accountmanagerplugin/trunk ./accmgr
    # cd accmgr
    # python ./setup.py bdist_egg
    # cp dist/TracAccoutManager-0.1.2dev_rxxxx-py2.3.egg /home/www/xxx/trac/plugins
    # chown apache:apache /home/www/xxx/trac/plugins/TracAccoutManager-0.1.2dev_rxxxx-py2.3.egg

    /home/www/xxx/trac/conf/trac.iniを編集



    [account-manager]
    password_format = htpasswd
    password_file = /home/www/xxx/.htpasswd

  7. TracGanttのインストール

  8. 発行したチケットをガントチャートで表示可能にするプラグイン


    # wget http://willbarton.com/files/TracGantt-0.3.2a-py2.3.egg # 最新版はホームページで要チェック
    # cp TracGantt-0.3.2a-py2.3.egg /home/www/xxx/trac/plugins
    # chown apache:apache /home/www/xxx/trac/plugins/TracGantt-0.3.2a-py2.3.egg

    /home/www/xxx/trac/conf/trac.iniを編集



    [ticket-custom]
    due_assign = text
    due_assign.label = Due to assign
    due_assign.value = DD/MM/YYYY

    dependencies = text
    dependencies.label = Dependencies
    dependencies.value =

    due_close= text
    due_close.label = Due to close
    due_close.value = DD/MM/YYYY

    include_gantt = checkbox
    include_gantt.label = Include in GanttChart
    include_gantt.value =

    [gantt-charts]
    # The format of dates entered by humans in the above ticket fields
    date_format = %m/%d/%Y

    # Include the ticket summary in the gantt chart display
    include_summary = true

    # Trim the included summary to the given number of characters
    summary_length = 16

    # Use the creation date of a ticket as the "due assign" date if no
    # assignment date is given
    use_creation_date = true

    # Show on the gantt chart the date the ticket was opened, to contrast
    # with the assignment date.
    show_opened = true

    [components]
    tracgantt.* = enabled # tracの標準フォルダ(i.e. /usr/share/trac/plugins)の外にプラグインを置いている場合に必要な設定


  9. Graphvizpluginのインストール

  10. # yum install graphviz graphviz-doc graphviz-graph
    # svn co http://trac-hacks.org/svn/graphvizplugin/0.9/ ./graphvizplugin
    # cd graphvizplugin
    # python ./setup.py bdist_egg
    # cp dist/graphviz-0.6.7-py2.3.egg /home/www/xxx/trac/plugins
    # chown apache:apache /home/www/xxx/trac/plugins/graphviz-0.6.7-py2.3.egg

    /home/www/xxx/trac/conf/trac.iniを編集



    [components]
    graphviz.* = enabled

    [graphviz]
    cache_dir = /home/www/xxx/trac/graphviz # webサーバーから参照できる所ならどこでもOK
    cache_manager = yes
    cache_max_count = 2000
    cache_max_size = 10000000
    cache_min_count = 1500
    cache_min_size = 5000000
    default_graph_fontname = "Andale Mono"
    default_graph_fontsize = 10
    png_antialias = true
    rsvg_path = /usr/bin/rsvg