trac/インストールと概要 http://www.ark-web.jp/sandbox/wiki/201.html

trac/インストールと概要

[edit]

trac勉強会

ネタ元は下記です。

[edit]

日時

[edit]

参加者

[edit]

動画

[edit]

tracのインストール

yum install trac
yum install python-devel

cd /usr/local/src
wget 'http://downloads.sourceforge.net/pypgsql/pyPgSQL-2.5.1.tar.gz?modtime=1149708827&big_mirror=0'
tar xzf pyPgSQL-2.5.1.tar.gz
cd pyPgSQL-2.5.1
python setup.py build
python setup.py install

wget 'http://www.egenix.com/files/python/egenix-mx-base-2.0.6.tar.gz'
tar xzf egenix-mx-base-2.0.6.tar.gz
cd egenix-mx-base-2.0.6
python setup.py install
[edit]

tracの設置

[edit]

Subversionの設定

svnadmin create --fs-type fsfs /home/staff/shida/sandbox/trac/bagooon/svn
[edit]

trac用のPostgreSQL用データベースの作成

/usr/bin/createuser -P bagooon
/usr/bin/createdb bagooon
[edit]

tracの環境ディレクトリの作成

trac-admin /home/staff/shida/sandbox/trac/bagooon/trac initenv
# Project Name [My Project]> bagooon
# Database connection string [sqlite:db/trac.db]> postgres://bagooon:bagooon@localhost/bagooon
# Repository type [svn]>
# Path to repository [/path/to/repos]> /home/staff/shida/sandbox/trac/bagooon/svn
# Templates directory [/usr/share/trac/templates]
chmod ugo+w -R log/ attachments/
[edit]

tracのエントリーポイントとなるfcgiスクリプトの設定

fast cgi用のtrac.fcgiをtracという名前でコピー

cp /var/www/cgi-bin/trac.fcgi /home/staff/shida/public_html/sandbox/trac/trac
vi /home/staff/shida/public_html/sandbox/trac/trac

下記を追記

import os
os.environ['TRAC_ENV'] = "/home/staff/shida/sandbox/trac/bagooon/trac"

tracをfcgiで実行されるように設定

cat >> /home/staff/shida/public_html/sandbox/trac/.htaccess <<EOF
<Files trac>
  SetHandler fcgid-script
</Files>
EOF
[edit]

実際みてみる

http://okra.ark-web.jp/~shida/sandbox/trac/trac

[edit]

権限の付与

BASIC認証でアカウントを用意

cat >> /home/staff/shida/public_html/sandbox/trac/.htaccess  <<EOF
 AuthType Basic
 AuthName "bagooon"
 AuthUserFile /home/staff/shida/public_html/sandbox/trac/.htpasswd
 Require valid-user
EOF
htpasswd -c /home/staff/shida/public_html/sandbox/trac/.htpasswd shida
password: 

trac-adminでアカウントごとに権限を設定

trac-admin /home/staff/shida/sandbox/trac/bagooon/trac/ permission add shida TRAC_ADMIN
[edit]

tracの設定

[edit]

ロゴの変更

[header_logo]
alt =
height = -1
link = http://okra.ark-web.jp/~shida/sandbox/trac/trac
src = http://members.jcom.home.ne.jp/meika/maruchan_bagooon_thumb.jpg
width = -1
[edit]

wikiを書き換える

[edit]

Subversionのレポジトリを見る

[edit]

マイルストーンを設定してみる

tag: trac, 勉強会


トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2007-03-16 (金) 19:46:20 (6249d)

アークウェブのサービスやソリューションはこちら