Upgrading Redmine on Ubuntu 10.04

In this post I’d like to describe the process of upgrading Redmine from 0.8 release to a new stable version (1.1) acompanied by a migration to a new host. Before we begin please visit the official upgrade guide since it lists all the details that would suffice most of the users.

  1. Save the content of your DB, I’m using MySQL, and the Redmine’s uploads.
  2. # mysqldump --add-drop-database --add-drop-table -C -e redmine -uredmine -p > /tmp/redmine.sql
    # tar -cpjf /tmp/redmine_files.tar.bz2 /var/www/redmine/files/ 
  3. Prepare a new server and install the missing required software. In my case I had to install the following packages:
  4. # apt-get install subversion rubygems rake librack-ruby librack-ruby1.8 libmysql-ruby1.8
  5. cd to a directory where you’d like Redmine to be installed, I used /var/www, and check out from the SVN repository as it’s a recommended way.
  6. cd /var/www
    svn co http://redmine.rubyforge.org/svn/branches/1.1-stable redmine-1.1
  7. Due to the requirements imposed by Redmine I had to install several gems manually:
    • gem install rack -v=1.0.1
    • gem install rails -v=2.3.5
    • gem install -v=0.4.2 i18n
  8. Create a new database and copy previously saved database’s sql dump and the upload directory from the old server.
  9. mysql -uroot -p
    mysql> create database redmine;
    mysql> grant all privileges on redmine.* to 'redmine'@'localhost' identified by 'redmine_password';
    # mysql -b redmine -uredmine -p < /tmp/redmine.sql 
  10. Copy config/database.yml and config/email.yml from the old server.
  11. Change into Redmine's directory and run the upgrade.
  12. # cd /var/www/redmine-1.1
    # rake generate_session_store
    # rake db:migrate RAILS_ENV=production 
    # rake db:migrate:upgrade_plugin_migrations RAILS_ENV=production
    # rake db:migrate_plugins RAILS_ENV=production
  13. Finally I installed and configured Phusion_Passenger as described in my other post.
  14. Don't forget to set DocumentRoot and PassengerAppRoot to corerctly point to the Redmin's installation. In my case it was:

    DocumentRoot /var/www/redmine-1.1/public
    PassengerAppRoot /var/www/redmine-1.1
    
  15. As the last step, change the owner of the Redmine's files to belong to the Apache's user (in Ubuntu it's www-data).
  16. # chown -R www-data:www-data /var/www/redmine-1.1
Posted on February 15, 2011 at 1:25 pm by sergeyt · Permalink
In: Linux

Leave a Reply