Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

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

설치

Pre Requirements

ruby interpreter

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

rubygems 설치

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

  • gems 다운 받기
  • 압축 해제후 해제 폴더로 이동후 다음 명령어 실행ruby setup.rb
  • 향후 gem 업데이트시 다음 명령어 실행(root 권한 필요)gem update --system

ruby on rails

  • gem 명령어를 통해 Rails 설치 (rails 버전은 다를수 있음)
gem install rails -v=2.3.5
  • Rack 설치(rails 설치시 Rack도 설치되는 것 같긴 함)
gem install rack -v=1.0.1

Database driver 설치

MySQL

4.1 or higher 지원(5.1 미지원 )

  • 다음 명령어로 설치
gem install mysql
  • 설치시 문제가 있다면 다음 사이트 참고 Rails Wiki

Redmine

  • Download and extract or Checkout Redmine
  • Create an empty database and accompanying user named redmine for example.

For MySQL:

CREATE DATABASE redmine character SET utf8;
CREATE user 'redmine'@'localhost' IDENTIFIED BY 'my_password';
GRANT ALL privileges ON redmine.* TO 'redmine'@'localhost';
  • Copy config/database.yml.example to config/database.yml and edit this file in order to configure your database settings for "production" environment.

Example for a MySQL database:

production:
adapter: mysql
database: redmine
host: localhost
username: redmine
password: my_password
  • 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.
RAILS_ENV=production rake config/initializers/session_store.rb
  • Create the database structure, by running the following command under the application root directory:
RAILS_ENV=production rake db:migrate

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

rake aborted!
no such file to load - openssl
(See full trace by running task with --trace)
  • ubuntu 에서 libopenssl-ruby 설치
  • Un*x 에서 ruby 재빌드
$ 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
  • Insert default configuration data in database, by running the following command:
RAILS_ENV=production rake redmine:load_default_data
  • Setting up permissions

The user who runs Redmine must have write permission on the following subdirectories: files, log, tmp (create the last one if not present).

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에 다음 항목 추가
LoadModule fcgid_module modules/mod_fcgid.so 추가
  • httpd-vhosts.conf 에 다음 라인 추가
<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같은 웹서버를 통해 배포할 경우 가장 추천하는 배포방법이다. 속도가 매우 빠르며 안정적이다. 설치는 홈페이지의 설치 부분 참고

사용

문제 해결

파일 첨부 사이즈 제한

config/settings.yml 의 attachment_max_size 를 수정후 재시작한다. (기본값 5120 = 5M)

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

구동 오류

  • apache의 fcgi 로 연동해서 사용할 경우 구동이 안 되며 error log 파일에 다음과 같은 로그가 남았을 경우.
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 를 열어서 다음 부분을 주석처리 해 준다.

<IfModule mod_cgi.c>
AddHandler cgi-script .cgi
</IfModule>
<IfModule mod_cgi.c>
RewriteRule ^(.*)$ dispatch.cgi QSA,L
</IfModule>

Repository

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

DB에 등록된 전체 repository 검사

ruby script/runner "Repository.fetch_changesets" -e production;

해당 repository 연결 테스트 (redmine 은 저장소 정보를 xml 받아서 파싱)

svn list --xml 'https://testca.tradesign.net/test_repos1234/test_project/'@HEAD
svn info --xml 'https://testca.tradesign.net/test_repos1234/test_project/'
  • 저장소 클릭시 다음 메시지가 나오며 목록이 출력 안 될 경우

The entry or revision was not found in the repository 또는 
항목이나 리비젼이 저장소에 존재하지 않습니다. 
위 에러 발생시 redmine/log 폴더나 apache 로그등을 뒤져서 정확한 에러 메시지를 알아야 조치가 가능하다.

    • 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) 시스템에 설치되어 있다.

  • 설치 경로: /data1/redmine
  • MySQL 계정:
    • id: redmine
    • db: redmine
    • pwd: config/database.yml 참고

redmine 백업 방법

  • 첨부 파일등은 redmine 설치 경로의 files 폴더에 저장이 되므로 tar 나 7zip 등을 이용해서 redmine 폴더 전체를 묶어서 백업한다.
  • MySQL db 는 mysqldump를 이용하여 백업한다.
mysqldump -u redmine -p --databases redmine --add-drop-table > redmine_dump_data.sql
  • No labels