반응형

2013.03.11


[선행]
$ mkdir /usr/local/src/redmine            #     레드마인 소스 디렉토리
$ adduser redmine                                #    레드마인 유저 생성
$ passwd redmine # 패스워드 셋팅        #     레드마인 패스워드 설정


#디비 설정
$ mysql -uroot
> CREATE DATABASE IF NOT EXISTS redmine; 
> grant all privileges on redmine.* to redmine@localhost identified by 'redminea' with grant option;
> FLUSH PRIVILEGES;



[libs]
$ yum -y install zlib-devel curl-devel openssl-devel apr-devel apr-util-devel mysql-devel ftp





[파일받기]
$ cd /usr/local/src/redmine
$ wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz ; tar xvpfz yaml-0.1.4.tar.gz ; mv yaml-0.1.4 ../..            # yaml library
$ wget ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.9.3-p392.tar.gz ; tar xpvfz ruby-1.9.3-p392.tar.gz ; mv ruby-1.9.3-p392 ../..            # ruby
$ wget http://rubyforge.org/frs/download.php/76729/rubygems-1.8.25.tgz ; tar xvfp rubygems-1.8.25.tgz ; mv rubygems-1.8.25 ../..            # rubygem
$ wget http://rubyforge.org/frs/download.php/76771/redmine-2.2.3.tar.gz ; tar xvpfz redmine-2.2.3.tar.gz ; mv redmine-2.2.3 ~redmine/            # redmine





[yaml]
$ cd /usr/local/yaml-0.1.4 ; ./configure --prefix=/usr/local ; make ; make install            # trouble shooting 2번





[ruby]
$ cd /usr/local/ruby-1.9.3-p392 ; ./configure --prefix=/usr/local --enable-shared --disable-install-doc --with-opt-dir=/usr/local/lib ; make ; make install
$ cd /usr/local/ruby-1.9.3-p392/ext/openssl ; ruby extconf.rb ; make ; make install              # trouble shooting 1번





[rubygem & bundler]
$ cd /usr/local/rubygems-1.8.25 ; ruby setup.rb ; gem install bundler






[redmine]
$ cd ~redmine/redmine-2.2.3/ ; bundle install --without development test postgresql sqlite rmagick 
$ mv config/database.yml.example config/database.yml 
$ vi config/database.yml # 수정  redmine2.x 는 mysql2 이다.
$ rake generate_secret_token ; RAILS_ENV=production rake db:migrate ; RAILS_ENV=production rake redmine:load_default_data ; mkdir public/plugin_assets ; chown -R redmine:redmine files log tmp public/plugin_assets ; chmod -R 755 files log tmp public/plugin_assets






[실행]
$ ruby script/rails server webrick -e production -d            # -d 옵션은 쉘 로그아웃후에도 background 로 실행





[확인]
브라우저로 http://ip:3000/ 으로 확인.





[trouble shooting]
1. redmine 설치 중
$ bundle install --without development test postgresql sqlite rmagick 
실행시 "Could not load OpenSSL." 에러 발생.

아래 링크로 해결
http://www.redmine.org/boards/2/topics/31268
$cd ext/openssl
$ruby extconf.rb
$make ; make install




2. rake generate_secret_token 실행시 
/usr/local/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
에러 발생

http://collectiveidea.com/blog/archives/2011/10/31/install-ruby-193-with-libyaml-on-centos/
yaml 설치로 해결



3. RAILS_ENV=production rake db:migrate 실행시
rake aborted!
Please install the mysql adapter: `gem install activerecord-mysql-adapter` (mysql is not part of the bundle. Add it to Gemfile.)

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


database.xml 에 mysql로 해놓았음. redmine2.x 는 db adapter 가 mysql2로 해야 한다.







[site]
http://www.devcu.com/install-redmine-2-0-3-nginx-centos-6/
http://www.redmine.org/projects/redmine/wiki/RedmineInstall
http://www.redmine.org/projects/redmine/wiki/How_to_Install_Redmine_on_CentOS_(Detailed)
http://www.redmine.org/boards/2/topics/31268
http://collectiveidea.com/blog/archives/2011/10/31/install-ruby-193-with-libyaml-on-centos/


반응형

+ Recent posts