Redmine supports MySQL/MariaDB, Microsoft SQL Server, SQLite 3 and PostgreSQL. In this tutorial we’ll use MariaDB as a database back-end.
If you don’t have MariaDB or MySQL installed on your CentOS server you can install it by following these instructions.
Login to the MySQL shell by typing the following command:
typescript
1sudo mysql
From within the MySQL shell, run the following SQL statement to create a new database:
1GRANT ALL ON redmine.* TO 'redmine'@'localhost' IDENTIFIED BY 'change-with-strong-password';
Make sure you change change-with-strong-password with a strong password.
Once complete, exit the mysql shell by typing:
typescript
1EXIT;
Installing Passenger and Nginx
Passenger is a fast and lightweight web application server for Ruby, Node.js and Python that can be integrated with Apache and Nginx. We will install Passenger as an Nginx module.
Install the EPEL repository and the required packages:
The version of Ruby in the CentOS repositories is pretty outdated and not supported by Redmine. We’ll install Ruby using RVM.
Switch to the userredmine by typing:
If you want to install Ruby via Rbenv check this guide.
Installing Redmine on CentOS
At the time of writing this article, the latest stable version of Redmine is version 4.0.1.
Before continuing with the next steps you should check the Redmine download page to see if a newer version is available.
Make sure you are running the following steps as redmine user.
1. Downloading Redmine
Download the Redmine archive with the following curl command:
If you don’t have a trusted SSL certificate for your domain, you can generate a free Let’s Encrypt SSL certificate by following these instructions.
Once the certificate is generated edit the domain Nginx configuration as follows:
Don’t forget to replace example.com with your Redmine domain and set the correct path to the SSL certificate files. All the HTTP requests will be redirected to HTTPS.
Accessing Redmine
Open your browser, type your domain and assuming the installation is successful, a screen similar to the following will appear: