Install Redmine on Ubuntu
Posted on June 7th, 2020
The Redmine is an open-source and flexible web-based application for project management and issue tracking. Redmine helps to manage and track multiple projects and associated sub-projects. Some of the features offered by the Redmine application are:
- It helps to track multiple projects.
- It offers role-based access control.
- Redmine also includes an issue tracking system to manage and maintain the issues.
- It includes Gantt charts and a calendar to improve the visual representation of the projects and their deadlines.
- Redmine also helps to integrate documents, news, and file management.
- Redmine offers multi-language support.
- It comes with SCM integration.
- It also offers multi-database support.
In this Knowledgebase tutorial, you will learn the steps to install and configure Redmine on your Ubuntu server.
- An ssh user with Sudo privileges.
- A server installed with the LAMP stack. To know more about how to install a LAMP stack on Ubuntu, refer to https://www.interserver.net/tips/kb/installing-a-lamp-stack-on-ubuntu-debian/.
- Pre-installed mod-passenger.
Install and Configure Redmine
To install and configure the Redmine application on your Ubuntu 16.04 server, follow these steps.
1) Install Dependencies
First, We need to install all the dependencies before installing Redmine in the system. And that’s what we are going to do in this section.
Log in to the server as an ssh user with sudo privileges via SSH.
Then, you need to update repositories and upgrade all the packages installed on the server to the latest version by executing the following commands.
$ sudo apt-get update $ sudo apt-get upgrade
After that, execute the following command to install all the necessary dependencies.
$ sudo apt-get install python-software-properties autoconf curl git subversion software-properties-common bison libmagickwand-dev imagemagick build-essential libssl-dev libreadline-dev libyaml-dev zlib1g-dev libcurl4-openssl-dev
Now, It’s time to install the MySQL server.
2) Install MySQL Server
If your server has LAMP stack, then MySQL should be already available on the system. If not, follow these steps to install MySQL as Redmine requires an empty database.
Execute the following command to install MySQL,
$ sudo apt-get install mysql-server mysql-client
Once the MySQL is installed, execute the following command and follow the on-screen instructions to secure the MySQL installation and to set the root password for the MySQL server.
$ sudo mysql_secure_installation
If MySQL is already available on the server, skip the above-given steps. Next, log in to the MySQL server as a root user using the command given below.
$ sudo mysql -u root -p
After that, execute the following queries in the MySQL console to create a new MySQL user and database. Then use the exit command to exit from MySQL interface.
> CREATE DATABASE redmin > GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost' IDENTIFIED BY '<user_password>'; > FLUSH PRIVILEGES; > EXIT;
Replace the <user_password> flag in the above-given command with the actual password.
3) Install Ruby and Ruby Version Manager (RVM)
To install Ruby on to your Ubuntu server, execute the following commands.
$ sudo gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3 $ sudo curl -L https://get.rvm.io | bash -s stable –ruby=2.7.0
After the installation, execute the below commands to load the Ruby version Manager (RVM).
$ sudo source /usr/local/rvm/scripts/rvm $ sudo echo '[[ -s "/usr/local/rvm/scripts/rvm" ]] && source "/usr/local/rvm/scripts/rvm"' >> ~/.bashrc
Now both the Ruby and MySQL are configured. Finally, we can install and configure Redmine on our server.
4) Install and Configure Redmine
First of all, Execute the following command to start the installation of the Redmine package.
$ sudo apt-get install redmine redmine-mysql
Now, Follow the following steps while it is being installed.
- Allow ‘dbconfig-common’ to configure the database.
- Enter the root password of the database when prompted. This option creates a Redmine database if it does not exist.
- Then, select the database type as MySQL from the list and click ‘<Ok>’.
- Follow the instructions to complete the installation.
After that, run the following commands to install the bundler gem.
$ sudo gem update $ sudo gem install bundler
Once the Redmine is installed and configured, We need to configure Apache. So, Let’s do it.
5) Configure Apache
In Apache, we have to edit some configuration files. You can use your preferred text editor in Linux but in this case, we are going to use the nano editor which is easy to get started if you are not a Technical person.
First of all, Open the passenger.conf file of Apache using the following command.
$ sudo nano /etc/apache2/mods-available/passenger.conf
Now, add the following lines at the bottom of the file.
<IfModule mod_passenger.c> PassengerDefaultUser www-data PassengerRoot /usr PassengerRuby /usr/bin/ruby </IfModule>
Create a symlink to connect the Redmine application into the default document root space using the following command.
$ sudo ln -s /usr/share/redmine/public /var/www/html/redmine
Open the ‘/etc/apache2/sites-available/000-default.conf’ file using the following command.
$ sudo nano /etc/apache2/sites-available/000-default.conf
Now, add the following lines to the file.
<Directory /var/www/html/redmine> RailsBaseURI /redmine PassengerResolveSymlinksInDocumentRoot on </Directory>
Then, create a file named Gemfile.lock.
$ sudo touch /usr/share/redmine/Gemfile.lock
After that, set the ownership of the created file to the www-data user.
$ sudo chown www-data:www-data /usr/share/redmine/Gemfile.lock
Execute the following command to restart the Apache service.
$ sudo service apache2 restart
Now you can access Redmine by using the following URL from the browsers.
The Redmine application is a flexible, free, and open-source project management web application. It functions on the Ruby platform and is mainly used to track and manage projects and associated sub-projects. We hope that this knowledge base was helpful to you. Please comment below for any questions or queries. If you are an InterServer customer, please reach out to our support team for further help.