redmine 2.2 stable specific
# update and upgrade server
sudo apt-get update
sudo apt-get upgrade
# if kernel updates:
sudo reboot
install some prerequisites
sudo apt-get install mysql-server mysql-client ruby rubygems \
build-essential libmysql-ruby libmysqlclient-dev subversion git \
imagemagick imagemagick-common libmagickcore-dev libmagickwand4 \
libmagickwand-dev
The install guide recommends the mysql2 gem for better performance. You'll also need bundler
sudo gem install mysql2
sudo gem install bundler
Make a redmine user, giving bash shell for now and download redmine into redmine's home directory
sudo useradd -d /usr/local/redmine -m -s /bin/bash redmine
cd ~redmine
sudo -u redmine -H svn co http://svn.redmine.org/redmine/branches/2.2-stable redmine-2.2
cd redmine-2.2
sudo bundle install --without development test postgresql sqlite
Create the mysql database for redmine
mysql -u root -p
create database redmine22 character set utf8;
create user 'redmine'@'localhost' identified by 'my_password';
grant all privileges on redmine22.* to 'redmine'@'localhost';
Configure redmine by editing config/database.yml
cd ~redmine/redmine-2.2
sudo -u redmine -H cp config/database.yml.example config/database.yml
sudo -u redmine -H vi config/database.yml
Use the following for production:
production:
adapter: mysql
database: redmine22
host: localhost
username: redmine
password: my_password
Generate the session store secret
sudo -u redmine -H rake generate_secret_token
Setup database schema and load default data
sudo -u redmine -H RAILS_ENV=production rake db:migrate
sudo -u redmine -H RAILS_ENV=production REDMINE_LANG=en rake redmine:load_default_data
Create some directories
sudo -u redmine -H mkdir tmp tmp/pdf public/plugin_assets
Test it. This should bring the server up on port 3000 with admin/admin credentials.
sudo -u redmine -H ruby script/rails server webrick -e production
Next, I setup gitolite redmine plugin.
sudo -u redmine -H git clone git://github.com/ivyl/redmine-gitolite.git \
lib/plugins/redmine_gitolite
sudo -u redmine -H cp lib/plugins/redmine_gitolite/Gemfile Gemfile.local
This is where we run into issues. The gitolite redmine plugin was coded against gitolite ruby gem 0.3.3.alpha, and the current version of gitolite gem 1.1.0.
sed -i 's/>= 0.0.3.alpha/= 0.0.3.alpha/' Gemfile.local
sudo bundle install
sudo -u redmine -H RAILS_ENV=production rake redmine:plugins:migrate
However, installing either 0.0.3 or or the 1.1.0 version of the gem results in "uninitialized constant GitoliteObserver".