Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Redmine is a flexible project management web application written using Ruby on Rails framework.

설치

...

Table of Contents


redmine은 ruby on rails 프레임워크로 개발된 source source issue tracking system이다. 

설치와 사용이 손쉽고 issue 관리에 필요한 기능들이 제공되며 다양한 형상관리와 연계를 지원하고 문서화를 위해 간단한 위키를 내장하고 있다.
그리고 개인마다 다르겠지만 mantis 나 trac 보다 UI 가 더 깔끔하다는 느낌이다.
이제는 JIRA 를 도입해서 쓰고 있지 않지만 1년반 정도 유용하게 사용했던지라 혹시 도움이 될 지 몰라 예전에 작성해 둔 redmine 설치법을 올려 본다.

Warning

본 문서는 redmine 1.2.1 기준이다.

 

사전 준비

ruby 인터프리터가 제일 먼저 설치되어야 한다. 사용하려는 redmine 의 버전을 확인하고 지원하는 ruby를 확인한 후에 ruby 를 설치한다. (지원 정보는  http://www.redmine.org/projects/redmine/wiki/RedmineInstall 참고)

yum 같은 패키지 매니저가 없는 환경에서 설치를 가정하였다.

ruby interpreter

  • ruby 소스 다운로드
  • 압축을 해제하고 다음 명령어 실행

    Code Block
    CFLAGS=-O ./configure && make
    sudo make install
  • ruby --version 명령을 실행해 설치 여부 확인

rubygems 설치

루비 기반의 패키지 관리 프레임웍인 gems 설치

  • gems 다운 받기
  • 압축 해제후 해제 폴더로 이동후 다음 명령어

    실행ruby

    실행

    Code Block
    ruby setup.rb
  • 향후 gem 업데이트시 다음 명령어 실행

    최신 버전의 gem 사용시 redmine 설치가 되지 않으므로 downgrade (root 권한 필요)

    Code Block
    gem update --system 1.6.2
  • 혼란을 방지하기 위해 최신 버전의 gem 을 삭제 (다음 명령후 목록에서 최신 버전 선택)

    Code Block
    gem uninstall rubygems-update

ruby on rails

...

및 ruby 라이브러리 설치

  • rake 설치 (rake 0.9.x 는 미지원)

    Code Block
    gem install rake -v=0.8.7
  • Rails 설치 (rails 버전은 다를수 있음)

    Code Block
    gem install rails -v=2.3.

...

  • 11
  • Rack 설치

    (rails 설치시 Rack도 설치되는 것 같긴 함)


    Code Block
    gem install rack -v=1.

...

  • 1.1

     

Database driver 설치

MySQL

4MySQL 5.1 0 or higher 지원 (5.1 미지원 recommended) 

  • 다음 명령어로 MySQL 드라이버 설치

    Code Block
    gem install mysql

     

  • 설치시 문제가 있다면 다음 사이트 참고 참고 - Rails Wiki

Redmine 설치

  1. Download and extract or Checkout Redmine

...

  1. DBMS 계정 생성

    Code Block
    languagesql
    titleFor MySQL

...

  1. CREATE DATABASE redmine character SET utf8;
    CREATE user 'redmine'@'localhost' IDENTIFIED BY 'my_password';
    GRANT ALL privileges ON redmine.* TO 'redmine'@'localhost';

...

  1. redmine DB 환경 설정
    1. redmine의 config/database.yml.example

...

    1. config/database.yml

...

    1. 로 복사후 편집.
    2. ruby on rails는 rails app을 구동할 환경을 지정하는 기능이 있음("production", "development" "test")
    3. 셋 중에 구동할 환경을 선택하고 해당 부분을 편집

      Code Block
      titleExample for a MySQL database:

...

    1.  production:
      adapter: mysql
      database: redmine
      host: localhost
      username: redmine
      password: my_password
  1. Session store 생성
    1. Generate a session store secret. This is required on the trunk version of Redmine at r2493 or above and the released 0.8.7 version or above.

      Code Block
      RAILS_ENV=production rake config/initializers/session_store.rb
  2. DB schema 생성
    1. Create the database structure, by running the following command under the application root directory:

      Code Block
      RAILS_ENV=production rake db:migrate

      다음과 같은 에러가 발생한다면 libopenssl-ruby 을 설치하거나 ruby 를 openssl 을 사용하게 재빌드해야 한다.

...

    1. Panel
      rake

...

    1. aborted!

...

    1. no

...

    1. such

...

    1. file

...

    1. to

...

    1. load

...

    1. openssl

...

    1. (See

...

    1. full

...

    1. trace

...

    1. by

...

    1. running

...

    1. task

...

    1. with

...

    1. --trace)

...

    1.  ubuntu 에서 libopenssl-ruby

...

    1. 설치 


      Code Block
      apt-get install libopenssl-ruby1.8

      Un*x 에서 ruby 재빌드

      Code Block
      languagebash
      $ cd ext/openssl
      $ ../../ruby extconf.rb
      --with-openssl-include=/usr/local/ssl/include
      --with-openssl-lib=/usr/local/ssl/lib
      $ LD_RUN_PATH=/usr/local/ssl/lib make
      $ make install


       

  1. 기본 데이타 insert(update 라면 제외)
    Insert default configuration data in database, by running the following command:

    Code Block
    languagebash
    RAILS_ENV=production rake redmine:load_default_data

...

  1. setting up permissions (Windows 사용자는 skip)
    The user who runs Redmine must have write permission on the following subdirectories: files, log, tmp (create the last one if not present).

    Code Block
    languagebash
    mkdir tmp public/plugin_assets
    sudo chown -R redmine:redmine files log tmp public/plugin_assets
    sudo chmod -R 755 files log tmp public/plugin_assets

...

ruby on rails deploy

redmine 은 ruby on rails 로 개발되었으므로 이를 deploy 할 방법이 필요하다. ruby 에 포함되어 있는 웹서버인 Webrick 을 사용할 수 도 있지만 속도가 매우 느리다. 또 apache 의 fast cgi 모듈은 속도는 빠르지만 ruby deploy용이 아니라 에러나 문제 발생시 대응하기가 힘들다.

fcgi

  • mod_fcgid 설치
  • httpd.conf에 다음 항목 추가
Code Block
LoadModule fcgid_module modules/mod_fcgid.so 추가
  • httpd-vhosts.conf 에 다음 라인 추가
Code Block
<VirtualHost *:80>
ServerName redmine.tradesign.net
DocumentRoot "/usr/local/apache2/htdocs/New_TradeSign/webapp/redmine/public"
LogLevel debug
ErrorLog "logs/redmine-error_log"
CustomLog "logs/redminen-access_log" common
<Directory "/usr/local/apache2/htdocs/New_TradeSign/webapp/redmine/public">
Options ExecCGI FollowSymLinks Indexes
AllowOverride all
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

Phusion Passenger

apache 나 Nginx같은 웹서버를 통해 배포할 경우 가장 추천하는 배포방법이다. 속도가 매우 빠르며 안정적이다. 설치는 홈페이지의 설치 부분 참고

...

문제 해결

파일 첨부 사이즈 제한

...

  • redmine 을 관리자로 접속후 Adminitration->Settings->General을 선택후 Attachment max.size 의 값을 적절하게 설정한다.

구동 오류

  • apache의 fcgi 로 연동해서 사용할 경우 구동이 안 되며 error log 파일에 다음과 같은 로그가 남았을 경우.

    Code Block
    Request exceeded the limit of 10 internal redirects due to probable configuration error.
    Use 'LimitInternalRecursion' to increase the limit if necessary.
    Use 'LogLevel debug' to get a backtrace.
  • fcgi 와 cgi 모듈이 충돌해서 발생할 수 있다.

...

  •  public/.htaccess 를 열어서 다음 부분을 주석처리 해 준다.

    Code Block
    <IfModule mod_cgi.c>
    AddHandler cgi-script

...

  •  

...

  • .cgi

...

  • 
    </IfModule>



Repository

  • 설정된 repository 가 제대로 동작하는지 확인

    Code Block
    languagebash
    titleDB에 등록된 전체 repository 검사

...

  • ruby script/runner "Repository.fetch_changesets" -e production;
  • 해당 repository 연결 테스트 (redmine 은 저장소 정보를 xml 받아서 파싱)
Code Block
svn list --xml 'https://testca.tradesign.net/test_repos1234/test_project/'@HEAD
svn info --xml 'https://testca.tradesign.net/test_repos1234/test_project/'
  • 저장소 클릭시 다음 메시지가 나오며 목록이 출력 안 될 경우경우  redmine/log 폴더나 apache 로그등을 뒤져서 정확한 에러 메시지를 알아야 조치가 가능하다.
Panel
The entry or revision was not found in the repository 또는 

...

항목이나 리비젼이 저장소에 존재하지 않습니다. 

...

  • Server certificate verification failed: issuer is not trusted

https에 사용된 CA 인증서를 (p)ermanently? 하게 accet 해야 한다. web server 가 구동되는 계정으로 로그인한후에 cmd 에서 상단의 svn list명령어를 수행한 후에 ca 인증서를 인증해 준다.

백업

http://redmine.tradesign.net 은 testca(v880) 시스템에 설치되어 있다.

...

.

...

redmine 백업 방법

  • 첨부 파일등은 redmine 설치 경로의 files 폴더에 저장이 되므로 tar 나 7zip 등을 이용해서 redmine 폴더 전체를 묶어서 백업한다.
  • MySQL db 는 mysqldump를 이용하여 백업한다.

...