Step 1: Connect to server and update

SSH to your server:

$ ssh user@sshdserver

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

$ sudo -i
# apt update
# apt full_upgrade
# reboot

Step 2: Install MySQL 8.0 Database Server

$ sudo -i
# mysql-server-8.0

Step 3: 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

# apt install apache2 libapache2-mod-passenger

Step 4: Install Redmine on Ubuntu 20.04

‘redmine’ and ‘redmine-mysql’ dependencies is not enough !. need following packages.

# apt install redmine redmine-mysql fonts-takao-gothic pkg-config make libffi-dev libmysqlclient-dev \ 
libreadline-dev libedit-dev rmagic imagemagick libmagickcore-dev libmagickwand-dev

When asked to configure Database, answer yes.

install redmine ubuntu 01

Enter password for the database:

install redmine ubuntu 02

Confirm password:

install redmine ubuntu 03

Step 5: gem update

Need several minutes. Show output text and find error.

# gem update

if error(s) found.

# apt install xxxxxx <- check packages.
## No error found.
# rm -r /var/lib/gems
# gem update

Fix configure Apache Passenger module file, /etc/apache2/mods-available/passenger.conf.

<IfModule mod_passenger.c>
  PassengerDefaultUser www-data
  PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
  PassengerDefaultRuby /usr/bin/ruby
</IfModule>
EOF

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

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

Access Redmine web console Domain name

Create VirtualHost file for Redmine.

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

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

<VirtualHost *:80>
  ServerAdmin admin@example.com
  DocumentRoot /var/www/html/redmine
  ServerName projects.example.com
  ServerAlias www.projects.example.com
  <Directory /var/www/html/redmine>
    RailsBaseURI /redmine
    PassengerResolveSymlinksInDocumentRoot on
  </Directory>

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

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

install redmine ubuntu 04

Default Login credentials are:

Username: admin
Password: admin
install redmine ubuntu 05