Project

General

Profile

Actions

HowTo Install Redmine 50x on Ubuntu 2004 with Apache2 » History » Revision 3

« Previous | Revision 3/11 (diff) | Next »
Marc Morocutti, 2022-06-07 14:49


HowTo Install Redmine 5.0.x on Ubuntu 20.04 with Apache2

Installing dependencies

# update & upgrade 
sudo apt-get update && sudo apt-get upgrade -y

# install required packages
sudo apt install -y apache2 ruby ruby-dev build-essential libapache2-mod-passenger libmysqlclient-dev

# if you want to install mysql server locally
sudo apt install -y mysql-server

Download & Extract Redmine

Go grab the latest version from here. For this example it will be 5.0.1

# download and extract
cd
wget https://redmine.org/releases/redmine-5.0.1.tar.gz
cd /opt
sudo tar -xvzf ~/redmine-5.0.1.tar.gz

# symlink to remove version reference
sudo ln -s redmine-5.0.1 redmine

Configure database

Create a database and create a user for redmine. Example for localhost installation below:

sudo mysql

mysql> CREATE DATABASE redmine CHARACTER SET utf8mb4;
mysql> CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'secretPassword';
mysql> GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';
mysql> FLUSH PRIVILEGES;

Edit database configuration file

# copy the example file
cd /opt/redmine
cp config/database.yml.example config/database.yml

# edit config file with your editor of choice (mine is vi)
vi config/database.yml

Replace or update the production: block with your configuration. One example based on the mysql config above.

production:
  adapter: mysql2
  database: redmine
  host: localhost
  username: redmine
  password: "secretPassword" 
  # Use "utf8" instead of "utfmb4" for MySQL prior to 5.7.7
  encoding: utf8mb4

Updated by Marc Morocutti over 2 years ago · 3 revisions