trac/インストール、設置、プラグインのインストール、そのほか初期設定まで http://www.ark-web.jp/sandbox/wiki/230.html

trac/インストール、設置、プラグインのインストール、そのほか初期設定まで

tracのセットアップってホント面倒! [sad]
いつか全部自動化したる!

[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]

Subversionの設定

svnadmin create --fs-type fsfs /svnroot/projects/hogehoge

Subversionのリモートからのアクセス用アカウントの作成
useradd -u 5001 -g staff -d /svnroot/projects/hogehoge hogehoge
chown -R hogehoge:staff /svnroot/projects/hogehoge
chmod -R g+w /svnroot/projects/hogehoge
[edit]

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

sudo -u postgres /usr/bin/createuser -P hogehoge
sudo -u postgres /usr/bin/createdb hogehoge_trac
[edit]

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

trac-admin /var/www/projects/h/hogehoge/trac initenv
# Project Name [My Project]> Hogehoge
# Database connection string [sqlite:db/trac.db]> postgres://hogehoge:password@localhost/hogehoge_trac
# Repository type [svn]>
# Path to repository [/path/to/repos]> /svnroot/projects/hogehoge
# Templates directory [/usr/share/trac/templates]
chown -R hogehoge:staff /var/www/projects/h/hogehoge/trac
chmod -R g+w /var/www/projects/h/hogehoge/trac
chmod  ugo+w trac/attachments
chmod  ugo+w trac/plugins
[edit]

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

cp /var/www/cgi-bin/trac.fcgi /var/www/projects/h/hogehoge/htdocs/trac
vi trac
/-----------------------
+ import os
+ os.environ['TRAC_ENV'] = "/var/www/projects/h/hogehoge/trac"
+ 
/-----------------------
 try:
cat > .htaccess <<EOF
<Files trac>
 SetHandler fcgid-script
</Files>
EOF
[edit]

ロゴの変更

vi conf/trac.ini
[header_logo]
alt = project [Hogehoge]
height = -1
link = http://hogehoge.ark-web.jp/trac/
src = http://hogehoge.ark-web.jp/images/logo.jpg
width = -1
[edit]

setuptoolsのインストール

cd /usr/local/src/
wget http://peak.telecommunity.com/dist/ez_setup.py
python ez_setup.py
[edit]

WebAdmin Pluginのインストール

svn export http://svn.edgewall.com/repos/trac/sandbox/webadmin/
cd webadmin/
python setup.py bdist_egg
cp dist/TracWebAdmin-0.1.1dev-py2.4.egg /var/www/projects/h/hogehoge/trac/plugins
vi /var/www/projects/h/hogehoge/trac/conf/trac.ini
//---------------------
[components]
webadmin.* = enabled
//---------------------
chmod ugo+w trac/conf/trac.ini
trac-admin /var/www/projects/h/hogehoge/trac  permission add yourname TRAC_ADMIN
sudo -u root /etc/init.d/httpd restart
[edit]

プライオリティとか、チケットタイプ、マイルストーンなどの変更

[edit]

プライオリティ

[edit]

チケットタイプ

[edit]

TagsPluginのインストール

svn export http://trac-hacks.org/svn/tagsplugin/tags/0.4.1/ tagsplugin
cd tagsplugin
python setup.py bdist_egg
cp dist/TracTags-0.4.1-py2.4.egg /var/www/projects/h/hogehoge/trac/plugins/
vi /var/www/projects/h/hogehoge/trac/conf/trac.ini
//-----------------以下追加--------------------------------
[components]
trac.wiki.web_ui.wikimodule = disabled
tractags.* = enabled
//-----------------以下修正
[trac]
default_handler = TagsWikiModule
//-----------------------------------------------------
trac-admin /var/www/projects/h/hogehoge/trac upgrade  --no-backup
sudo -u root /etc/init.d/httpd restart
[edit]

TimeAndEstimationPluginのインストール

svn export http://trac-hacks.org/svn/timingandestimationplugin/branches/trac0.10 timingandestimationplugin
cd timingandestimationplugin
python setup.py bdist_egg
cp dist/timingandestimationplugin-0.4.9-py2.4.egg /var/www/projects/h/hogehoge/trac/plugins/
vi /var/www/projects/h/hogehoge/trac/conf/trac.ini
//-----------------以下追加--------------------------------
[components]
timingandestimationplugin.* = enabled
//---------------------------------------------------------
trac-admin /var/www/projects/h/hogehoge/trac upgrade  --no-backup
sudo -u root /etc/init.d/httpd restart
# 参考) http://ameblo.jp/itboy/entry-10042021977.html
psql -U hogehoge hogehoge_trac
psql> alter sequence report_id_seq restart 18;
[edit]

レポートの作成

投稿者志田 | パーマリンク

| append.gif

tag: trac


トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2008-03-06 (木) 10:32:39 (5894d)

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