Project

General

Profile

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

Marc Morocutti, 2022-06-07 14:49

1 1 Marc Morocutti
h1. HowTo Install Redmine 5.0.x on Ubuntu 20.04 with Apache2
2
3
h2. Installing dependencies
4
5
<pre>
6
# update & upgrade 
7
sudo apt-get update && sudo apt-get upgrade -y
8
9
# install required packages
10 2 Marc Morocutti
sudo apt install -y apache2 ruby ruby-dev build-essential libapache2-mod-passenger libmysqlclient-dev
11 1 Marc Morocutti
12
# if you want to install mysql server locally
13
sudo apt install -y mysql-server
14
</pre> 
15
16 2 Marc Morocutti
h2. Download & Extract Redmine
17
18
Go grab the latest version from [[Download|here]]. For this example it will be 5.0.1
19
<pre>
20
# download and extract
21
cd
22
wget https://redmine.org/releases/redmine-5.0.1.tar.gz
23
cd /opt
24
sudo tar -xvzf ~/redmine-5.0.1.tar.gz
25
26
# symlink to remove version reference
27
sudo ln -s redmine-5.0.1 redmine
28
</pre>
29
30
h2. Configure database
31
32
Create a database and create a user for redmine. Example for localhost installation below:
33
<pre>
34
sudo mysql
35
36
mysql> CREATE DATABASE redmine CHARACTER SET utf8mb4;
37
mysql> CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'secretPassword';
38
mysql> GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';
39
mysql> FLUSH PRIVILEGES;
40 3 Marc Morocutti
</pre>
41 2 Marc Morocutti
42 3 Marc Morocutti
h2. Edit database configuration file
43
44
<pre>
45
# copy the example file
46
cd /opt/redmine
47
cp config/database.yml.example config/database.yml
48
49
# edit config file with your editor of choice (mine is vi)
50
vi config/database.yml
51
</pre>
52
53
Replace or update the production: block with your configuration. One example based on the mysql config above.
54
55
<pre>
56
production:
57
  adapter: mysql2
58
  database: redmine
59
  host: localhost
60
  username: redmine
61
  password: "secretPassword"
62
  # Use "utf8" instead of "utfmb4" for MySQL prior to 5.7.7
63
  encoding: utf8mb4
64 2 Marc Morocutti
</pre>