We are happy to announce new BitNami Redmine stacks for the 2.1.3 and 1.4.5 versions of the popular project management tool. Both versions are running now the latest stable version of Ruby, 1.9.3-p327 and the latest passenger 4 beta which significantly improve the performance of the application. Check our previous post for more details of the enhancements we have been implementing for all Ruby-based apps in the BitNami library.
If you are an existing Redmine user, the rest of the article explains step-by-step instructions on how to upgrade to the latest version using the BitNami stack.
First, check the plugins that you are currently using and make sure that they support the latest 2.1.x version. If your plugins are not compatible with the 2.x releases, you may want to upgrade to the latest BitNami Redmine 1.4.5 version instead.
Next, create a backup of your previous installation. It is necessary to create a database backup and make a copy of your uploaded files. The steps below are valid to upgrade from a previous BitNami Redmine installation, in a non-BitNami installation the process should be similar.
$ /installdir/mysql/bin/mysqldump -u root -p bitnami_redmine > redmine_backup.sql
$ tar -czvf redmine-files.tar.gz /installdir/apps/redmine/htdocs/files
The next step is to install the new BitNami Redmine version. You can download a native installer, the virtual machine or start a new instance in the Amazon cloud. You can use the same machine or you can consider migrating your servers to the cloud (heck out some reasons why you may want to move your infrastructure to the cloud)
Once you have the new Redmine version running, install the plugins that you need. Then copy the database backup and the files directory backup to the machine and restore them. Check that you are running these command from the BitNami Redmine console, so the appropriate environment variables are preloaded.
$ /installdir/mysql/bin/mysql -u root -p bitnami_redmine < redmine_backup.sql
$ tar -xzvf redmine-files.tar.gz /installdir/apps/redmine/htdocs/
Next, migrate the database to the new version.
$ cd /installdir/apps/redmine/htdocs
$ rake db:migrate RAILS_ENV=production
If you have installed plugins, you should run the following command:
$ rake redmine:plugins:migrate RAILS_ENV=production
Alternativelt, if you are using the 1.4.x version, the migration command is the following:
$ rake db:migrate_plugins RAILS_ENV=production
If you find any issue during the migration, check our Wiki or post in our forum. Now you can start Redmine again and access it via the web. You will probably want to configure the email settings in the new Redmine installation in the "/installdir/apps/redmine/htdocs/config/configuration.yml" file. You can find here an example using a GMail account.
Finally, some users also want to change the URL to access the app from the root of the domain name (http://example.com instead of http://example.com/redmine). The below provides sample configuration changes.
DocumentRoot /installdir/apps/redmine/htdocs/public
#Alias /redmine /installdir/apps/redmine/htdocs/public
<Directory "/installdir/apps/redmine/htdocs/public">
Options -MultiViews
allow from all
</Directory>
#<Location /redmine>
# SetEnv RAILS_RELATIVE_URL_ROOT "/redmine"
# RackBaseURI /redmine
#</Location>
PassengerPreStart http://example.com/
That's all! Enjoy your new, faster than ever Redmine, powered by BitNami.