Home > Linux, redmine, svn, Versioning, Web server > Install Redmine 0.8.1 on Ubuntu Server 9.04

Install Redmine 0.8.1 on Ubuntu Server 9.04

This howto is based on Chris’s howto. It has been tested and modified to work with ubuntu server 9.04.

First we change to root and install the base packages:

sudo su
apt-get install apache2 ruby rubygems subversion ruby-pkg-tools \
ruby1.8-dev build-essential postgresql libdbd-pg-perl libapache2-svn \
libapache-dbi-perl libapache2-mod-perl2 libdigest-sha1-perl \
libopenssl-ruby librmagick-ruby git-core git ruby-dev

Now we install the ruby gems:

gem install rails -v 2.1.2
gem install rake -v 0.8.3
gem install mongrel mongrel_cluster postgres-pr --include-dependencies

We add the gems to $PATH:

echo "export PATH=$PATH:/var/lib/gems/1.8/bin" >> ~/.bashrc

Now we setup the database, there for we first change to the postgres user:

su postgres

Now we create a database user and a database for redmine, in this howto we use redmine as password for the redmine user.

createuser redmine --no-superuser --no-createdb --no-createrole --login --pwprompt --encrypted
createdb --owner=redmine --encoding=utf-8 redmine
exit

We create a user for redmine and some user specific directories:

addgroup redmine
useradd -g redmine -s /bin/false -m redmine

Now we proceed installing redmine it self from svn into a new created directory:

cd /var/www/rails_apps/redmine
svn co http://redmine.rubyforge.org/svn/tags/0.8.1/
ln -s 0.8.1 redmine

We can now configure database access for redmine:

vim /var/www/rails_apps/redmine/config/database.yml

Add the following information:

production:
  adapter: postgresql
  database: redmine
  host: localhost
  username: redmine
  password: redmine

Now we boostrap the database:

rake rails:update
rake db:migrate RAILS_ENV="production"
rake redmine:load_default_data RAILS_ENV="production"

Change some rights:

cd /var/www/rails_apps/redmine
mkdir tmp public/plugin_assets
sudo chown -R redmine:redmine files log tmp public/plugin_assets
sudo chmod -R 755 files log tmp public/plugin_assets

To configure your email settings change the following file:

vim /var/www/rails_apps/redmine/config/email.yml

Default content:

# Outgoing email settings

production:
  delivery_method: :smtp
  smtp_settings:
    address: smtp.example.net
    port: 25
    domain: example.net
    authentication: :login
    user_name: redmine@example.net
    password: redmine

development:
  delivery_method: :smtp
  smtp_settings:
    address: 127.0.0.1
    port: 25
    domain: example.net
    authentication: :login
    user_name: redmine@example.net
    password: redmine

Now we can try to run redmine from it’s directory:

cd /var/www/rails_apps/redmine
mongrel_rails start --environment=production
or we can use WebRick
ruby script/server webrick -e production

It uses port 3000 as default, thus you can call redmine at:


http://yourIP:3000

To logon, enter username admin and password admin.

If you want to use a svn repository via http you can configure it when creating a project via the redmine interface. If you use https for your repository, you should check it out once locally on the webserver first with the redmine user that has been used to start redmine. You have to accept the certificate permanently, and then redmine can use it as well.

I would suggest to run redmin in a screen session, there fore we install screen.

  1. rodsta
    June 4th, 2009 at 15:47 | #1

    great step-by-step… thanks.
    I would like to startup the server using mongrel at boot time (using init.d).
    Do you mind in posting a script / instructions to do this?

    best,
    r.

  2. June 4th, 2009 at 16:38 | #2

    I didn’t write an init.d script that far for mongrel, I had a quick look at google:

    http://source.mihelac.org/2007/3/27/customized-mongrel-startup-script

    could be a solution, but it’s for redhat, so you might have to change some paths.

  3. Vitke
    July 22nd, 2009 at 18:25 | #3

    When I do

    rake db:migrate RAILS_ENV=”production”

    I get

    rake aborted!
    FATAL C28000 Mpassword authentication failed for user “redmine” Fauth.cL1003 Rauth_failed

  4. Vitke
    July 22nd, 2009 at 18:34 | #4

    Sorry, my mistake: I have chosen a wrong password.

  5. steph
    October 28th, 2009 at 15:09 | #5

    Fine howto thanks, only missing an “apt-get install ruby-dev” to make things work well (like mongrel install)

  6. October 29th, 2009 at 16:46 | #6

    Thanks, I’ve added ruby-dev.

  7. November 25th, 2009 at 17:03 | #7

    Great, this got me started with redmine in less than 30 minutes. Thanks.

  1. No trackbacks yet.