Ubuntu 10.04 || redmine 1.2 버전 설치

1. 소스 다운로드

$ svn co svn://rubyforge.org/var/svn/redmine/branches/1.2-stable redmine-1.2

2. 소스 이동

$ mv redmine-1.2  /usr/share/redmine

3. 필요 패키지 설치

$ sudo apt-get install ruby1.8 libgemplugin-ruby libgemplugin-ruby1.8 libruby-extras libruby1.8-extras rake build-essential libcurl4-openssl-dev libopenssl-ruby1.8

$ gem install rails -v=2.3.11
$ gem install rack -v=1.1.1
$ gem install -v=0.4.2 i18n

4. Database 생성(MySQL)

create database redmine character set utf8;
create user 'redmine'@'localhost' identified by 'my_password';
grant all privileges on redmine.* to 'redmine'@'localhost';
grant all privileges on redmine.* to 'redmine'@'localhost' identified by 'my_password';

5. database.yml 수정

$ cd /usr/share/redmine/config
$ cp database.yml.example database.yml
$ vim database.yml
  adapter: mysql
  database: redmine
  host: localhost
  username: redmine
  password: my_password

6. Session Store 생성

$ rake generate_session_store

이때, 다음과 같은 오류 발생시

rake aborted
uninitialized constant Rake::DSL

대략 위와 같은 오류였는데..다음을 수정한다.

$ vim /usr/share/redmine/Rakefile
# Add your own tasks in files placed in lib/tasks ending in .rake,                                                                 
# for example lib/tasks/switchtower.rake, and they will automatically be available to Rake.

require(File.join(File.dirname(__FILE__), 'config', 'boot'))

require 'rake'
require 'rake/dsl_definition'
require 'rake/testtask'
require 'rake/rdoctask'

require 'tasks/rails'

require ‘rake/dsl_definition’ 부분을 추가해주면 된다.

7. Database 구조체 생성

$ RAILS_ENV=production rake db:migrate


Leave a Reply