어제와 똑같이 살면서 다른 미래를 기대하지 말자

[CentOS] Redmine 2.4 to 3.2 Upgrade 본문

IT관심분야/Linux

[CentOS] Redmine 2.4 to 3.2 Upgrade

플랜액터 2016. 1. 6. 15:38
1. Ruby 버전 업그레이드 (루비버전관리툴 설치 rvm)
# yum install gcc-c++ patch readline readline-devel zlib zlib-devel 
# yum install libyaml-devel libffi-devel openssl-devel make 
# yum install bzip2 autoconf automake libtool bison iconv-devel

# curl -L get.rvm.io | bash -s stable

에러발생... 에러문구를 잘 확인해보면 해결 가능함.

(# gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3)


source /etc/profile.d/rvm.sh


원하는 루비버전 설치

# rvm install 1.9.3


2. 레드마인 최신버전 다운로드

# svn co https://svn.redmine.org/redmine/branches/3.2-stable /var/www/redmine-3.2


3. 기존파일들 복사

# cp -r /var/www/redmine-2.4/files/* /var/www/redmine-3.2/


4. 디비 연결설정

# cd /var/www/redmine-3.2/config

# cp database.yml.example database.yml


5. 번들 설치

# cd /var/www/redmine-3.2

# gem install bundler chef ruby-shadow --no-ri --no-rdoc

# bundle install --without development test postgresql sqlite rmagick


6. 토큰발행 (redmine 2.x 이상일 경우)

# bundle exec rake generate_secret_token

문제 발생 시 (미설치된 필요모듈을 설치해줌)

# bundle install


7. 기존 디비 마이그레이션

# RAILS_ENV=production bundle exec rake db:migrate

플러그인 디비 마이그레이션

# bundle exec rake redmine:plugins:migrate RAILS_ENV=production


8. Clean UP!!

bundle exec rake tmp:cache:clear tmp:sessions:clear RAILS_ENV=production


9. 패신져 설치/업그레이드, 환경설정

# gem install passenger

passenger-install-apache2-module


continue... Enter


Ruby 선택


--------------------------------------------

Almost there!


Please edit your Apache configuration file, and add these lines:


   LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.3-p551/gems/passenger-5.0.23/buildout/apache2/mod_passenger.so

   <IfModule mod_passenger.c>

     PassengerRoot /usr/local/rvm/gems/ruby-1.9.3-p551/gems/passenger-5.0.23

     PassengerDefaultRuby /usr/local/rvm/gems/ruby-1.9.3-p551/wrappers/ruby

   </IfModule>


After you restart Apache, you are ready to deploy any number of web

applications on Apache, with a minimum amount of configuration!


Press ENTER when you are done editing.


--------------------------------------------


Validating installation...


 * Checking whether this Passenger install is in PATH... ✓

 * Checking whether there are no other Passenger installations... (!)


   You are currently validating against Phusion Passenger 5.0.23, located in:


     /usr/local/rvm/gems/ruby-1.9.3-p551/gems/passenger-5.0.23/bin/passenger


...


      /etc/httpd/conf.d/passenger.conf

...


      LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.3-p551/gems/passenger-5.0.23/buildout/apache2/mod_passenger.so


# vi /etc/httpd/conf.d/passenger.conf

LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.3-p551/gems/passenger-5.0.23/buildout/apache2/mod_passenger.so

   <IfModule mod_passenger.c>

     PassengerRoot /usr/local/rvm/gems/ruby-1.9.3-p551/gems/passenger-5.0.23

     PassengerDefaultRuby /usr/local/rvm/gems/ruby-1.9.3-p551/wrappers/ruby

   </IfModule>


10. 아파치 설정
# vi /etc/httpd/conf/httpd.conf
<VirtualHost *:80>
        ServerName redmine.cbn-i.com
        DocumentRoot /var/www/redmine-3.2/public/
        <Directory "/var/www/redmine-3.2/public/">
                AllowOverride all
                Options -MultiViews
        </Directory>
</VirtualHost>

아파치 재시작
# /etc/init.d/httpd restart



참고페이지

http://www.redmine.org/projects/redmine/wiki/RedmineInstall#Requirements

http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade

http://a07274.tistory.com/344

Comments