Docstoc

TRAC

Document Sample
TRAC Powered By Docstoc
					TRAC Install Guide


Owner:           이상옥
Last revised:    2010년 5월 21일 오전 2시 51분
Revision:        0.01
Status:          DRAFT
Contributors:
Key Reviewers:
Distribution




                                          1 / 12
TRAC INSTALL GUIDE REV 0.01
21/05/2010                                                                                                                                         DRAFT




Contents

1.         WHAT IS TRAC? ......................................................................................................................... 3

2.         관련 사이트 .................................................................................................................................. 3
     2.1       TRAC REVIEW ........................................................................................................................... 3
     2.2       W INDOWS INSTALLATION INSTRUCTIONS FOR SUBVERSION W /TRAC 0.8.4 ................................... 3
     2.3       KLDP BBS ............................................................................................................................... 3
3.         INSTALL GUIDE .......................................................................................................................... 4
     3.1      INSTALL SUBVERSION PRE-REQUISITES ..................................................................................... 4
           3.1.1 Install Python .................................................................................................................. 4
           3.1.2 Install Apache ................................................................................................................. 4
           3.1.3 Install Subversion .......................................................................................................... 4
           3.1.4 Install docutils ................................................................................................................ 4
     3.2      CREATE REPOSITORY ................................................................................................................ 4
           3.2.1 Create repository directory .............................................................................................. 4
           3.2.2 Create repository ............................................................................................................. 4
           3.2.3 Project Import & Checkout .............................................................................................. 4
     3.3      CONFIGURE APACHE ................................................................................................................. 5
           3.3.1 Copy files ......................................................................................................................... 5
           3.3.2 Create password file (w/user 'admin') ............................................................................. 5
           3.3.3 Configure Apache (edit httpd.conf).................................................................................. 5
           3.3.4 Add location root for multiple repositories ....................................................................... 5
           3.3.5 Add cgi handler, Uncomment .......................................................................................... 6
           3.3.6 Restart Apache ................................................................................................................ 6
           3.3.7 Test your install of Subversion ........................................................................................ 6
     3.4      CREATE USERS ......................................................................................................................... 6
           3.4.1 Add users to password file .............................................................................................. 6
     3.5      INSTALL TRAC PREREQUISITES .................................................................................................. 6
           3.5.1 Install Subversion Python Bindings ................................................................................. 6
           3.5.2 Install PySQLite ............................................................................................................... 7
           3.5.3 Install ClearSilver .......................................................................................................... 7
     3.6      FIX A FEW THINGS...................................................................................................................... 7
           3.6.1 Copy CGI ......................................................................................................................... 7
     3.7      CONFIGURE TRAC DB ............................................................................................................... 7
           3.7.1 Run trac-admin ................................................................................................................ 7
           3.7.2 Initialize DB ...................................................................................................................... 7
           3.7.3 Add administrative permissions (the below adds all permissions for 'admin' user) ........ 7
     3.8      ADD TRAC TO APACHE............................................................................................................... 7
           3.8.1 Edit httpd.conf ................................................................................................................. 7
           3.8.2 Restart Apache ................................................................................................................ 8
           3.8.3 Test Trac install ............................................................................................................... 8
     3.9      ETC ......................................................................................................................................... 8
           3.9.1 Install Diffutils ................................................................................................................ 8
           3.9.2 Install SilverCity ............................................................................................................. 8
           3.9.3 한글화 .............................................................................................................................. 8
           3.9.4 다중 프로젝트 관리 .......................................................................................................... 8




                                                                                                                                                      2 / 12
    TRAC INSTALL GUIDE REV 0.01
    21/05/2010                                                                                     DRAFT




    현재 이 문서는 June 2005-06-29 문서를 기반으로 작성함 – Trac 0.8.4 버전


1. What is Trac?

        An integrated system for managing software projects

        An enhanced wiki

        A flexible web-based issue tracker

        An interface to the Subversion revision control system


    서브버전과 연동되는 프로젝트 관리 도구 입니다.




2. 관련 사이트

2.1 Trac Review

    http://openlook.org/blog/867


2.2 Windows Installation Instructions for Subversion w/Trac 0.8.4

    http://projects.edgewall.com/trac/wiki/TracOnWindows


2.3 KLDP BBS

    http://bbs.kldp.org/viewtopic.php?t=57302 : Trac - project management(issue tracking system)
    http://bbs.kldp.org/viewtopic.php?t=62083 : TRAC 에서 레포지토리 하나만 연결되나요?




                                                                                                    3 / 12
      TRAC INSTALL GUIDE REV 0.01
      21/05/2010                                                                         DRAFT




  3. Install Guide
      설치 파일 : DB의 Tool 폴더의 trac_0.8.4에 0.8.4 버전과 관련된 파일이 있음
      최신 버전의 TRAC Install Guide : http://projects.edgewall.com/trac/wiki/TracOnWindows




 3.1 Install Subversion Pre-Requisites

3.1.1 Install Python
      [내 컴퓨터 등록정보 – 고급변수 – 환경변수]의 PATH에 C:\Python23 을 추가한다.

3.1.2 Install Apache

3.1.3 Install Subversion
      재부팅 필요

3.1.4 Install docutils
      docutils 폴더에서 C:\python23\python setup.py install 실행




 3.2 Create Repository

      Trac와 연동할 Subversion의 저장소를 새로 만들거나 기존의 저장소가 있다면 이 단계는 건너뜀

3.2.1 Create repository directory
      C:\>mkdir svnrepo
      SVNManager 프로그램으로 생성한 저장소 폴더를 활성화 시켜주어야 함

3.2.2 Create repository
      C:\>svnadmin create --fs-type=fsfs c:\svnrepo\AEBmega
      저장소 생성후 저장소에 로그인할 ID와 PW, 저장소 설정 파일을 생성한 저장소의 conf 폴더에 넣어준다.
      (DB의 Tool 폴더의 Subversion 폴더안에 Subversion_conf_file_050601.zip 파일에 설정 파일이 들어있음)

3.2.3 Project Import & Checkout
      Dump 받은 저장소가 있다면 아래와 같이 load 해준다.
      C:\svnrepo>svnadmin load --force-uuid AEBmega < AEBmega_050726.dump




                                                                                          4 / 12
         TRAC INSTALL GUIDE REV 0.01
         21/05/2010                                                                          DRAFT




     3.3 Configure Apache

   3.3.1 Copy files
         C:\Program Files\Subversion\bin 폴더의 dll과 so 파일들을
         C:\Program Files\Apache Group\Apache2\modules 폴더에 복사한다.

   3.3.2 Create password file (w/user 'admin')
         C:\Program Files\Apache Group\Apache2\bin>htpasswd -cm c:\svnrepo\.htaccess admin

   3.3.3 Configure Apache (edit httpd.conf)

  3.3.3.1 Add Modules to httpd.conf

3.3.3.1.1 Uncomment
         LoadModule dav_module modules/mod_dav.so
         #LoadModule dav_fs_module modules/mod_dav_fs.so
         146라인의 주석을 제거한다.
         LoadModule dav_module modules/mod_dav.so
         LoadModule dav_fs_module modules/mod_dav_fs.so

3.3.3.1.2 Add (after)
         아래줄(147라인)에 아래의 내용을 추가한다.
         # Subversion
         LoadModule dav_svn_module modules/mod_dav_svn.so
         LoadModule authz_svn_module modules/mod_authz_svn.so

   3.3.4 Add location root for multiple repositories
         제일 마지막에 추가한다.
         # Subversion
         <Location /svn>
          DAV svn
          # any /svn/foo URL will map to a repository C:/svn/foo
          # I've only got it working using SVNPath!!
          SVNParentPath C:/svnrepo
          AuthType Basic
          AuthName "Subversion repository"
          AuthUserFile c:/svnrepo/.htaccess
          Require valid-user
         </Location>



                                                                                              5 / 12
      TRAC INSTALL GUIDE REV 0.01
      21/05/2010                                                                       DRAFT




3.3.5 Add cgi handler, Uncomment
      AddHandler cgi-script .cgi

3.3.6 Restart Apache

3.3.7 Test your install of Subversion
      http://localhost/svn/AEBmega/
      인증창에 3.3.2에서 만든 admin 으로 로그인 한다.




 3.4 Create Users

3.4.1 Add users to password file
      C:\Program Files\Apache Group\Apache2\bin>htpasswd -cm c:\svnrepo\.htaccess ID
      로그인할 ID를 추가한다.




 3.5 Install Trac Prerequisites

3.5.1 Install Subversion Python Bindings
      svn-win32-1.2.1_py 폴더의 libsvn과 svn 폴더를 C:\Python23\Lib 로 복사한다.



                                                                                        6 / 12
      TRAC INSTALL GUIDE REV 0.01
      21/05/2010                                                                                    DRAFT




3.5.2 Install PySQLite

3.5.3 Install ClearSilver

3.5.4 Install Trac



 3.6 Fix a few things

3.6.1 Copy CGI
      trac.cgi 상단의 #!C:\Programme\Python\2.3\python.exe를 #!C:\Python23\python.exe 로 수정한후
      C:\Python23\share\trac\cgi-bin 의 trac.cgi 를 C:\Program Files\Apache Group\Apache2\cgi-bin 에 복사한다.




 3.7 Configure Trac DB

3.7.1 Run trac-admin
      C:\Python23\Scripts>python trac-admin c:/svnrepo/trac/AEBmega
      Trac DB 이름에 점(.)이 들어가면 안된다.

3.7.2 Initialize DB
      Trac [c:\svnrepo\trac\AEBmega]> initenv
      Project Name [My Project]> AEBmega
      Path to repository [/var/svn/test]> c:\svnrepo\AEBmega
      Templates directory [C:\Python23\share\trac\templates]> 엔터침

3.7.3 Add administrative permissions (the below adds all permissions for 'admin' user)
      Trac [c:\svnrepo\trac\AEBmega]> permission add admin TRAC_ADMIN




 3.8 Add Trac to Apache

3.8.1 Edit httpd.conf
      제일 마지막에 추가한다.
      <Location "/cgi-bin/trac.cgi">
       SetEnv TRAC_ENV "c:/svnrepo/trac/AEBmega"
      </Location>




                                                                                                     7 / 12
       TRAC INSTALL GUIDE REV 0.01
       21/05/2010                                                                  DRAFT




       <Location "/cgi-bin/trac.cgi/login">
        AuthType Basic
        AuthName "AEBmega"
        AuthUserFile C:/svnrepo/.htaccess
        Require valid-user
       </Location>


       <Directory "C:/Python23/share/trac/htdocs">
        Options Indexes MultiViews
        AllowOverride None
        Order allow,deny
        Allow from all
       </Directory>

 3.8.2 Restart Apache

 3.8.3 Test Trac install
       http://localhost/cgi-bin/trac.cgi




  3.9 ETC

 3.9.1 Install Diffutils
       [내 컴퓨터 등록정보 – 고급변수 – 환경변수]의 PATH에 C:\Program Files\GnuWin32\bin 을 추가한 후
       재부팅을 하여야 적용이 된다.

 3.9.2 Install SilverCity
       Syntax Coloring of Source Code

 3.9.3 한글화
       ‘trac-ktdms-041222_한글화’ 폴더를 C:\Python23\share\trac 폴더에 복사한다.

 3.9.4 다중 프로젝트 관리

3.9.4.1 Easiest method for hosting multiple projects in one domain with Apache 2
       하나의 주소에서 cgi 파일 이름으로 프로젝트를 구분하는 방법
                http://localhost/cgi-bin/trac.cgi
                http://localhost/cgi-bin/trac_arm9.cgi


       trac.cgi를 복사하여 각각의 프로젝트마다 만들어주고 아래와 같이 httpd.conf에 추가한다.
                                                                                    8 / 12
TRAC INSTALL GUIDE REV 0.01
21/05/2010                                                         DRAFT




################################################################
# 방법 1
# 하나의 주소에서 cgi 파일로 프로젝트를 구분하는 방법
#          => http://localhost/cgi-bin/trac.cgi
#          => http://localhost/cgi-bin/trac_arm9.cgi
################################################################
<Location "/cgi-bin/trac.cgi">
    SetEnv TRAC_ENV "c:/svnrepo/trac/AEBmega"
</Location>


<Location "/cgi-bin/trac.cgi/login">
    AuthType Basic
    AuthName "AEBmega"
    AuthUserFile C:/svnrepo/.htaccess
    Require valid-user
</Location>


<Location "/cgi-bin/trac_arm9.cgi">
     SetEnv TRAC_ENV "c:/svnrepo/trac/AEB_ARM9"
</Location>


<Location "/cgi-bin/trac_arm9.cgi/login">
     AuthType basic
     AuthName "AEB_ARM9"
     AuthUserFile C:/svnrepo/.htaccess
     Require valid-user
</Location>


<Directory "C:/Python23/share/trac/htdocs">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
###############################################################




                                                                    9 / 12
         TRAC INSTALL GUIDE REV 0.01
         21/05/2010                                                                  DRAFT




  3.9.4.2 Harder method: URL Rewriting

3.9.4.2.1 The wimp way for multiple projects
         다른 주소로 프로젝트를 구분하는 방법
                  http://localhost/cgi-bin/project1/trac.cgi
                  http://localhost/cgi-bin/project2/trac.cgi


         C:\Program Files\Apache Group\Apache2\cgi-bin 에 프로젝트마다 폴더를 만들고 각각의 폴더에 trac.cgi를
         복사한다. 그리고 아래와 같이 httpd.conf에 추가한다.
         ################################################################
         # 방법 2
         # 다른 주소로 프로젝트를 구분하는 방법
         #        => http://localhost/cgi-bin/project1/trac.cgi
         #        => http://localhost/cgi-bin/project2/trac.cgi
         ################################################################
         <Location "/cgi-bin/project1/trac.cgi">
              SetEnv TRAC_ENV "c:/svnrepo/trac/AEBmega"
         </Location>


         <Location "/cgi-bin/project2/trac.cgi">
              SetEnv TRAC_ENV "c:/svnrepo/trac/AEB_ARM9"
         </Location>


         <Location "/cgi-bin/project1/trac.cgi/login">
         AuthType Basic
         AuthName "AEBmega"
         AuthUserFile C:/svnrepo/.htaccess
         Require valid-user
         </Location>


         <Location "/cgi-bin/project2/trac.cgi/login">
         AuthType Basic
         AuthName "AEB_ARM9"
         AuthUserFile C:/svnrepo/.htaccess
         Require valid-user
         </Location>
         ###############################################################


                                                                                      10 / 12
         TRAC INSTALL GUIDE REV 0.01
         21/05/2010                                                                                       DRAFT




3.9.4.2.2 Global authentication
         trac.cgi가 아닌 주소로 프로젝트를 구분하는 방법
                  http://localhost/projects/AEBmega
                  http://localhost/projects/AEB_ARM9
         프로젝트를 추가할 경우 따로 httpd.conf를 수정하지 않아도 되므로 추천하는 방법이다.


         httpd.conf의 LoadModule rewrite_module modules/mod_rewrite.so 의 주석을 제거한다.
         C:\Program Files\Apache Group\Apache2\htdocs 에 폴더(projects)를 하나 만들고 trac.cgi를 복사한다.
         그리고 아래와 같이 httpd.conf에 추가한다.
         (새로 만든 폴더에 index.html을 만들어 각각의 프로젝트를 링크하여 사용을 하면 편리하다.)
         ################################################################
         # 방법 3 : 추천하는 방법(프로젝트 추가시마다 수정하지 않아도 됨)
         # trac.cgi가 아닌 주소로 프로젝트를 구분하는 방법
         #        => http://localhost/projects/AEBmega
         #        => http://localhost/projects/AEB_ARM9
         ################################################################
         RewriteEngine on
         RewriteRule ^/projects/+$ /projects/index.html [L]
         RewriteCond c:/svnrepo/trac/$1 -d
         RewriteRule ^/projects/([^/.]+)(/?.*) /projects/trac.cgi$2 [S=1,E=TRAC_ENV:c:/svnrepo/trac/$1]
         RewriteRule ^/projects/(.*) /projects/index.html


         <Directory "C:\Program Files\Apache Group\Apache2\htdocs\projects">
         AllowOverride None
         Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
         AddHandler cgi-script .cgi
         Order allow,deny
         Allow from all
         </Directory>


         <LocationMatch "/projects/[^/.]+/login">
         AuthType Basic
         AuthName "ARALION FIRMWARE"
         AuthUserFile C:/svnrepo/.htaccess
         Require valid-user
         </LocationMatch>
         ################################################################

                                                                                                          11 / 12
TRAC INSTALL GUIDE REV 0.01
21/05/2010                    DRAFT




                              12 / 12

				
DOCUMENT INFO