Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Install Redmine on Ubuntu 22.04

Set up Apache, MySQL and Ruby, then install Redmine, the project management and issue tracking tool.

CMS and Apps2 min read8 steps8 screenshots

What Redmine is

Redmine is a free, open-source tool for project management and issue tracking. Its main features:

  1. Create, assign, track and prioritize tasks.
  2. Report and resolve issues and bugs.
  3. Time tracking for tasks and projects.
  4. Git and Subversion integration.
  5. A wiki for team documents.
  6. News and announcements for each project.
  7. Flexible workflows.
  8. Roles and permissions for users.

Step 1: Install the dependencies

sudo apt update
Updating the system
sudo apt install curl git-core libapache2-mod-passenger libmysqlclient-dev libpq-dev libxml2-dev nodejs npm build-essential
Installing the libraries

Step 2: Install Apache

sudo apt install apache2
Installing Apache

Step 3: Install MySQL

sudo apt install mysql-server
Installing MySQL
sudo mysql_secure_installation

Step 4: Install Ruby and Bundler

Redmine needs a supported Ruby version (check the Redmine requirements):

sudo apt install ruby ruby-dev
sudo gem install bundler
Installing Ruby

Step 5: Download Redmine

sudo mkdir /var/www/html/redmine
sudo chown -R www-data:www-data /var/www/html/redmine
cd /var/www/html/redmine
sudo git clone https://github.com/redmine/redmine.git .
Downloading Redmine

For a stable version, check out a release branch, for example sudo git checkout 5.1-stable.

Step 6: Configure Redmine

Create the database and the user:

sudo mysql -u root -p
CREATE DATABASE redmine CHARACTER SET utf8mb4;
CREATE USER 'redmineuser'@'localhost' IDENTIFIED BY 'yourpassword';
GRANT ALL PRIVILEGES ON redmine.* TO 'redmineuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Creating the database

Copy the example config and edit it:

cp config/database.yml.example config/database.yml
nano config/database.yml

Set the production section:

production:
  adapter: mysql2
  host: localhost
  database: redmine
  username: redmineuser
  password: yourpassword
  encoding: utf8mb4
The database configuration

Install the gems and prepare the database:

bundle config set --local without 'development test'
bundle install
bundle exec rake generate_secret_token
RAILS_ENV=production bundle exec rake db:migrate
RAILS_ENV=production bundle exec rake redmine:load_default_data

Step 7: Access Redmine

Configure Apache with Passenger to serve the public folder of Redmine, for example:

<VirtualHost *:80>
    ServerName redmine.example.com
    DocumentRoot /var/www/html/redmine/public
    <Directory /var/www/html/redmine/public>
        Require all granted
        Options -MultiViews
    </Directory>
</VirtualHost>

Enable the site and restart Apache. Open the address in your browser and log in with admin and the password admin. Change the password right away.

Use Redmine

  • Create projects, set milestones and assign tasks.
  • Track progress and spot risks.
  • Share information in the wiki and the news.
  • Use reports to decide.

Quick recap

  • Install Apache, MySQL, Ruby and the libraries.
  • Clone Redmine, set database.yml and run the migrations.
  • Serve the public folder with Passenger.