개발개발/LINUX

대충 레드마인(redmine) 설치하기.

꾸냥 2012. 1. 20. 11:15
trac 이라는 버전관리 프로그램이 있는데. 이것을 좀 더 쓰기 편하고 이쁘게 만든것이 레드마인이라고 한다. 아마도... 아직 써보진 못해서.

우선 쓰기 위해 설치를 해야되니 설치 및 세팅 과정을 까먹기를 대비하여 적음

레드마인 사이트는 http://www.redmine.org/

레드마인은 ruby 언어 위에 다양한 데이터베이스를 지원하는거 같음. 우선 난 mysql 로 쓰기로 함. (이미 서버에 설치됨)

우선 루비 설치
# yum install ruby ruby-libs ruby-mode ruby-rdoc ruby-irb ruby-ri ruby-docs ruby-devel rubygems rubygem-flexmock

데이터베이스 세팅
# mysql -u ....
mysql> GRANT ALL PRIVILEGES ON * .* TO ...

레드마인 압축풀기
# wget "http://rubyforge.org/frs/download.php/75597/redmine-1.3.0.tar.gz"
# tar -zxvf redmine-1.3.0.tar.gz

레드마인 데이터베이스 설정
# cd 레드마인설치디렉토리/config
# cp -a database.yml.example database.yml
# vim database.yml
production를 데이터베이스 세팅값으로 수정함

mysql 연동 모듈 설치함
# gem install mysql
Building native extensions.  This could take a while...
ERROR:  Error installing mysql:
        ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb
checking for mysql_ssl_set()... no
checking for rb_str_set_len()... no
checking for rb_thread_start_timer()... no
checking for mysql.h... no
checking for mysql/mysql.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/usr/bin/ruby
        --with-mysql-config
        --without-mysql-config


Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/mysql-2.8.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out

젠장 에러남. 흠... 구글신이시여~

"넌 gcc 와 make 가 없도다~" 젠장 이거 안깔았었나?

예~ 설치
# yum install gcc make

예~ 재시도
# gem install mysql
Building native extensions.  This could take a while...
Successfully installed mysql-2.8.1
1 gem installed
Installing ri documentation for mysql-2.8.1...
...
...
No definition for ...

ruby에 mysql 설치 되었는지 확인
# irb
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'mysql'
=> true
irb(main):003:0>

완료~ 이제~ 뭐하지~

redmine 환경설정~~~!!! 아직 산넘어 산이구나~ ㅋㅋㅋ
# cd /레드마인설치위치/

# rake generate_session_store
-bash: rake: command not found

젠장 rake 없어? 그럼 깔아
# gem install rake
Successfully installed rake-0.9.2.2
1 gem installed
Installing ri documentation for rake-0.9.2.2...
Installing RDoc documentation for rake-0.9.2.2...

# rake generate_session_store
Please install RDoc 2.4.2+ to generate documentation.

뭐야 저거 깔아야되? 그럼 깔아!
# gem install rdoc
Building native extensions.  This could take a while...
Depending on your version of ruby, you may need to install ruby rdoc/ri data:

<= 1.8.6 : unsupported
 = 1.8.7 : gem install rdoc-data; rdoc-data --install
 = 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!
Successfully installed json-1.6.5
Successfully installed rdoc-3.12
2 gems installed
Installing ri documentation for json-1.6.5...
Installing ri documentation for rdoc-3.12...
Installing RDoc documentation for json-1.6.5...
Installing RDoc documentation for rdoc-3.12...

무지 오래걸리네. 다시한번 시도
# rake generate_session_store

오홋 끝 그 다음은... 흠... RAILS_ENV 환경설정을 해줘야 되는군
# RAILS_ENV=production rake db:migrate
rake aborted!
Could not find RubyGem rack (~> 1.1.0)

Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)

엥? 뭐야 rack 가 없는거야? 휴...ㅠㅠ 오지게 설치하네 ㅠㅠ
# gem install rack
Successfully installed rack-1.4.0
1 gem installed
Installing ri documentation for rack-1.4.0...
Installing RDoc documentation for rack-1.4.0...

다시한번 시도
# RAILS_ENV=production rake db:migrate
rake aborted!
RubyGem version error: rack(1.4.0 not ~> 1.1.0)

Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)

ㅋㅋㅋ
1.4.0 은 안된다네. 대신 1.1.0 보다는 커야되고
# gem list --remote --all rack
*** REMOTE GEMS ***

Rack (2.0.0, 1.1.3, 1.1.2, 1.1.1)
rack (1.4.0, 1.3.6, 1.3.5, 1.3.4, 1.3.3, 1.3.2, 1.3.1, 1.3.0, 1.2.5, 1.2.4, 1.2.3, 1.2.2, 1.2.1, 1.2.0, 1.1.3, 1.1.2, 1.1.1, 1.1.0, 1.0.1, 1.0.0, 0.9.1, 0.9.0, 0.4.0, 0.3.0, 0.2.0, 0.1.0)
....

흠. 그럼 1.1.2 로 해볼까나
# gem install rack
Successfully installed rack-1.4.0
1 gem installed
Installing ri documentation for rack-1.4.0...
Installing RDoc documentation for rack-1.4.0...
[root@localhost /]# gem install rack -v=1.1.1
Successfully installed rack-1.1.1
1 gem installed
Installing ri documentation for rack-1.1.1...
Installing RDoc documentation for rack-1.1.1...

다시한번시도
# RAILS_ENV=production rake db:migrate
...
...

어랏 어마어마한 작업들 흠... 에러는 없는거 같군

마지막 설정인거 같군
오호호 처음 보는 커멘드 언어를 입력하라네. 대~한민국 ko

# RAILS_ENV=production rake redmine:load_default_data

Select language: bg, bs, ca, cs, da, de, el, en, en-GB, es, eu, fa, fi, fr, gl, he, hr, hu, id, it, ja, ko, lt, lv, mk, mn, nl, no, pl, pt, pt-BR, ro, ru, sk, sl, sr, sr-YU, sv, th, tr, uk, vi, zh, zh-TW [en] ko
====================================
Default configuration data loaded.

끝... 드디어 끝인가!!!!

두둥~ 웹서비스 구동
# ruby script/server webrick -e production

테스트~
http://ip:3000

... 아무것도 없음 쿨럭 이제 뭐해야되지... 설치는 겨우 했다만...

나머지 세팅은... 이제 공부해야겠군. 여하튼 설치 끝!!!

ㅋㅋㅋㅋ 끝인줄 알았다.

다시 시작 apache 에 등록하기!!!

passenger 를 사용하여 apache 에 등록하기
# gem install passenger
Building native extensions.  This could take a while...
Successfully installed fastthread-1.0.7
Successfully installed daemon_controller-0.2.6
Successfully installed passenger-3.0.11
3 gems installed
Installing ri documentation for fastthread-1.0.7...
Installing ri documentation for daemon_controller-0.2.6...
Installing ri documentation for passenger-3.0.11...
Installing RDoc documentation for fastthread-1.0.7...
Installing RDoc documentation for daemon_controller-0.2.6...
Installing RDoc documentation for passenger-3.0.11...

# passenger-install-apache2-module 
Welcome to the Phusion Passenger Apache 2 module installer, v3.0.11.

This installer will guide you through the entire installation process. It
shouldn't take more than 3 minutes in total.

Here's what you can expect from the installation process:

 1. The Apache 2 module will be installed for you.
 2. You'll learn how to configure Apache.
 3. You'll learn how to deploy a Ruby on Rails application.

Don't worry if anything goes wrong. This installer will advise you on how to
solve any problems.

Press Enter to continue, or Ctrl-C to abort.
라고 나온다 숫자를 눌러 필요한 모듈을 깔면됨.

하하하 모르겠다...ㅡㅡ;
반응형