Skip to content

Instantly share code, notes, and snippets.

@ytjohn
Last active December 11, 2015 09:19
Show Gist options
  • Save ytjohn/4579358 to your computer and use it in GitHub Desktop.
Save ytjohn/4579358 to your computer and use it in GitHub Desktop.
redmine 1.4 source install ubuntu precise

Never mind, this won't work.

redmine_gitolite plugin requires Redmine 2.0.0 or higher but current is 1.4.6.stable.11224

From a fresh install of Ubuntu 12.04.1 precise

redmine 1.4 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/trunk redmine-trunk
cd redmine-trunk
sudo bundle install --without development test postgresql sqlite

Create the mysql database for redmine

mysql -u root -p 
create database redmine14 character set utf8;
create user 'redmine'@'localhost' identified by 'my_password';
grant all privileges on redmine14.* to 'redmine'@'localhost';

Configure redmine by editing config/database.yml

cd ~redmine/redmine-trunk
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: redmine14
  host: localhost
  username: redmine
  password: my_password

Generate the session store secret

sudo -u redmine -H rake generate_session_store

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/server webrick -e production

Next, I setup gitolite redmine plugin.

sudo -u redmine -H git clone git://github.com/ivyl/redmine-gitolite.git vendor/plugins/redmine_gitolite
sudo -u redmine -H cp lib/plugins/redmine_gitolite/Gemfile Gemfile.local

Install local bundle

sudo bundle install 
sudo -u redmine -H RAILS_ENV=production rake db:migrate_plugins

Now start redmine up again.

sudo -u redmine -H ruby script/server webrick -e production

At this point, things appear to work, but the plugin does show up under Administration -> Plugins

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment