created by Aha00aAha00a at 2009-10-21
last modified by Aha00aAha00a at 2009-10-21
revision: 1

아래 글 보다는 윤지 & 윤형's House - Ubuntu 9.04에서 Subversion + Trac 설치하기를 참조하는게 낫다.

1. Linux

1.1. 설치

간단히 apt-get으로 패키지를 받을 수 있다. 관련 패키지들도 자동으로 받아준다.

1.2. tracd를 이용해서 standalone으로 띄우기

$ tracd -p 2314 ~/trac/
$ tracd -p 2314 --basic-auth *,trac/trac.htpasswd,* ~/trac/

see also htpasswd

1.3. 나에게 관리자 권한을 내리노라.

$ trac-admin .
Trac [/home/aha00a/trac]> permission add aha00a TRAC_ADMIN

1.4.1. mod_python

# apt-get install libapache2-mod-python libapache2-mod-python-doc
# a2enmod mod_python
This module is already enabled!
# _

호오.. 설치만 하면 기본적으로 enable인듯. 혹시 모르니 해주자.

1.4.2. Apache 설정파일 수정

일단 아래처럼 넣으면 된다.

<Location /trac>
        SetHandler mod_python
        PythonInterpreter main_interpreter
        PythonHandler trac.web.modpython_frontend
        PythonOption TracEnv /home/aha00a/trac
        PythonOption TracUriRoot /trac
</Location>
<Location /trac/login>
        AuthType Basic
        AuthName "AhaTrac"
        AuthUserFile /home/aha00a/trac/trac.htpasswd
        Require valid-user
</Location>

만약 anonymous는 못보게 하려면 간단히 하래 Location /trac/login의 내용을 위에다 합쳐버리면 된다.

1.4.3. Apache Daemon Restart

# service apache2 restart

2. Windows

2.1. 설치

  • TOW (Trac On Windows)를 이용하는 방법 - 내 입맛에는 맞지 않다.
  • 직접설치
    • python-2.4.4.msi - 2.5를 설치하면 clearsilver가 2.5를 지원하지 못한다.
    • Trac-0.11.1.win32.exe
    • cliersilver.0.9.14.win32-py2.4.exe
    • setuptools-0.6.c8.win32-py2.4.exe
    • svn-python-1.4.5.win32-py2.4.exe

2.2. tracd를 이용해서 standalone으로 띄우기

2.2.1. 인증이 필요없고 일단 띄우고 싶을 때

C:\Python24\Scripts\tracd -p 8080 c:\TracRepository

2.2.2. 사용자 인증을 하고 싶을 때

2.2.2.1. trac-digest.py 를 만든다.
from optparse import OptionParser
# The md5 module is deprecated in Python 2.5
try:
    from hashlib import md5
except ImportError:
    from md5 import md5

# build the options
usage = "usage: %prog [options]"
parser = OptionParser(usage=usage)
parser.add_option("-u", "--username",action="store", dest="username", type = "string",
                  help="the username for whom to generate a password")
parser.add_option("-p", "--password",action="store", dest="password", type = "string",
                  help="the password to use")
(options, args) = parser.parse_args()

# check options
if (options.username is None) or (options.password is None):
   parser.error("You must supply both the username and password")

# Generate the string to enter into the htdigest file
realm = 'trac'
kd = lambda x: md5(':'.join(x)).hexdigest()
print ':'.join((options.username, realm, kd([options.username, realm, options.password])))
2.2.2.2. password.txt를 만든다.
C:\Python24\Scripts\trac-digest.py -u "ID" -p "PASSWORD" >> passwords.txt
2.2.2.3. 실행
C:\Python24\Scripts\tracd -p 8080 --auth=*,C:\TracRepository\passwords.txt,* c:\TracRepository

3. See Also

3.2. Similar Pages

Similar pages by cosine similarity. Words after page name are term frequency.

  • 49.73% TracSetting trac(33:25), org(1:12), mod(9:1), setting(2:5), name(1:5), 이용해서(4:1), add(3:2), from(3:2), wiki(1:4), how(2:1)
  • 41.91% AhaTracVim trac(33:14), python(16:1), wiki(1:5), aha00a(4:1), py(3:2), aha(1:3), 권한을(2:1), main(1:2), 이용하는(1:1)
  • 36.31% ApacheRewrite trac(33:8), mod(9:2), apache(6:4), aha00a(4:6), location(5:4), ubuntu(3:1), 일단(3:1), how(2:1), module(2:1), web(1:2)
  • 32.87% Trac trac(33:9), windows(3:1), setting(2:1), org(1:2), svn(1:2), web(1:2), wiki(1:2), 받을(1:1), 있다(1:1)

3.3. Adjacent Pages

≤ 32
all
1.0x
1.0x
80
-120
ON
0/0
0/0
0.00
0
0 / 0
1.00x