RedMine 구축 (1)

니하·2024년 3월 12일

잡설 (intro)

redmine 을 구축하는 법에 대해 서술하려고 한다.

현재 다니고 있는 회사에서 일감관리를 위해 Redmine 을 사용하고 있었다.
2016년에 최초 구축하여 업데이트하지 않아 엄청 오래되고, 플러그인도 몇개 없어 되게 원초적인...상태 그대로 쓰고 있다가,

프로젝트 및 일감관리 효율을 위해 다른 오픈소스를 찾거나 관리를 하자고 얘기가 나와서 레드마인에 대해 알아보고 있었다.

그런데 자료도 별로 없고.. 에러도 나고..
Hyper-V 도 없어 스냅샷 없이 VMware 맨땅에 구축하다보니 가상디스크만 몇번을 지웠다 올렸따 지웠다 올렸다..

추후에 다시 레드마인을 구축할 일이 있을 경우를 대비해 레드마인 구축과정을 기록하겠다.

아 참고로, 기존에는 Redmine 3.2.1 버전을 사용하고있었어서 버전을 동일하게 맞춘 뒤 이것저것 고도화(?) 를 시도해보려고 하였으나, ubuntu 버전 및 3rd party 버전을 Redmine 공식 가이드와 동일하게 맞추고 설치를 해도 매번 번번히 난해한 에러코드를 뱉으면서 apache2 및 passenger 실행 부터 실패하였다..

최신 버전으로 구축을 권장한다.
(다만 플러그인은 3.x.x,4.x.x 버전이 제일 호환되는 것이 많아보여서 4.x.x 버전대가 제일 알맞은 것 같기도 하다)

이 글을 쓰다가 귀찮고 힘들어서,,, hyper-v를 구성하고 왔다
(참고: https://velog.io/@yeon_/win-10-Home-%EC%97%90%EC%84%9C-Hyper-V-%EB%A1%9C-%EB%A6%AC%EB%88%85%EC%8A%A4-%EA%B5%AC%EC%84%B1%ED%95%98%EA%B8%B0)

하여튼간에, Redmine 구성에 대해서 한국 자료가 별로 없는 듯 하여 포스팅을 해본다.

본인은 완전 로컬머신으로 막 굴릴것이라서, root 권한을 남발할것이라..
root 권한 등에 주의하길 바란다.

1. 레드마인 설치

레드마인 설치 자체는 공식에 있는 가이드를 따라서 하면 간단하다.
이 글을 설치하는 동안, 5.1.2 버전이 새로 나와 나는 5.1.2 버전으로 구성하였다.
5.x.x 버전을 구성하려거든 해당 링크에서 버전명만 바꿔서 설치하면 된다.
다른 버전도 공식 가이드를 참고하면 된다.
*https://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_50x_on_Ubuntu_2004_with_Apache2

2. 레드마인 설치 시 에러

내가 위의 공식 가이드를 따라 설치하다가 에러난 케이스에 대해 설명하겠다.
1.bundler install
번들러 설치할때 나는 매번 에러가 났다..
그럴때 마다 exit 하고 (root 가 아닌 사용자 권한) gem update --system
로 gem update 해준 후 다시 bundler install 진행해주면된다.

만약 update 해도 안된다면, reboot 하고 install 해보면 된다.

 //install 하면 에러 발생
root@yeon-Virtual-Machine:/opt/redmine# bundle install


Unfortunately, an unexpected error occurred, and Bundler cannot continue.

First, try this link to see if there are any existing issue reports for this error:
https://github.com/rubygems/rubygems/search?q=undefined+class%2Fmodule+YAML++Syck++&type=Issues

If there aren't any reports for this error yet, please fill in the new issue form located at https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md, and copy and paste the report template above in there.

root@yeon-Virtual-Machine:/opt/redmine# gem update --system

//update 후 다시 install 시 정상 install 됨
root@yeon-Virtual-Machine:/opt/redmine# bundle install


Post-install message from rubyzip:
RubyZip 3.0 is coming!
**********************

The public API of some Rubyzip classes has been modernized to use named
parameters for optional arguments. Please check your usage of the
following classes:
 * `Zip::File`
 * `Zip::Entry`
 * `Zip::InputStream`
 * `Zip::OutputStream`

Please ensure that your Gemfiles and .gemspecs are suitably restrictive
to avoid an unexpected breakage when 3.0 is released (e.g. ~> 2.3.0).
See https://github.com/rubyzip/rubyzip for details. The Changelog also
lists other enhancements and bugfixes that have been implemented since
version 2.3.0.
  1. 500 error
    레드마인 구축이 정상적으로 다 끝났는데, 가끔씩 500 error 라던가 internal error 가 발생할때가 있다.
    그럴때는 99.9% 권한 문제다. chmod 로 권한 부여를 해주면 된다.
#전체 사용자에게 redmine-5.1.2 에 대해 모든 권한 부여
sudo chmod -R 777 /opt/redmine-5.1.2/

##특정 사용자에게만 권한 부여하기 (redmine)

# 그룹 생성
sudo groupadd redmineusers

# redmine 사용자를 그룹에 추가
sudo usermod -aG redmineusers redmine

# 해당 디렉토리 및 하위 디렉토리에 대해 그룹에 대한 쓰기 권한 부여
sudo chgrp -R redmineusers /opt/redmine-5.1.2/
sudo chmod -R 770 /opt/redmine-5.1.2/

3. 플러그인 설치

레드마인을 그냥 생짜로 쓰기엔 너무 아쉽다.
내가 설치한 플러그인들을 간단하게 남겨둘테니, 링크로 들어가서 참고하면 된다.

참고로 모든 플러그인은 설치 후, apache2를 재시작하여야 적용 된다.

플러그인을 정상 적용했는데 에러가 날 경우는 아래를 참고하여 플러그인 마이그레이션 및 클린업을 한 후 apache2를 재시작해보면된다. 그래도 안되면.. 권한 문제거나.. 플러그인 호환성 문제거나 .. 중 하나다

# DB 마이그레이션
redmine $  bundle exec rake db:migrate RAILS_ENV=production

# 플러그인 마이그레이션
redmine $  bundle exec rake redmine:plugins:migrate RAILS_ENV=production

# 클린업
redmine $  bundle exec rake tmp:cache:clear tmp:sessions:clear RAILS_ENV=production
  1. 동적 일감 편집 툴 (편한 일감 수정 툴)
    링크 - https://www.redmine.org/plugins/redmine_issue_dynamic_edit
#레드마인 plugin 경로로 이동
cd /opt/redmine/plugins
git clone https://github.com/Ilogeek/redmine_issue_dynamic_edit.git


#apache2 재시작
systemctl restart apache2
  1. 태그 추가하기 및 생산성 툴
    링크 -https://www.redmine.org/plugins/additional_tags
#redmine 경로로 이동 (플러그인x)
cd $REDMINE_ROOT
#플러그인 설치 (additionals 와 additinal_tag 같이 설치)
git clone -b stable https://www.github.com/alphanodes/additionals.git plugins/additionals
git clone -b stable https://www.github.com/alphanodes/additional_tags.git plugins/additional_tags
bundle install
bundle exec rake redmine:plugins:migrate RAILS_ENV=production
  1. 코드 리뷰
    링크-https://www.redmine.org/plugins/redmine_code_review
#레드마인 plugin 경로로 이동
cd /opt/redmine/plugins
#플러그인 설치
git clone https://github.com/haru/redmine_code_review.git
rake redmine:plugins:migrate RAILS_ENV=production
  1. 듀 데이트 설정
    링크-https://www.redmine.org/plugins/context-menu-due-date
#레드마인 plugin 경로로 이동
cd /opt/redmine/plugins
#플러그인 설치
git clone https://github.com/ablidadev/context_menu_due_date
  1. 업무흐름 커스텀 플러그인
    링크- https://www.redmine.org/plugins/redmine_custom_workflows
#레드마인 plugin 경로로 이동
cd /opt/redmine/plugins
#플러그인 설치
git clone https://github.com/anteo/redmine_custom_workflows.git
#레드마인 경로로 이동 
cd ../
bundle install
RAILS_ENV=production bundle exec rake redmine:plugins:migrate NAME=redmine_custom_workflows
  1. DMSF
    링크- https://www.redmine.org/plugins/redmine_dmsf
#레드마인 plugin 경로로 이동
cd /opt/redmine/plugins
#플러그인 설치
git clone https://github.com/danmunn/redmine_dmsf.git
#레드마인 경로로 이동 
cd ../
bundle install
bundle config set --local without 'development test'
bundle install
RAILS_ENV=production bundle exec rake redmine:plugins:migrate NAME=redmine_dmsf
chown -R www-data:www-data plugins/redmine_dmsf
  1. 문서 숏컷
    링크- https://www.redmine.org/plugins/redmine_documents_short
#레드마인 plugin 경로로 이동
cd /opt/redmine/plugins
#플러그인 설치
git clone https://github.com/smoreau/redmine_documents_short.git

8.예상 시간 숨기기
링크- https://www.redmine.org/plugins/redmine_hide_estimated_hours

#레드마인 plugin 경로로 이동
cd /opt/redmine/plugins
#플러그인 설치
git clone https://github.com/return1/redmine_hide_estimated_hours.git
  1. 이슈 to-do list
    경로- https://www.redmine.org/plugins/redmine_issue_todo_lists2
#레드마인 plugin 경로로 이동
cd /opt/redmine/plugins
#플러그인 설치
git clone https://github.com/jcatrysse/redmine_issue_todo_lists2.git
#레드마인 경로로 이동
cd ../
bundle exec rake redmine:plugins:migrate NAME=redmine_issue_todo_lists2 RAILS_ENV=production
  1. logs
    경로- https://www.redmine.org/plugins/redmine_logs
#레드마인 plugin 경로로 이동
cd /opt/redmine/plugins
#플러그인 설치
git clone https://github.com/haru/redmine_logs.git
  1. 큰 캘린더
    경로- https://www.redmine.org/plugins/mega_calendar
#레드마인 plugin 경로로 이동
cd /opt/redmine/plugins
#플러그인 설치
git clone https://github.com/berti92/mega_calendar.git
#권한 설정
chown -R www-data.www-data mega_calendar
#플러그인 폴더로 이동
cd /opt/redmine/plugins/mega_calendar
#gem install
bundle
#레드마인 경로로 이동 
cd ../../
#마이그레이션
bundle install
bundle exec rake redmine:plugins:migrate RAILS_ENV=production
  1. MS 프로젝트 연결
    경로- https://www.redmine.org/plugins/microsoft_project_connector
#레드마인  경로로 이동
cd /opt/redmine/
#플러그인 설치
git clone -b main https://github.com/conveniencable/microsoft_project_connector
  1. 오버뷰 개선
    경로- redmine.org/plugins/redmine_better_overview
#레드마인  경로로 이동
cd /opt/redmine/
#플러그인 설치
git clone https://github.com/maxrossello/redmine_better_overview.git plugins/redmine_better_overview
bundle install
  1. 레드마인 대쉬보드
    링크- https://www.redmine.org/plugins/redmine-dashboard
#레드마인 plugin 경로로 이동
cd /opt/redmine/plugins
#플러그인 설치
git clone https://github.com/jgraichen/redmine_dashboard.git
#레드마인 경로로 이동 
cd ../
#마이그레이션
bundle install --without development test 
  1. 이슈 작성자 편집
    링크- https://www.redmine.org/plugins/redmine_editauthor
#레드마인 plugin 경로로 이동
cd /opt/redmine/plugins
#플러그인 설치
git clone https://github.com/nounderline/redmine_editauthor.git
  1. 레드마인 엑셀 연결
    링크- redmine.org/plugins/redmine_excel_connector
#레드마인  경로로 이동
cd /opt/redmine/
#플러그인 설치
git clone -b main https://github.com/conveniencable/redmine_excel_connector
bundle exec rake redmine:plugins:migrate RAILS_ENV=production
  1. 이슈 관람자
    링크- redmine.org/plugins/redmine_extended_watchers
#레드마인 plugin 경로로 이동
cd /opt/redmine/plugins
#플러그인 설치
git clone https://github.com/maxrossello/redmine_extended_watchers.git
  1. 다중 로그인
    링크- https://www.redmine.org/plugins/redmine_impersonate
#레드마인 plugin 경로로 이동
cd /opt/redmine/plugins
#플러그인 설치
git clone https://github.com/nounderline/redmine_impersonate.git
  1. 레드마인 OAuth
    링크- https://www.redmine.org/plugins/redmine_oauth
#레드마인 plugin 경로로 이동
cd /opt/redmine/plugins
#플러그인 설치
git clone https://github.com/kontron/redmine_oauth.git
chown -R www-data:www-data redmine_oauth
#레드마인 경로로 이동
cd ../
bundle install
  1. 레드마인 테마
    링크- https://www.redmine.org/plugins/redmine_pluggable_themes
#레드마인  경로로 이동
cd /opt/redmine
#테마 설치
git clone https://github.com/maxrossello/redmine_pluggable_themes.git plugins/redmine_pluggable_themes
  1. 위키 플러그인
    링크- redmine.org/plugins/redmine_paste_as_wiki_tables
#레드마인 plugin 경로로 이동
cd /opt/redmine/plugins
#플러그인 설치
git clone https://github.com/jcatrysse/redmine_paste_as_wiki_tables.git
bundle exec rake redmine:plugins:migrate NAME=redmine_paste_as_wiki_tables RAILS_ENV=production
  1. 위키 프레젠테이션 변환
    링크- https://www.redmine.org/plugins/redmine_reveal
#레드마인 plugin 경로로 이동
cd /opt/redmine/plugins
#플러그인 설치
git clone https://github.com/mikitex70/redmine_reveal.git
  1. 레드마인 숏컷
    링크- redmine.org/plugins/redmine_shortcuts
#레드마인 plugin 경로로 이동
cd /opt/redmine/plugins
#플러그인 설치
git clone https://github.com/davidegiacometti/redmine_shortcuts.git
  1. 레드마인 센트리 클라이언트
    링크-redmine.org/plugins/redmine_sentry_client
#레드마인 plugin 경로로 이동
cd /opt/redmine/plugins
#플러그인 설치
git clone https://github.com/jop-software/redmine_sentry_client.git
#레드마인 경로로 이동
cd ../
#번들 설치
bundle install
  1. 레드마인 sudo
    링크- https://www.redmine.org/plugins/redmine_sudo_mode
#레드마인 plugin 경로로 이동
cd /opt/redmine/plugins
#플러그인 설치
git clone https://github.com/jbbarth/redmine_sudo.git
#레드마인 경로로 이동
cd ../
#번들 설치
rake redmine:plugins:migrate
  1. 레드마인 기간 변경
    링크- https://www.redmine.org/plugins/redmine_translation_terms
#레드마인 경로로 이동
cd /opt/redmine
#플러그인 설치
git clone https://github.com/maxrossello/redmine_translation_terms.git plugins/translation_terms
  1. close date 추가

링크- https://www.redmine.org/plugins/redmine_closed_date

#레드마인 plugin 경로로 이동
cd opt/redmine/plugins
#플러그인 설치
git clone https://github.com/fraoustin/redmine_closed_date.git
#레드마인 경로로 이동 
cd ../
#번들 설치
bundle exec rake deface:precompile RAILS_ENV=production
bundle exec rake deface:clean RAILS_ENV=production
  1. redmine_admonition
    링크- redmine.org/plugins/redmine_admonition
#레드마인 plugin 경로로 이동
cd opt/redmine/plugins
#플러그인 설치
git clone https://github.com/fraoustin/redmine_admonition.git
  1. 레드마인 워터마크
    링크- https://www.redmine.org/plugins/redmine_watermark
#레드마인 plugin 경로로 이동
cd opt/redmine/plugins
#플러그인 설치
git clone https://github.com/witcan/redmine_watermark.git
  1. 일감 정보 제한
    링크- https://www.redmine.org/plugins/redmine_view_issue_description
#레드마인 plugin 경로로 이동
cd opt/redmine/plugins
#플러그인 설치
git clone https://github.com/redminetrustteam/redmine_view_issue_description.git
  1. redmine_indicator
    링크- https://www.redmine.org/plugins/redmine_indicator
#레드마인 plugin 경로로 이동
cd opt/redmine/plugins
#플러그인 설치
git clone https://github.com/fraoustin/redmine_indicator.git
#레드마인 경로로 이동
cd ../
#마이그레이션
rake redmine:plugins:migrate NAME=redmine_indicator
  1. 좋아요 기능
    링크- https://www.redmine.org/plugins/redmine_hearts
#레드마인 plugin 경로로 이동
cd opt/redmine/plugins
#플러그인 설치
git clone https://github.com/cat-in-136/redmine_hearts.git
#레드마인 경로로 이동
cd ../
#마이그레이션
rake redmine:plugins:migrate NAME=redmine_indicator
  1. dafalut_due 지정
    링크-https://www.redmine.org/plugins/redmine_default_due
#레드마인 plugin 경로로 이동
cd opt/redmine/plugins
#플러그인 설치
git clone https://github.com/fraoustin/redmine_default_due.git
#레드마인 경로로 이동
cd ../
#번들 실행
bundle exec rake deface:precompile RAILS_ENV=production
bundle exec rake deface:clean RAILS_ENV=production
  1. 다크모드
    링크-https://www.redmine.org/plugins/redmine_dark
#레드마인 plugin 경로로 이동
cd opt/redmine/plugins
#플러그인 설치
git clone https://github.com/fraoustin/redmine_dark.git

34.redmine_context_due
링크-https://www.redmine.org/plugins/redmine_context_due

#레드마인 plugin 경로로 이동
cd opt/redmine/plugins
#플러그인 설치
git clone https://github.com/fraoustin/redmine_context_due.git
  1. 메일 회신
    링크- https://www.redmine.org/plugins/reply-to-author-email
#레드마인 plugin 경로로 이동
cd opt/redmine/plugins
#플러그인 설치
git clone https://github.com/ablidadev/redmine_reply_to_author_email.git
  1. 레드와인
#레드마인 plugin 경로로 이동
cd opt/redmine/plugins
#플러그인 설치
git clone https://github.com/maxrossello/redwine.git plugins/redwine
bundle install
  1. redmine_rtmaterial
    링크- https://www.redmine.org/plugins/redmine_rtmaterial
#레드마인 plugin 경로로 이동
cd opt/redmine/plugins
#플러그인 설치
git clone https://github.com/fraoustin/redmine_rtmaterial.git
#레드마인 경로로 이동
cd ../
#번들 실행
rake redmine:plugins:migrate NAME=redmine_rtmaterial
  1. 투표 기능
    링크- https://www.redmine.org/plugins/redmine_scheduling_poll
#레드마인 plugin 경로로 이동
cd opt/redmine/plugins
#플러그인 설치
git clone https://github.com/cat-in-136/redmine_scheduling_poll.git
#레드마인 경로로 이동
cd ../
#번들 실행
bundle exec rake redmine:plugins NAME=redmine_scheduling_poll RAILS_ENV=production
  1. 테마 변경기능
    링크-https://www.redmine.org/plugins/redmine_theme_changer
#레드마인 plugin 경로로 이동
cd opt/redmine/plugins
#플러그인 설치
https://github.com/haru/redmine_theme_changer.git
#레드마인 경로로 이동
cd ../
#번들 실행
rake redmine:plugins:migrate RAILS_ENV=production

40.Time entities limit by estimation
경로- https://www.redmine.org/plugins/time_entries_limit_by_estimation

#레드마인 plugin 경로로 이동
cd opt/redmine/plugins
#플러그인 설치
git clone https://github.com/DigitalWand/time_entries_limit_by_estimation.git
  1. TW watchers
    링크- https://www.redmine.org/plugins/tw_watchers
#레드마인 plugin 경로로 이동
cd opt/redmine/plugins
#플러그인 설치
git clone https://github.com/terentev-mn/watchers.git
  1. 위키 확장
    링크- https://www.redmine.org/plugins/redmine_wiki_extensions
#레드마인 plugin 경로로 이동
cd opt/redmine/plugins
#플러그인 설치
git clone https://github.com/haru/redmine_wiki_extensions.git
#레드마인 경로로 이동
cd ../
#번들 실행
rake redmine:plugins:migrate RAILS_ENV=production
  1. View Customize
    링크-https://www.redmine.org/plugins/view_customize
#레드마인 plugin 경로로 이동
cd opt/redmine/plugins
#플러그인 설치
git clone https://github.com/onozaty/redmine-view-customize.git view_customize
#레드마인 경로로 이동
cd ../
#번들 실행
bundle install --without development test
bundle exec rake redmine:plugins:migrate RAILS_ENV=production
  1. 위키 덤프
    링크- https://www.redmine.org/plugins/wikidump
#레드마인 plugin 경로로 이동
cd opt/redmine/plugins
#플러그인 설치
git clone https://github.com/znerol/redmine_wikidump.git

45.workload
링크- https://www.redmine.org/plugins/redmine_workload

#레드마인 plugin 경로로 이동
cd opt/redmine/plugins
#플러그인 설치
git clone https://github.com/xmera-circle/redmine_workload.git
  1. Xapian search
    링크- https://www.redmine.org/plugins/xapian_search
#레드마인 plugin 경로로 이동
cd opt/redmine/plugins
#플러그인 설치
git clone https://github.com/xelkano/redmine_xapian.git
#레드마인 경로로 이동
cd ..
#번들 설치
bundle install
RAILS_ENV=production bundle exec rake db:migrate
RAILS_ENV=production bundle exec rake redmine:plugins:migrate NAME=redmine_xapian 

이 플러그인을 설치하다가 에러가 난다면, plugins/redmine_xapian/ 경로의 Gemfile 의 23번째 줄을 주석처리하면 된다.

profile
👾

0개의 댓글