Forum archive
[NEW] Guide: Turnkey Redmine Upgrade
INTRODUCTION
This is a short tutorial of the Turnkey Redmine Update. It is probably not a perfect tutorial because it is my first one, so please excuse my errors or my bad grammar.
I'm not native english.
If you have any questions or suggestions, please let me now in the comment section below.
PRECONFIGURATION
First of all we need to make sure we have the newest version of the linux/debian machine to have a secure installation.
TIP: Make sure you reboot the system after each installation or update to make sure that the changes were made successfully.
apt-get update
- downloads the package lists from the repositories and "updates" them to get information on the newest versions of packages and their dependencies. It will do this for all enabled repositories and PPAs.
apt-get upgrade
- will fetch new versions of packages existing on the machine if APT knows about these new versions by way of
apt-get update
Before I continued with the installation of Ruby and Ruby on Rails I first made a change tot he .bashrc file located in your root folder. I think the RVM (Ruby Version Manager) will have problems if you don’t change the path, so therefore I changed the following line in the .bashrc file:
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
- This is the original line that causes the error message when you install RVM.
Just write "$PATH:" after the equal sign, which will look something like this:
PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
You can also do this after the RVM installation, it will just warn you to do so.
RVM Installation
Ruby Version Manager is a very effective tool to install the latest versions of Ruby and Ruby on Rails and made my life a lot easier.
Follow these steps:
gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3 \curl -sSL https://get.rvm.io | bash -s stable
If your terminal doesn’t recognize the curl, then this means it’s not installed yet, just do gem install curl and run the command above again.
Now we have installed RVM successfully. Time to install the latest versions of Ruby and Ruby on Rails.
\curl -sSL https://get.rvm.io | bash -s stable --ruby \curl -sSL https://get.rvm.io | bash -s stable –rails
If you want to see the version you have installed use ruby –v or rails –v.
In case you don’t want the latest version, maybe a specific version for ruby or rails, then just run the same command but append the version at the end. E.g.
\curl -sSL https://get.rvm.io | bash -s stable --ruby=1.9.3
To make sure we use this version just type
rvm use <ruby version>
- E.g. to use v1.9.3:
rvm use 1.9.3
rvm --default use < ruby version>
Now you will use the selected version as default. I would suggest now to reboot the system.
Passenger and mysql2 installation
I am not exactly sure if you need to update passenger and mysql2 for your new Redmine, but in my case it was essential.
What you should also do is go into your public folder where your Redmine is installed.
cd var/www gem install passenger passenger-install-apache2-module
During this installation you will receive instructions in the terminal that tells you what to change in apache2 config file (path /etc/apache2/apache2.conf). In addition, you need to edit the given path in the passenger.config which you can find in /etc/apache2/config.d/passenger.config.
To finish the installation reload the apache server.
/etc/init.d/apache2 reload
Now we update the mysql to mysql2:
gem install mysql2
After this you need to open your database.yml in /var/www/redmine/config/database.yml and change every "mysql" to "mysql2".
Reboot the system.
REDMINE INSTALLATION
These steps will upgrade the redmine:
cd /var/www mv railsapp railsapp-old hg clone --updaterev 2.6-stable https://bitbucket.org/redmine/redmine-all railsapp cp railsapp-old/config/configuration.yml railsapp/config/configuration.yml cp railsapp-old/config/database.yml railsapp/config/database.yml cp -r railsapp-old/files/ railsapp/files/ chown -R root:www-data /var/www/railsapp cd railsapp gem install bundler gem install test-unit bundle install --without development test rmagick mkdir public/plugin_assets chown -R www-data:www-data files log tmp public/plugin_assets rake generate_secret_token rake db:migrate RAILS_ENV=production rake redmine:plugins:migrate RAILS_ENV=production chmod -R 755 files log/ tmp/ public/plugin_assets rake tmp:cache:clear rake tmp:sessions:clear
Check now if the version has been upgraded with:
/var/www/railsapp/script/about
Reboot the system and that’s it!
RESOURCES
/forum/general/20120722/guide-how-upgrade-red...
https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html
Well I upgraded from version 1.4.4 to 2.6.0 stable but it should work for any version above 2.0