2008/04/17 11:48
[개발/도구들]
apache + trac + svn 으로 기본적인 인증과 사용은 가능하다.
이때 svn 의 authz 규칙 파일을 사용해서 trac 의 연동까지도 가능하다.
여기서는 SVNParentPath 가 /home/svn 이고, 아래에 myproject 와 yourproject 가 각각 있다고 가정한다.
또 관리상의 편의를 위해 svn 과 trac 은 multiple project 로 설정한다.
1. authz 파일 설정하기
/home/svn/authz 파일을 보면,
- [modulename:/some/path] 안에서는 SVNParentPath 밑에 있는 각각의 프로젝트 이름과 그 아래에 있는 디렉토리에서의 권한을 설정할 수 있다.
- 권한을 설정할때, 그룹 앞에는 @를 붙이고 "대상=권한" 의 식으로 표현한다.
이 파일을 svn 과 trac 에서 각각 참조하는 형태로 권한을 연동할 수 있다.
2. svn 과 연동
apache 설정 파일을 열고 다음과 같이 설정한다.
3. trac 과 연동
myproject의 trac.ini 파일을 열고 다음과 같이 설정한다.
이때 svn 의 authz 규칙 파일을 사용해서 trac 의 연동까지도 가능하다.
여기서는 SVNParentPath 가 /home/svn 이고, 아래에 myproject 와 yourproject 가 각각 있다고 가정한다.
또 관리상의 편의를 위해 svn 과 trac 은 multiple project 로 설정한다.
1. authz 파일 설정하기
/home/svn/authz 파일을 보면,
[groups]
kindofme=me
kindofyou=you,yours
[myproject:/]
*=r
@kindofme=rw
me=rw
[yourproject:/]
@kindofme=rw
@kindofyou=r
friends=r
me=rw
[yourproject:/trunk]
*=
@kindofyou=rw
- [groups] 안에서는 사용자와 그룹을 매핑시킬수 있다.kindofme=me
kindofyou=you,yours
[myproject:/]
*=r
@kindofme=rw
me=rw
[yourproject:/]
@kindofme=rw
@kindofyou=r
friends=r
me=rw
[yourproject:/trunk]
*=
@kindofyou=rw
- [modulename:/some/path] 안에서는 SVNParentPath 밑에 있는 각각의 프로젝트 이름과 그 아래에 있는 디렉토리에서의 권한을 설정할 수 있다.
- 권한을 설정할때, 그룹 앞에는 @를 붙이고 "대상=권한" 의 식으로 표현한다.
이 파일을 svn 과 trac 에서 각각 참조하는 형태로 권한을 연동할 수 있다.
2. svn 과 연동
apache 설정 파일을 열고 다음과 같이 설정한다.
<Location /svn>
DAV svn
SVNParentPath /home/svn
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /path/to/htpasswd.file
AuthzSVNAccessFile /home/svn/authz
Require valid-user
</Location>
DAV svn
SVNParentPath /home/svn
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /path/to/htpasswd.file
AuthzSVNAccessFile /home/svn/authz
Require valid-user
</Location>
3. trac 과 연동
myproject의 trac.ini 파일을 열고 다음과 같이 설정한다.
[trac]
authz_file=/home/svn/authz
authz_module_file= myproject
yourprojcet 도 마찬가지로 설정한다.authz_file=/home/svn/authz
authz_module_file= myproject
2008/04/16 15:01
[개발/도구들]
http://trac-hacks.org/wiki << 왼쪽 사이트에서 많은 trac 플러그인을 버전별로 찾을 수 있다.
그중 쓸만한 것들을 설치하는 법을 소개한다.
<Account Manger Plugins>
http://trac-hacks.org/wiki/AccountManagerPlugin
플러그인을 설치하고, 관리자 페이지에서 Ht로 시작하는 module 을 제외하고 모두 enable 시킨다.
웹페이지를 통해 로그인하게 하려면, trac.ini 파일을 아래와 같이 편집한다.
htpasswd를 사용하는 경우에는 관리자 페이지에서 HtPasswdStore 를 활성화 시키고, 아래와 같이 편집한다.
htpasswd 파일과 그 디렉토리에는 아래와 같이 권한을 주어야 한다.
또한 apache 설정에서 trac 에 로그인 하는 부분을 지워야 한다.
<SilverCity>
SilverCity 는 플러그인이 아니지만, 외부 모듈로써 trac wiki 에서 Syntax Highlighting 을 지원해준다.
우선 설치하려면 SilverCity를 다운받고 아래와 같이 설치한다.
<WikiCalendar>
http://trac-hacks.org/wiki/WikiTicketCalendarMacro
<TocMacro>
http://trac-hacks.org/wiki/TocMacro
그중 쓸만한 것들을 설치하는 법을 소개한다.
<Account Manger Plugins>
http://trac-hacks.org/wiki/AccountManagerPlugin
플러그인을 설치하고, 관리자 페이지에서 Ht로 시작하는 module 을 제외하고 모두 enable 시킨다.
웹페이지를 통해 로그인하게 하려면, trac.ini 파일을 아래와 같이 편집한다.
[components]
trac.web.auth.LoginModule = disabled
acct_mgr.web_ui.LoginModule = enabled
acct_mgr.web_ui.RegistrationModule = disabled
htpasswd를 사용하는 경우에는 관리자 페이지에서 HtPasswdStore 를 활성화 시키고, 아래와 같이 편집한다.
[components]
; be sure to enable the component
acct_mgr.htfile.HtPasswdStore = enabled
[account-manager]
; configure the plugin to store passwords in the htpasswd format:
password_format = htpasswd
; with Trac 0.10 use this instead:
password_store = HtPasswdStore
; the file where user accounts are stored
; the webserver will need write permissions to this file
; and its parent folder
password_file = /var/trac/trac.htpasswd
; be sure to enable the component
acct_mgr.htfile.HtPasswdStore = enabled
[account-manager]
; configure the plugin to store passwords in the htpasswd format:
password_format = htpasswd
; with Trac 0.10 use this instead:
password_store = HtPasswdStore
; the file where user accounts are stored
; the webserver will need write permissions to this file
; and its parent folder
password_file = /var/trac/trac.htpasswd
htpasswd 파일과 그 디렉토리에는 아래와 같이 권한을 주어야 한다.
chown -R www-data.www-data /path
또한 apache 설정에서 trac 에 로그인 하는 부분을 지워야 한다.
<LocationMatch "/[^/]+login">
# ...
</LocationMatch>
# ...
</LocationMatch>
<SilverCity>
SilverCity 는 플러그인이 아니지만, 외부 모듈로써 trac wiki 에서 Syntax Highlighting 을 지원해준다.
우선 설치하려면 SilverCity를 다운받고 아래와 같이 설치한다.
aptitude install python-dev
tar xvzf SilverCity-x.x.x.tar.gz
cd SilverCity-x.x.x
python setup.py build
python setup.py install
/sbin/ldconfig
이제 trac wiki 에서 다음과 같이 입력해보자.tar xvzf SilverCity-x.x.x.tar.gz
cd SilverCity-x.x.x
python setup.py build
python setup.py install
/sbin/ldconfig
{{{
#!c
int main(int argc, char *argv[])
{
printf("Hello World\n");
return 0;
}
}}}
#!c
int main(int argc, char *argv[])
{
printf("Hello World\n");
return 0;
}
}}}
<WikiCalendar>
http://trac-hacks.org/wiki/WikiTicketCalendarMacro
<TocMacro>
http://trac-hacks.org/wiki/TocMacro


