Mantis와 dokuWIKI를 상호 연동 하는 방법 설정 HOWTO

버그 tracking으로 많이 쓰고 있는 Mantis와 dokuWIKI를 상호간에 인증을 포함하여(SSO) 연동시켜 보다 효율적으로 Mantis와 WIKI를 쓰는 방법 KNOW-HOW를 공유하고자 한다.  Issue 위주의 tracking 은 mantis에 맡기고, 이로 인한 howto, 제품 및 개발에 관련된 지적재산은 wiki를 통해서 지식을 쌓는 장점이 있다.

기초문서 : Integration DokuWiki with Mantis
설정환경 : CentOS/RHEL 5.0, mantis 1.0.7, Xampp 1.6.2(AMP)

■ 기본적인 순서는

1. Xampp 환경 설정 / 초기 환경 설정
    1) Xampp 설치 : CentOS 5.0에 XAMPP 1.6.1 설치 참조
    2) PHP 환경 설정 : #vi /opt/lampp/etc/php.ini 하여 memory_limit을 20M 로 상향 조정 (초기 설정 8M)
        202 memory_limit = 20M
    3) Mantis 설치 : CentOS/RHEL 5.0에 Mantis 설치 참조

    4) WIKI 설치 : CentOS/RHEL 5.0에 DokuWIKI 설치 참조

2. DokuWiki 설정
    1) 기본 설정
        #vi /opt/lampp/htdocs/dokuwiki/conf/dokuwiki.php 에서

— 하단 부분 새로 생성
efine( ‘MANTIS_ROOT’, ‘/opt/lampp/htdocs/mantis/’ );                 // file path to Mantis, must terminate with /
define( ‘MANTIS_URL’, ‘http://(hostname을기재)/mantis/’ );     // url to Mantis, must terminate with /

— 하단 부분 설정값 변경
$conf[‘useacl’] = 1;
$conf[‘authtype’] = ‘mantis’

$conf[‘defaultgroup’] = ‘VIEWER’;

    2) SSO 설정 파일 생성(mantis의 인증 체계를 따라감)
         # vi /opt/lampp/htdocs/dokuwiki/inc/auth/mantis.class.php 하여 파일 생성 (내용은 여기 내용을 copy & paste할 것)

    3) 인증 구성 내용 변경
         # vi /opt/lampp/htdocs/dokuwiki/conf/acl.auth.php 의 내용을 변경 (내용은 여기 내용을 copy & paste할 것)

    4) mantis plugin 설치
         # vi /opt/lampp/htdocs/dokuwiki/lib/plugins/mantis/syntax.php의 내용을 변경 (내용은 여기 내용을 copy & paste할 것)

3. Mantis 설정
    1) 환경 설정 변경
         # vi /opt/lampp/htdocs/mantis/config_defaults_inc.php  하여 맨 끝부분에 내용을 추가 (내용은 여기 내용을 copy & paste할 것)

    2) wiki_api.php 생성
         # vi /opt/lampp/htdocs/mantis/core/wiki_api.php 하여 파일을 생성 (내용은 여기 내용을 copy & paste할 것)

    3) wiki_dokuwiki_api.php 생성
         # vi /opt/lampp/htdocs/mantis/core/wiki_dokuwiki_api.php 하여 파일을 생성 (내용은 여기 내용을 copy & paste할 것)

    4) html_api.php 변경
         # vi /opt/lampp/htdocs/mantis/core/html_api.php 의 내용에 아래와 같은 내용을 추가
— 하단 부분 새로 생성
  59   require_once( $t_core_dir . ‘wiki_api.php’ );

— print_menu() 부분 변경  생성
 507         # Project Wiki
 508         if ( wiki_is_enabled() ) {
 509           $t_current_project = helper_get_current_project();
 510           $t_menu_options[] = ‘<a href=”wiki.php?type=project&id=’ . $t_current_project . ‘”>’ . lang_get(
     ‘wiki’ ) . ‘</a>’;
 511         }
 512

— 하단 부분 새로 생성
1093 # ——————–
1094 # Print a button to create a wiki page
1095 function html_button_wiki( $p_bug_id ) {
1096   if ( ON == config_get( ‘wiki_enable’ ) ) {
1097     if ( access_has_bug_level( config_get( ‘update_bug_threshold’ ), $p_bug_id ) ) {
1098       html_button( ‘wiki.php’,
1099              lang_get_defaulted( ‘Wiki’ ),
1100              array( ‘id’ => $p_bug_id, ‘type’ => ‘issue’ ),
1101              ‘get’ );
1102     }
1103   }
1104 }
1105

— 하단 부분 변경
 856   # ——————–
 857   # Print an html button inside a form
 858 function html_button ( $p_action, $p_button_text, $p_fields = null, $p_method = ‘post’ ) {
 859   $p_action   = urlencode( $p_action );
 860   $p_button_text  = string_attribute( $p_button_text );
 861   if ( null === $p_fields ) {
 862     $p_fields = array();
 863   }
 864
 865   if ( strtolower( $p_method ) == ‘get’ ) {
 866     $t_method = ‘get’;
 867   } else {
 868     $t_method = ‘post’;
 869   }
 870
 871   PRINT “<form method=\”$t_method\” action=\”$p_action\”>\n”;
 872
 873   foreach ( $p_fields as $key => $val ) {
 874     $key = string_attribute( $key );
 875     $val = string_attribute( $val );
 876
 877     PRINT ” <input type=\”hidden\” name=\”$key\” value=\”$val\” />\n”;
 878   }
 879
 880   PRINT ” <input type=\”submit\” class=\”button\” value=\”$p_button_text\” />\n”;
 881   PRINT “</form>\n”;
 882 }
 883
 884

    5) wiki.php 설정
         # vi /opt/lampp/htdocs/mantis/wiki.php 하여 파일을 생성 (내용은 여기 내용을 copy & paste할 것)

    6) bug_view_page.php 설정
         # vi /opt/lampp/htdocs/mantis/bug_view_page.php 하여 파일을 수정

— 하단 부분 추가
 61   <!– Title –>
 62 <span class=”small”>
 63     <?php print_bracket_link( ‘wiki.php?id=’.$f_bug_id, lang_get( ‘wiki’ ) ) ?>
 64 </span>

    7) bug_view_advanced_page.php 설정
         # vi /opt/lampp/htdocs/mantis/bug_view_advanced_page.php 하여 파일을 수정
— 하단 부분 추가
 59   <!– Title –>
 60 <span class=”small”>
 61     <?php print_bracket_link( ‘wiki.php?id=’.$f_bug_id, lang_get( ‘wiki’ ) ) ?>
 62 </span>
 63

■ 사용 방법은
Mantis로 로그인을 하여 ‘이슈’ 보기를 누르면 상단 이슈 시작 부분에 앙증맞게 ‘wiki’라는 메뉴가 보이고 이 wiki를 클릭하면 dokuwiki로 인증 로그인되어 접속 된다. 이후에는 wiki 문법에 맞추어 작성/ 연결하면 된다.

Technorati Tags: , ,

Powered by ScribeFire.

Peter Kim에 대하여

Peter Kim(김태영) PMP, Certified SAFe 5 Scrum Master (SSM), Certified ScrumMaster® (CSM®), Project Research Inc., CEO / Founder, +82-10-9344-7505

3개의 답글 to “Mantis와 dokuWIKI를 상호 연동 하는 방법 설정 HOWTO”

  1. very interesting, but I don’t agree with you
    Idetrorce

  2. xampp mod-perl 에서 .cgi 사용하기

    mod_perl 사용시 모드펄 설정에서 .cgi 설정 미지원 때문 그래서 모드펄 설정에서 .cgi 추가 해주면 됩니다.

    아래 내용 참고

    LoadFile “C:/xampp/perl/bin/perl58.dll”
    LoadModule perl_module modules/mod_perl.so

    PerlRequire “C:/xampp/apache/conf/extra/startup.pl”

    Alias /perl “C:/xampp/htdocs/modperl/”

    SetHandler perl-script
    PerlResponseHandler ModPerl::Registry
    Options +ExecCGI
    PerlOptions +ParseHeaders

    SetHandler perl-script
    PerlResponseHandler ModPerl::Registry
    Options +ExecCGI
    PerlOptions +ParseHeaders

    SetHandler perl-script
    PerlResponseHandler ModPerl::Registry
    Options +ExecCGI
    PerlOptions +ParseHeaders

    PerlModule Apache::ASP
    Alias /asp “C:/xampp/htdocs/modperlasp/”

    SetHandler perl-script
    PerlResponseHandler Apache::ASP
    PerlSetVar Global .
    PerlSetVar StateDir “C:/xampp/tmp”

    ×

    요즘은 다 모드펄 이라 …. 예전 처럼 httpd.conf 애드 스크립트에서 .cgi .pl 주석설정 제거 htdoc 에 옵션에 ExecCGI 추가만 해봐야 소용 없음.

트랙백/핑백

  1. 블로그 결산 – PM 기법 인기 순위 « Peter .WEB2 - 1월 5, 2011

    […] Mantis와 dokuWIKI를 상호 연동 하는 방법 설정 HOWTO […]

답글 남기기

아래 항목을 채우거나 오른쪽 아이콘 중 하나를 클릭하여 로그 인 하세요:

WordPress.com 로고

WordPress.com의 계정을 사용하여 댓글을 남깁니다. 로그아웃 /  변경 )

Facebook 사진

Facebook의 계정을 사용하여 댓글을 남깁니다. 로그아웃 /  변경 )

%s에 연결하는 중

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d 블로거가 이것을 좋아합니다: