TracSetting HowTo
아래 글 보다는 윤지 & 윤형'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인듯. 혹시 모르니 해주자.
일단 아래처럼 넣으면 된다.
<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의 내용을 위에다 합쳐버리면 된다.
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.