Search This Blog

Monday, September 30, 2013

Upgrade Redmine from 2.0.3 to 2.3.3, ruby 1.9.1 to 2.0

1.First backup everything:

1.1 backup database
1.2 backup redmine folder
1.3 backup /usr/local/ if you installed ruby manually.


2.Stop httpd service:

service httpd stop


3.Upgrade Rails version to 3.2.13

4.Remove ruby 1.9.1

rm -rf /usr/local/lib/ruby/1.9.1/
rm -rf /usr/local/lib/ruby/gems/1.9.1/
rm -rf /usr/local/include/ruby-1.9.1/


5.Install ruby 2.0

wget http://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p247.tar.gz
tar -xzvf ruby-2.0.0-p247.tar.gz
cd ruby-2.0.0-p247
./configure
make
make install
ruby -v
which ruby


6.Copy redmine config file to New stable 2.3.3


wget http://rubyforge.org/frs/download.php/77138/redmine-2.3.3.tar.gz
tar -xzvf redmine-2.3.3.tar.gz

cp /var/lib/redmine/config/database.yml ./config/database.yml
cp /var/lib/redmine/config/configuration.yml.example ./config/configuration.yml
cp /var/lib/redmine/files/* ./files/
rm ./files/delete.me


7.Copy plugins (version >= 2.0)

cp -r /var/lib/redmine/plugins/ ./plugins/


8.Re-compile passenger:

gem install passenger --no-rdoc --no-ri
passenger-install-apache2-module


9.Configure Apache mode: /etc/httpd/conf.d/passenger.conf

# Passenger Basic Setting
#
LoadModule passenger_module /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.19/buildout/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.19
PassengerDefaultRuby /usr/local/bin/ruby


10.Re-check redmine for Apache: /etc/httpd/conf.d/redmine.conf


ServerName localhost
DocumentRoot "/var/www/redmine-2.3.3/public/"

# This relaxes Apache security settings.
AllowOverride all
# MultiViews must be turned off.
Options -MultiViews

ErrorLog logs/redmine-error_log
CustomLog logs/redmine-access_log common



11.clear the cache and the existing sessions:

rake tmp:cache:clear
rake tmp:sessions:clear


12.ReStart httpd service:

service httpd start


13.Check the error log

cat /var/log/httpd/redmine-error_log


14.Check daily backup tasks

1 comment:

  1. Thanks there. This blog hosting on bitparktech.com.

    ReplyDelete