This short guide will walk you through the installation of Redmine on Ubuntu 20.04 LTS. Redmine is a free and open source project management tool with a web-based administration dashboard where users can manage projects. Redmine is built on Ruby on Rails framework. With Redmine you can track time on projects, documentation, and write wiki pages for your project. Its RBAC ensures there is a structured access structure.

Features of Redmine Project management tool includes:

After the installation of Redmine on Ubuntu 20.04, you can add this features as you see fit.

Setup Pre-requisites

You need to have a running server with Ubuntu 20.04 Linux and additionally:

  • SSH user with sudo privileges – root user is also okay
  • Domain for hosting Redmine – e.g projects.example.com
  • SSL certificate if planning on having it securely – You can use Let’s Encrypt if the server is exposed to the internet with a public IP Address.

Step 1: Connect to server and update

SSH to your server:

$ ssh [email protected]

Begin to update it for latest packages to be updated in the server.

sudo apt update
sudo apt upgrade
sudo reboot

Step 2: Install MariaDB Database Server

After the update, install and configure MariaDB database server on Ubuntu 20.04 | Ubuntu 18.04.

sudo apt update
sudo apt install mariadb-server

Confirm it is working:

$ sudo mysql -u root

Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or g.
Your MariaDB connection id is 57
Server version: 10.3.22-MariaDB-1ubuntu1 Ubuntu 20.04

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

MariaDB [(none)]> 

Step 3: Create Database for Redmine

With database server installed on Ubuntu, let’s create database and user for Redmine project management platform.

$ sudo mysql -u root -p
CREATE DATABASE redmine CHARACTER SET utf8mb4;
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost' IDENTIFIED BY '[email protected]';
FLUSH PRIVILEGES;
EXIT;

Confirm redmine database user can login to MySQL Shell with configured password.

$ mysql -u redmine -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or g.
Your MariaDB connection id is 59
Server version: 10.3.22-MariaDB-1ubuntu1 Ubuntu 20.04

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

MariaDB [(none)]> SHOW DATABASES;
 -------------------- 
| Database           |
 -------------------- 
| information_schema |
| redmine            |
 -------------------- 
2 rows in set (0.000 sec)

MariaDB [(none)]> QUIT
Bye

Step 4: Install Apache, Ruby and Passenger

We will install Passenger application server that will be used by Ruby and integration to Apache for serving Redmine on Ubuntu

sudo apt install apache2 libapache2-mod-passenger

Step 5: Install Redmine on Ubuntu 20.04

Run the commands below to install Redmine on Ubuntu 20.04 Linux.

sudo apt install redmine redmine-mysql

When asked to configure Database, answer yes.

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2020/05/echo/install-redmine-ubuntu-01-1024×379.png" data-ez ezimgfmt="rs rscb8 src ng ngcb8 srcset" src="data:image/svg xml,”>

Enter password for the database:

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2020/05/echo/install-redmine-ubuntu-02-1024×409.png" data-ez ezimgfmt="rs rscb8 src ng ngcb8 srcset" src="data:image/svg xml,”>

Confirm password:

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2020/05/echo/install-redmine-ubuntu-03-1024×451.png" data-ez ezimgfmt="rs rscb8 src ng ngcb8 srcset" src="data:image/svg xml,”>

A successful installation output looks like below:

......................
/usr/share/rubygems-integration/all/gems/activerecord-5.2.3/lib/active_record/persistence.rb:705: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/usr/share/rubygems-integration/all/gems/activerecord-5.2.3/lib/active_record/timestamp.rb:105: warning: The called method `_update_record' is defined here
/usr/share/rubygems-integration/all/gems/activerecord-5.2.3/lib/active_record/connection_adapters/mysql/database_statements.rb:12: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/usr/share/rubygems-integration/all/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/query_cache.rb:95: warning: The called method `select_all' is defined here
/usr/share/rubygems-integration/all/gems/activerecord-5.2.3/lib/active_record/statement_cache.rb:90: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
/usr/share/rubygems-integration/all/gems/activerecord-5.2.3/lib/active_record/statement_cache.rb:90: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
/usr/share/rubygems-integration/all/gems/activerecord-5.2.3/lib/active_record/statement_cache.rb:90: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
/usr/share/rubygems-integration/all/gems/activerecord-5.2.3/lib/active_record/statement_cache.rb:90: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
Default configuration data loaded.
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9) ...

Install bundler gem:

sudo gem update
sudo gem install bundler

Configure Apache Passenger module.

sudo tee /etc/apache2/mods-available/passenger.conf<<EOF

  PassengerDefaultUser www-data
  PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
  PassengerDefaultRuby /usr/bin/ruby

EOF

Now create a symlink to connect Redmine into the web document space:

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

Access Redmine web console Domain name

Create VirtualHost file for Redmine.

sudo vim /etc/apache2/sites-available/redmine.conf

Add configuration data – replace projects.computingforgeeks.com with your domain name.


  ServerAdmin [email protected]
  DocumentRoot /var/www/html/redmine
  ServerName projects.example.com
  ServerAlias www.projects.example.com
  
    RailsBaseURI /redmine
    PassengerResolveSymlinksInDocumentRoot on
  

  ErrorLog ${APACHE_LOG_DIR}/error.log
  CustomLog ${APACHE_LOG_DIR}/access.log combined

Create and set the ownership of a Gemfile.lock file so that apache’s www-data user can access it:

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

Enable the Redmine website as configured:

sudo a2ensite redmine.conf
sudo systemctl restart apache2.service

You should now be able to access redmine with your domain: http://projects.example.com

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2020/05/echo/install-redmine-ubuntu-04-1024×272.png" data-ez ezimgfmt="rs rscb8 src ng ngcb8 srcset" src="data:image/svg xml,”>

Default Login credentials are:

Username: admin
Password: admin
<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2020/05/echo/install-redmine-ubuntu-05-1024×404.png" data-ez ezimgfmt="rs rscb8 src ng ngcb8 srcset" src="data:image/svg xml,”>

Change password in the next screen.

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2020/05/echo/install-redmine-ubuntu-06-1024×398.png" data-ez ezimgfmt="rs rscb8 src ng ngcb8 srcset" src="data:image/svg xml,”>

You now have Redmine working on Ubuntu 20.04 Linux.

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2020/05/echo/install-redmine-ubuntu-07-1024×306.png" data-ez ezimgfmt="rs rscb8 src ng ngcb8 srcset" src="data:image/svg xml,”>

Access Redmine web console with IP Address

Modify default Apache configuration:

sudo tee /etc/apache2/sites-available/000-default.conf<<EOF

  ServerAdmin [email protected]
  DocumentRoot /var/www/html
  ErrorLog ${APACHE_LOG_DIR}/error.log
  CustomLog ${APACHE_LOG_DIR}/access.log combined
  
    RailsBaseURI /redmine
    PassengerResolveSymlinksInDocumentRoot on
  

EOF

Create and set the ownership of a Gemfile.lock file so that apache’s www-data user can access it:

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

Load Passenger module and restart Apache server:

sudo a2enmod passenger
sudo systemctl restart apache2

You should now be able to access redmine from your Server IP Address or hostname: http://server_ip_or_hostname/redmine

Default Login credentials are:

Username: admin
Password: admin

Enjoy using Redmine Project management tool on Ubuntu 20.04 Linux machine.

More guides:

Install OpenProject Community Edition on CentOS 8

Install OpenProject Community Edition on Debian

Install OpenProject on Ubuntu