우분투 레드마인 설치

1 개요[ | ]

우분투 레드마인 설치
  • redmine은 rails 기반으로 작성되어 있어 웹서버 없이 단독으로 구동이 가능한데, 여기서는 아파치를 통해 구동한다.

2 사전 작업[ | ]

root@zetawiki:~# apache2 -v
Server version: Apache/2.4.7 (Ubuntu)
Server built:   May  9 2017 16:14:10
root@zetawiki:~# apachectl -M | grep passenger
 passenger_module (shared)
root@zetawiki:~# dpkg -l | grep mysql-server
ii  mysql-server                        5.5.55-0ubuntu0.14.04.1           all          MySQL database server (metapackage depending on the latest version)
ii  mysql-server-5.5                    5.5.55-0ubuntu0.14.04.1           amd64        MySQL database server binaries and system database setup
ii  mysql-server-core-5.5               5.5.55-0ubuntu0.14.04.1           amd64        MySQL database server binaries

3 레드마인 설치[ | ]

root@zetawiki:~# apt-get install redmine redmine-mysql
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  dbconfig-common javascript-common libfcgi-ruby1.9.1 libfcgi0ldbl
  libjs-prototype libjs-scriptaculous rake ruby-actionmailer-3.2
  ruby-actionpack-3.2 ruby-activemodel-3.2 ruby-activerecord-3.2
  ruby-activeresyntaxhighlight-3.2 ruby-activesupport-3.2 ruby-arel ruby-atomic
  ruby-blankslate ruby-builder ruby-coderay ruby-erubis ruby-fcgi ruby
  ruby-hmac ruby-i18n ruby-journey ruby-json ruby-mail ruby-mime-types
  ruby-minitest ruby-multi-json ruby-mysql ruby-net-ldap ruby-oj ruby-
  ruby-polyglot ruby-rack-cache ruby-rack-openid ruby-rack-ssl ruby-rat
  ruby-rack1.4 ruby-rails-observers ruby-railties-3.2 ruby-sprockets ror
  ruby-thread-safe ruby-tilt ruby-treetop ruby-tzinfo ruby-yajl zip
Suggested packages:
  ruby-rmagick bzr cvs darcs git mercurial subversion ruby-bcrypt
  ruby-builder-doc treetop doc-base
The following packages will be REMOVED:
  ruby-rack
The following NEW packages will be installed:
  dbconfig-common javascript-common libfcgi-ruby1.9.1 libfcgi0ldbl
  libjs-prototype libjs-scriptaculous rake redmine redmine-mysql
  ruby-actionmailer-3.2 ruby-actionpack-3.2 ruby-activemodel-3.2
  ruby-activerecord-3.2 ruby-activeresyntaxhighlight-3.2 ruby-activesupport-3.2
  ruby-arel ruby-atomic ruby-blankslate ruby-builder ruby-coderay rubys
  ruby-fcgi ruby-hike ruby-hmac ruby-i18n ruby-journey ruby-json ruby-
  ruby-mime-types ruby-minitest ruby-multi-json ruby-mysql ruby-net-ld
  ruby-oj ruby-openid ruby-polyglot ruby-rack-cache ruby-rack-openid
  ruby-rack-ssl ruby-rack-test ruby-rack1.4 ruby-rails-observers
  ruby-railties-3.2 ruby-sprockets ruby-thor ruby-thread-safe ruby-til
  ruby-treetop ruby-tzinfo ruby-yajl zip
0 upgraded, 51 newly installed, 1 to remove and 142 not upgraded.
Need to get 8,015 kB of archives.
After this operation, 32.3 MB of additional disk space will be used.
Do you want to continue? [Y/n]
... (생략)
Setting up libjs-prototype (1.7.1-3) ...
Setting up libjs-scriptaculous (1.9.0-2) ...
Setting up redmine (2.4.2-1) ...
Package configuration                                                           

 ┌────────────┤ Configuring redmine ├─────────────┐  
 │                                                                           │  
 │ The redmine/instances/default package must have a database installed and  │  
 │ configured before it can be used.  This can be optionally handled with    │  
 │ dbconfig-common.                                                          │  
 │                                                                           │  
 │ If you are an advanced database administrator and know that you want to   │  
 │ perform this configuration manually, or if your database has already      │  
 │ been installed and configured, you should refuse this option.  Details    │  
 │ on what needs to be done should most likely be provided in                │  
 │ /usr/share/doc/redmine/instances/default.                                 │  
 │                                                                           │  
 │ Otherwise, you should probably choose this option.                        │  
 │                                                                           │  
 │ Configure database for redmine/instances/default with dbconfig-common?    │  
 │                                                                           │  
 │                    <Yes>                       <No>                       │  
 │                                                                           │  
 └──────────────────-───────────────────┘
→ Yes 선택된 채로 Enter
Package configuration                                                           

 ┌────────────┤ Configuring redmine ├─────────────┐  
 │ The redmine/instances/default package can be configured to use one of     │  
 │ several database types. Below, you will be presented with the available   │  
 │ choices.                                                                  │  
 │                                                                           │  
 │ Database type to be used by redmine/instances/default:                    │  
 │                                                                           │  
 │                                  sqlite3                                  │  
 │                                  pgsql                                    │  
 │                                  mysql                                    │  
 │                                                                           │  
 │                                                                           │  
 │                    <Ok>                        <Cancel>                   │  
 │                                                                           │  
 └──────────────────-───────────────────┘
→ mysql 선택된 채로 Enter
Package configuration                                                           

 ┌────────────┤ Configuring redmine ├─────────────┐  
 │ Please provide a password for redmine/instances/default to register with  │  
 │ the database server.  If left blank, a random password will be            │  
 │ generated.                                                                │  
 │                                                                           │  
 │ MySQL application password for redmine/instances/default:                 │  
 │                                                                           │  
 │ ********_________________________________________________________________ │  
 │                                                                           │  
 │                    <Ok>                        <Cancel>                   │  
 │                                                                           │  
 └──────────────────-───────────────────┘
→ MySQL 패스워드 입력 Enter
Package configuration                                                           

 ┌────────────┤ Configuring redmine ├─────────────┐  
 │ Please provide a password for redmine/instances/default to register with  │  
 │ the database server.  If left blank, a random password will be            │  
 │ generated.                                                                │  
 │                                                                           │  
 │ MySQL application password for redmine/instances/default:                 │  
 │                                                                           │  
 │ ********_________________________________________________________________ │  
 │                                                                           │  
 │                    <Ok>                        <Cancel>                   │  
 │                                                                           │  
 └──────────────────-───────────────────┘
→ 레드마인 어드민 패스워드 지정
Package configuration                                                           

   ┌──┤ Configuring redmine ├─-┐                       
   │                                │                       
   │                                │                       
   │ Password confirmation:         │                       
   │                                │                       
   │ ********______________________ │                       
   │                                │                       
   │     <Ok>         <Cancel>      │                       
   │                                │                       
   └────────────────┘
→ 레드마인 어드민 패스워드 한번 더 입력
... (생략)
 * Reloading web server apache2                                        * 
Setting up libfcgi0ldbl (2.4.0-8.1ubuntu5) ...
Setting up ruby-fcgi (0.9.2.1-1) ...
Setting up libfcgi-ruby1.9.1 (0.9.2.1-1) ...
Setting up ruby-json (1.8.0-1build1) ...
Setting up ruby-oj (2.5.3-1) ...
Setting up ruby-yajl (1.2.0-1) ...
Setting up zip (3.0-8) ...
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...

4 gem 업데이트, bundler 설치[ | ]

root@zetawiki:~# gem -v
1.8.23
root@zetawiki:~# gem update
Updating installed gems
Nothing to update
root@zetawiki:~# gem install bundler
Fetching: bundler-1.15.0.gem (100%)
Successfully installed bundler-1.15.0
1 gem installed
Installing ri documentation for bundler-1.15.0...
Installing RDoc documentation for bundler-1.15.0...
root@zetawiki:~# bundler -v
Bundler version 1.15.0

5 아파치 설정[ | ]

  • passenger.conf 파일 수정
root@zetawiki:~# vi /etc/apache2/mods-available/passenger.conf
  • 수정 전
<IfModule mod_passenger.c>
  PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
  PassengerDefaultRuby /usr/bin/ruby
</IfModule>
  • 수정 후
<IfModule mod_passenger.c>
  PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
  PassengerDefaultRuby /usr/bin/ruby
  PassengerDefaultUser www-data
  PassengerRuby /usr/bin/ruby
</IfModule>
  • 심볼릭 링크 생성
root@zetawiki:~# ln -s /usr/share/redmine/public /var/www/html/redmine
root@zetawiki:~# ll /var/www/html/redmine
lrwxrwxrwx 1 root root 25 May 24 13:53 /var/www/html/redmine -> /usr/share/redmine/public/
  • 000-default.conf 파일 하단에 내용 추가
root@zetawiki:~# vi /etc/apache2/sites-available/000-default.conf
<Directory /var/www/html/redmine>
    RailsBaseURI /redmine
    PassengerResolveSymlinksInDocumentRoot on
</Directory>
  • Gemfile.lock 파일 생성, 소유자 변경
root@zetawiki:~# touch /usr/share/redmine/Gemfile.lock
root@zetawiki:~#
  • 퍼미션 조정
root@zetawiki:~# chown -R www-data:www-data /usr/share/redmine/
root@zetawiki:~# chmod -R 755 /usr/share/redmine/
root@zetawiki:~#
  • 아파치 재시작
root@zetawiki:~# service apache2 restart
 * Restarting web server apache2

6 확인 및 패스워드 변경[ | ]

( http://서버주소 로 접속하면 아파치 기본 화면이 표시된다. )
  • admin / admin 으로 로그인
  • 우상단 'admin' 클릭
  • 오른쪽 '편집' 클릭
  • 비밀번호 및 비밀번호 확인 입력 후 [저장] 클릭

7 (Optional) 레드마인 웹루트 변경[ | ]

8 같이 보기[ | ]

9 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}