'삽질목록/빌드 서버 놀이'에 해당되는 글 2건

  1. 2008/07/12 Trac 0.11 + Subversion 1.5.0 + Apache 2.2.9 + mod_wsgi 2.0 rev878 (1)
  2. 2008/07/10 VisualSVN Server에 Trac을 연결해 보았다. (5)
posted by 게으른 늘보 2008/07/12 00:55
mod_python보다 mod_wsgi가 더 빠르다고 해서 mod_wsgi로 설정을 해봤다.

윈도우 에서는 mod_wsgi기능이 지원이 안되는것이 많았는데 그중 PythonHome설정이나

Deamon관련 부분이 돌아가지 않아 설정에 애를 먹었다.

Trac은 AccountManagerPlugin 하나만 설치 하였다.

디렉토리 구조는 그래도 제법 공을 들였는데 프로그램과 데이터를 나누어 놓아서

백업하기 편하게 하였다.

APP
Apache
Python25(Trac, Genshi, libsvn)
Subversion
Data
Htdoc - www 용 디렉토리
Repos - SVN 저장소. 예제로 exam 하나가 들어가 있다.
Setting
Account - SVN authz와 Digest.txt가 있다. 기본 계정은 admin - password
Httpd - Apache 설정 포트는 개인적인 이유로 180번으로 잡혀 있다.
Trac - Trac에 관련된 설정
Config - Trac의 설정. 생성된 Trac은 이 설정을 상속받는다.
Template - 아직 안했지만 템플릿용
WikiTemplate - 아직 안했지만 wiki용 템플릿용
Trac - Trac 생성 위치.
Temp - 임시 디렉토리 여기에 error.log가 생성된다.

가볍게 /에 있는 ApacheRun.bat를 실행하면 실행된다.

절대경로로 설정하는것을 최대한 피하고 상대경로로 잡았기 떄문에 아무곳에나 가져다 놓고 써도

된다!!

Repository는 http://localhost:180/svn/exam 과 같이 접근이 가능하다.
Trac은 http://localhost:180/trac/exam과 같이 접근이 가능하다.

Trac에서 만들때에 주의 사항으로는
CreateTrac.bat 이름

으로 실행한다면 Setting에 있는 Trac.ini를 상속받아 계정정보등을 사용하게 되어 있다. 또한,

SVN 저장소를 설정할 때에는 ..\..\Repos\이름 으로 상대경로를 주면 된다.

수동으로 만들고서 설정하려 한다면,

# -*- coding: utf-8 -*-

[inherit]
file = ..\..\..\Setting\Trac\Config\trac.ini

[project]
name = exam

[trac]
repository_dir = ..\..\Repos\Exam

와 같이 exam에 설정되어 있는 것을 참고로 하여도 된다.

윈도우에서 편하게 만들려면 폴더를 만들고서 CreateTrac.bat로 드래그&드롭.

간단하게 상속받은 설정으로 만들 수 있다.

BS.zip


원래라면 CruiseControl도 같이 설정 하였으나. Trac과 Subversion하고 묶기에는 맞지 않는 점이 있는 듯 하여 제외 하였기 때문에 Build Server가 아닌 그냥 Trac+SVN 패키지가 되어 버렸다.

Trackback http://blog.zcube.kr/trackback/430 관련글 쓰기

댓글을 달아 주세요

  1. 이정훈 2008/07/30 17:27  Addr  Edit/Del  Reply

    Subversion 1.5.x 나온지도 모르고 있었네... -.-

posted by 게으른 늘보 2008/07/10 17:16
1. 서론

VisualSVN Server가 Apache 2.2.9 기반으로 되어 있길래 Trac도 같이 사용하면 편할 거 같아서

설정을 해 보았다. 기본적으로 Apache에 Trac을 설치하는 과정과 크게 다르지 않다. 하지만 필요한

모듈들을 구해서 설치해야하는 부분이 조금 까다롭다면 까다로울 수 있다. Trac과 Python은 이미

사용하고 있던게 있어 설치 과정은 제외하고 과정을 적어 보겠다.

2. Module 설치


Python 2.5를 사용하고 있기 때문에 버젼에 맞는 mod_python을 설치 하였다.

http://www.apache.org/dist/httpd/modpython/win/3.3.1/mod_python-3.3.1.win32-py2.5-Apache2.2.exe

실행후 Python25\Lib\site-packages\mod_python_so.pyd를 mod_python.so로 이름을 바꾸고,

인증이나 설정에 사용 했던 모듈인 mod_alias.so mod_authz_user.so를 apache 2.2.9에서 추출하여

VisualSVN Server\bin으로 복사하였다.

3. httpd.conf 수정

trac.cgi를 구해다 C:\BuildSystem\에 복사하고 c:\BuildSystem\Trac\test에 간단하게

Trac을 설정한 후에 위 설정에 맞게 아래 내용을 추가하였다.

conf/httpd-custom.conf에  아래 내용을 추가하였다.

LoadModule python_module bin/mod_python.so
LoadModule alias_module bin/mod_alias.so
LoadModule authz_user_module bin/mod_authz_user.so

ScriptAlias /trac "C:/BuildSystem/trac.cgi"
<Location /trac>
  SetHandler mod_python
  PythonHandler trac.web.modpython_frontend
  PythonOption TracEnv C:/BuildSystem/Trac/test
  PythonOption TracUriRoot /trac
</Location>

<LocationMatch "/trac/login">
    AuthType Basic
    AuthName "Trac Authentication"
  AuthUserFile "C:/Repositories//htpasswd"
    Require valid-user
</LocationMatch>

4. 결론

Apache 서버를 직접 설치해서 하는 방법도 있지만 VisualSVN Server에 설치해 본

이유는 VisualSVN Server가 제공하는 인터페이스의 편리함과, 또한 SVN에 최적화

되어 있는 작은 설정이 마음에 들어서 였다.

 Trac에 AccountModule을 설치하여 조금 수정한다면 웹 상에서 SVN 계정 관리도

편하게 할 수 있으니 괜찮은 설정이 될거 같다.

Trackback http://blog.zcube.kr/trackback/415 관련글 쓰기

댓글을 달아 주세요

  1. bluesky 2009/12/04 21:14  Addr  Edit/Del  Reply

    위의 방법으로 했는데 https://localhost/trac/으로 접속하면 login을 요구하는 popup을 통과하면 아래과 같은 화면이 뜨고 메시지가 나오내요.
    왜그럴까요?

    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

  2. 이정훈 2008/07/30 17:24  Addr  Edit/Del  Reply

    VisualSVN 써보려고 했었는데, 아직 시도를 못했지 ..

  3. 게으른늘보 2008/07/14 02:46  Addr  Edit/Del  Reply

    서비스로 실행할때와 그냥 실행할때에 차이가 있던것을 확인했습니다. 그냥 실행할때에 잘 돌아가던 것도 서비스로 실행하면 Warning: Can't synchronize with the repository (Unsupported version control system "svn". Check that the Python support libraries for "svn" are correctly installed.) 라는 오류가 나는 것을 확인했습니다. 해결방법은 아직 못 찾았습니다.

  4. 게으른늘보 2008/07/13 16:49  Addr  Edit/Del  Reply

    svn 모듈이 없다고 나온다면, http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=8100 에가셔서 Python 2.5 bindings installer for Win32. 을 버젼에 맞게 설치하시면 될겁니다.

  5. 브루펜시럽 2008/07/12 12:48  Addr  Edit/Del  Reply

    사용하신 VisualSVN Server과 Trac의 버전 정보를 알 수 있을까요?
    VisualSVN Server 1.5 버전과 Trac 0.11 버전을 위의 방법으로 설치했는 데 trac 메인화면에서 svn 모듈을 못찾는다고 나오는군요. svn_trac 을 설치했는데 왜 그러는 지 모르겠어요. 흐음.