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.
- Save the content of your DB, I’m using MySQL, and the Redmine’s uploads.
- Prepare a new server and install the missing required software. In my case I had to install the following packages:
- 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.
- 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
- Create a new database and copy previously saved database’s sql dump and the upload directory from the old server.
- Copy config/database.yml and config/email.yml from the old server.
- Change into Redmine's directory and run the upgrade.
- Finally I installed and configured Phusion_Passenger as described in my other post.
- 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).
# 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/
# apt-get install subversion rubygems rake librack-ruby librack-ruby1.8 libmysql-ruby1.8
cd /var/www svn co http://redmine.rubyforge.org/svn/branches/1.1-stable redmine-1.1
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
# 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
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
# chown -R www-data:www-data /var/www/redmine-1.1