티스토리 툴바

BLOG main image
분류 전체보기 (29)
개발 (13)
Linux (5)
생각해볼꺼리 (1)
쓸만한것들 (3)
잡다구리 (3)
신변잡기 (1)
5,869 Visitors up to today!
Today 1 hit, Yesterday 6 hit
daisy rss
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 파일을 보면,

[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] 안에서는 사용자와 그룹을 매핑시킬수 있다.
- [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>

3. trac 과 연동

myproject의 trac.ini 파일을 열고 다음과 같이 설정한다.
[trac]
authz_file=/home/svn/authz
authz_module_file= myproject
yourprojcet 도 마찬가지로 설정한다.





Trackback Address :: http://goodbbai.tistory.com/trackback/35 관련글 쓰기
BlogIcon 브루펜시럽 | 2008/07/13 15:02 | PERMALINK | EDIT/DEL | REPLY
설정에 도움이 많이 되었습니다. 감사합니다. ^^
BlogIcon Lawyer Marketing | 2011/08/18 00:26 | PERMALINK | EDIT/DEL | REPLY
당신의 또 다른 유용한 인터넷 사이트를 주셔서 감사합니다. 어디든지 이외에 진짜 좋은 의미의 코드 정보를 일종의 것으로 구입할 수 있습니다? 나는 우리가 구현하는 순간, 나는 디자인을 빼내 정보의 이런 종류에 관한 얘기했습니다 걸 벤처 소유하고있다.
Name
Password
Homepage
Secret
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 파일을 아래와 같이 편집한다.
[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


htpasswd 파일과 그 디렉토리에는 아래와 같이 권한을 주어야 한다.
chown -R www-data.www-data /path

또한 apache 설정에서 trac 에 로그인 하는 부분을 지워야 한다.
<LocationMatch "/[^/]+login">
    # ...
</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 에서 다음과 같이 입력해보자.
{{{
#!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


Trackback Address :: http://goodbbai.tistory.com/trackback/34 관련글 쓰기
Name
Password
Homepage
Secret
prev"" #1 #2 #3 #4 #5 ... #15 next