Archive for the ‘Trac’ Category

 

trac backup & restore

5月 2nd, 2012

元データ /path/to/my_trac
1. hotcopy
trac-admin /path/to/my_trac hotcopy /path/to/backup_trac
( hotcopyは上書き出来ないので、既にバックアップがある場合、backup_trac.1にしておく。
何世代か残す。)
2. 別サーバーへコピー
普通に、rsync
3. 設置して、動かす
/path/to/new_tracにコピーした場合。
trac-admin /path/to/new_trac upgrade
tracのバージョンアップに対応しておく。
trac用のhttpd.confを/etc/httpd/conf.d/へリンクする
### configtest
Syntax error on line 16 of /etc/httpd/conf.d/trac.conf:
Invalid command ‘DefaultInitEnv’, perhaps misspelled or defined by a module not included in the server configuration
エラーが出た。
http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
mod_fcgidが入っていなかったので yum install mod_fcgid
最後に、権限をapacheに変更
chown -R apache:apache .
httpd restartでOKでした。

Read full article | コメントは受け付けていません。

Trac logoを変える。

4月 25th, 2011

/trac/wiki/TracIni#header_logo-section
conf/trac.ini

[header_logo]
alt = (please configure the [header_logo] section in trac.ini)
height = -1
link =
src = site/gr_logo.png
width = -1

こんな感じで srcにsite以下の画像ファイルを設定
ロゴファイルを
htdocs/site/gr_logo.png
として保存。

Read full article | コメントは受け付けていません。

Trac 0.12 Configuring Authentication

4月 25th, 2011

mod_fcgidの場合はこちらと同じだそうです。
http://trac.edgewall.org/wiki/TracModWSGI#ConfiguringAuthentication
ダイジェスト認証
Using Digest Authentication

# htdigest /home/trac/grrome/trac.htpasswd trac admin

httpd.confの設定

<Location /trac/login>
AuthType Digest
AuthName “trac”
AuthDigestDomain /trac
AuthDigestProvider file
AuthUserFile /home/trac/grrome/trac.htpasswd
Require valid-user
</Location>

adminユーザーを TRAC_ADMINとして追加してみます。

trac-admin /home/trac/grrome permission add admin TRAC_ADMIN

/tracからログインすると /trac以下のページで adminとしてログイン中と表示されました^-^。
完全に /trac/以下にアクセスさせないようにするために
/trac/login は /trac/に変えました。
ログアウトは無くなります。
adminでログイン出来ても仕方ないので、他のIDを作成して adminは htpasswdから削除します。
権限を削除してみる。
http://trac.edgewall.org/wiki/TracPermissions

# trac-admin /home/trac/grrome permission remove admin TRAC_ADMIN

adminの管理ページは、「利用可能な管理画面はありません」と表示されました。
digest認証から adminを削除
trac.htpasswdからadminの行を削除しました。
当然ログインできません。
後はadminの代わりのユーザーを作成して完了です!

Read full article | コメントは受け付けていません。

trac 0.12 fastcgi(mod_fcgid)

4月 25th, 2011

めちゃくちゃ疲れた。。。 実行権限に3時間・・・
http://trac.edgewall.org/wiki/TracFastCgi#setupwithmod_fcgid
http://trac.edgewall.org/wiki/TracInstall
ほぼここを参考にするだけです。
mod_fcgidをインストール
# yum install mod_fcgid
前回作ったプロジェクトをデプロイ(cgiとか作成)
# trac-admin /home/trac/grrome/ deploy /tmp/deploy
# mv /tmp/deploy/* /home/trac/grrome/

mkdir -p /usr/share/trac/projects/my-project
trac-admin /usr/share/trac/projects/my-project initenv
trac-admin /usr/share/trac/projects/my-project deploy /tmp/deploy
mv /tmp/deploy/* /usr/share/trac

apacheの設定
conf.d/trac.conf

Listen 80

ServerAdmin webmaster@trac.com
DocumentRoot /home/trac/grrom/htdocs
ServerName trac.com
#SuexecUserGroup apache apache
ErrorLog logs/trac-error_log
CustomLog logs/trac-access_log combined env=!LOCAL_BOT
[...]

Read full article | コメントは受け付けていません。

Trac 0.12 install

4月 25th, 2011

マイルストーンとTodo管理をシンプルに出来るツールを探してみたけど
どちらにしても後で利用するのでTracを入れておく。
http://trac.edgewall.org/wiki/TracInstall
================================================================================
[pysqlite-2.6.3]# yum install python-devel
Installing:
python-devel i386 2.4.3-43.el5 base 3.0 M
python-devel [...]

Read full article | コメントは受け付けていません。