How to install Redmine in an Ubuntu Server

In this tutorial, we will explain how to install Redmine in an Ubuntu Server.

If you’re searching for a web-based project management and issue tracking tool, Redmine is one of the best alternatives.

Redmine is a flexible project management web application. Written using the Ruby on Rails framework, it is cross-platform and cross-database.

Before installing Redmine, you have to install some prerequisites, which are Apache, mod-passenger, and MySQL.

Below we will explain how to install these prerequisites in an ubuntu cloud server.

How to install Apache in an Ubuntu server

You can do it with one command only:

sudo apt-get install apache2

How to install mod-passenger

Mod-passenger is also simple to install just follow the prompts.

sudo apt-get install libapache2-mod-passenger

How to install MySQL

MySQL takes more time to install.

sudo apt-get install mysql-server mysql-client

The installation process will prompt you to set a new password for your MySQL, you can leave it blank if you don’t want a new password.

Afterwards, confirm the password or leave it blank.

How to Install and configure the Ubuntu Redmine package

If you followed the steps correctly, you will have successfully installed prerequisites.

Now it’s time to install Redmine package.

Run this command to install:

sudo apt-get install redmine redmine-mysql

If you want to allow dbconfig-common to configure the database select Yes.

After this, the Redmine will prompt you to enter the password for the database administrator account with which this package should create its MySQL database and user. You will need to enter the password that you set when you installed MySQL.

Now select MySQL from the list of database choices

If you want to protect your Redmine database, choose a password for it as well.

Confirm the password and the Redmine is installed.

Also, ensure that Bundler is installed

sudo gem install bundler

Configuring Apache for Redmine

Modify this file to configure Apache /etc/apache2/mods-available/passenger.conf and add the commands below

<IfModule mod_passenger.c>
PassengerDefaultUser www-data
PassengerRoot /usr
PassengerRuby /usr/bin/ruby

Create a symlink

sudo ln -s /usr/share/redmine/public /var/www/html/redmine

Modify also /etc/apache2/sites-available/000-default.conf and add these:

Directory /var/www/html/redmine>
RailsBaseURI /redmine
PassengerResolveSymlinksInDocumentRoot on

Create and set ownership for Gemfile.lock and restart the Apache service:

sudo touch /usr/share/redmine/Gemfile.lock
sudo chown www-data:www-data /usr/share/redmine/Gemfile.lock

sudo service apache2 restart

Access Redmine by going to this URL on your brower

The default login is:

User: admin

Password: admin

You have successfully installed Redmine in an Ubuntu server.

Enjoy it! 🙂

To write a comment on this article, fill out the form below. Fields marked with an asterisk (*) are required.

One Response
  1. Comment (Published by Pedro)

    Excellent, thank you !