To refresh Redmine cache, do the following from the Redmine directory (/usr/local/share/redmine, maybe ?):
rake tmp:cache:clear rake tmp:sessions:clear
This is a draft (but unlikely to be improved quickly, so published just in case it might help someone out there).
First: see previous post to install Redmine 2.1.0 (just don’t execute the second half of data filling and stuff: https://beeznest.wordpress.com/2012/09/20/installing-redmine-2-1-on-debian-squeeze-with-apache-modpassenger/
Second: get inspiration from the upgrade guide here: http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade
Third: *before* you call db:migrate, rename the changeset_parents table and possibly the queries_roles table to something else. For example:
rename table changeset_parents to changeset_parentsbak;
rename table queries_roles to queries_rolesbak;
Don’t forget to clean the cache and restart Apache…
This article is co-authored by Jérôme Warnier, from work mostly done by him with my occasional support. Kudos go to him.
We couldn’t find any valuable manual to install Redmine 2.1 on Debian Squeeze, and we sure met a lot of resistance along the way, so we came up with the following step-by-step guide…
Sources of inspiration
We used the following resources as a starting point. Thanks to their respective authors.
- http://madpropellerhead.com/random/20100820-installing-redmine-on-debian-with-apache (outdated, for Lenny)
We take as given that:
- We are using a Debian Squeeze installation
- We have root access to this machine
- There is public access to the machine itself (public IP)
- We are able to define a public domain (or subdomain) name for this Redmine installation
- We have access to define a database (we chose MySQL) user for Redmine (this is important to avoid security risks in sharing accounts with another web system). We also assume that we already have a MySQL server installation
- We will be using Apache 2’s modPassenger (and Apache 2 is already installed on the server)
- We will be using redmine.example.com; so every time you see this below, replace it by your own domain
We will first need to install basic packages:
apt-get install ruby rubygems libruby libapache2-mod-passenger
Download the latest version of Redmine (2.1.0 in our case) and untar it, then move it to /usr/local/share
ln /usr/local/share/redmine-2.1.0 /usr/local/share/redmine
chown -R root:root /usr/local/share/redmine-2.1.0
Install development libraries for MySQL:
apt-get install libmysqlclient-dev
Install development libs for Imagick:
apt-get install libmagickcore-dev libmagickwand-dev (install shitload of packages)
Running the Gem stuff
Install Bundler (removing useless module, which would otherwise create dependencies):
gem install bundler
/var/lib/gems/1.8/bin/bundle install --without development test postgresql sqlite
Copy config/database.yml.example to config/database.yml and edit this file in order to configure your database settings for “production” environment.
Example for a MySQL database using ruby1.8 or jruby:
Generate a session store secret:
Generate the database structure:
RAILS_ENV=production /var/lib/gems/1.8/bin/rake db:migrate
Generate default configuration data:
RAILS_ENV=production /var/lib/gems/1.8/bin/rake redmine:load_default_data
(using “es” for Spanish language in terminal prompt)
Setup config file in config/configuration.yml
Change database_ciphr_key: *******
/var/lib/gems/1.8/bin/rake db:encrypt RAILS_ENV=production
Setup Apache’s VirtualHost config
# 8080 in this case is because we use a reverse proxy before Apache. Otherwise use :80
There’s technically nothing special with the Apache config, given we use modPassenger, which makes Apache automatically detect Ruby files and interpret them with the right module… Just pointing to the right directory is enough.
Once you enable this virtual host (a2ensite redmine.example.com) and reload Apache (/etc/init.d/apache2/reload), you should see your site running on http://redmine.example.com.
The default login/password is admin/admin (don’t forget to change this).
I figured this little trick could be useful to some of you.
In the common situation of having to hire a subcontractor to execute one task inside a big project in Redmine, you might want to give him access to just one task and leave the project otherwise untouched. There’s no way to do that directly in Redmine, but thanks to a few other concepts, this is easy to do (at least as the Redmine administrator).
Step 1, create a new user account for the guy to include.
Step 2, go to the project’s Overview tab
Step 3, click New sub-project
Step 4, give a name to the project, assign the new user as a developer for this project (as well as all users watching the task to be shared) and finish the creation of the new project
Step 5, go back to the task you wanted to share. Click the Move top-right link
Step 6, reassign the task to the new sub-project (don’t change anything more)
That’s it, you’re done.
The new sub-project contains just one task, but the contractor will have access to only that sub-project, which means it is technically shared with that user without risking confidentiality issues about the rest of the tasks!
Redmine might be written in Ruby on Rails, but it is really a great piece of software for project management!