Redmine is a free, open source and web-based project management web application that allows users to manage multiple projects and associated subprojects. It is cross-platform and built on top of the Ruby on Rails framework. Redmine is one of the most popular and great tools for projects and time tracking, wiki, document management and much more. It is a feature-rich application that supports multiple projects, role based ACL and version control systems such as Git, SVN or CVS.
Features
- Supports multiple languages.
- Allows multiple databases and simple time tracking.
- Integrates with News, documents and files management.
- Allows Web feeds and e-mail notifications.
Requirements
- Ubuntu 18.04 server installed on your system.
- A non-root user with sudo privileges.
Install Apache and MariaDB
Redmine runs on a web server and uses MariaDB to store their data. So, you will need to install Apache web server and MariaDB server to your system. You can install them with the following command:
sudo apt-get install apache2 mariadb-server libapache2-mod-passenger -y
Once the installation has been completed, start Apache and MariaDB service and enable them to start on boot time with the following command:
sudo systemctl start apache2
sudo systemctl start mariadb
sudo systemctl enable apache2
sudo systemctl enable mariadb
Configure MariaDB
By default, MariaDB is not secured. So, you will need to secure it first. You can do this by running the following script:
sudo mysql_secure_installation
Answer all the questions as shown below:
Enter current password for root (enter for none): Set root password? [Y/n]: N Remove anonymous users? [Y/n]: Y Disallow root login remotely? [Y/n]: Y Remove test database and access to it? [Y/n]: Y Reload privilege tables now? [Y/n]: Y
Install Redmine
By default, redmine package is available in the Ubuntu 18.04 server default repository. You can install it by just running the following command:
sudo apt-get install redmine redmine-mysql -y
During the installation, you will be asked to configure Redmine as shown below:
Click on the Yes button. You should see the following page:
Here, select database as mysql and click on the OK button. You should see the following page:
Now, provide a password for Redmine to register with the database and click on the Ok button to finish the installation.
Next, you will need to install gem bundler packages. You can install it with the following command:
sudo gem install bundler
Next, create a symbolic link of Redmine to Apache web root directory:
sudo ln -s /usr/share/redmine/public /var/www/html/redmine
Next, create a lock file for redmine with the following command:
sudo touch /usr/share/redmine/Gemfile.lock
Next, give proper permissions to the redmine with the following command:
sudo chown www-data:www-data /usr/share/redmine/Gemfile.lock
sudo chown -R www-data:www-data /var/www/html/redmine
Configure Apache for Redmine
Next, you will need to edit passenger.conf file and make some changes. You can do this with the following command:
sudo nano /etc/apache2/mods-available/passenger.conf
Make the following changes:
<IfModule mod_passenger.c> PassengerDefaultUser www-data PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini PassengerDefaultRuby /usr/bin/ruby </IfModule>
Next, create an Apache virtual host file for Redmine with the following command:
sudo nano /etc/apache2/sites-available/redmine.conf
<VirtualHost *:80> ServerAdmin admin@example.com DocumentRoot /var/www/html/redmine ServerName example.com ServerAlias www.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>
Replace example.com with your own domain name in the vhost file. Save and close the file. Then, enable Redmine virtual host and Apache rewrite module with the following command:
sudo a2ensite redmine
sudo a2enmod rewrite
Finally, restart Apache service to apply all the changes:
sudo systemctl restart apache2
You can check the status of Apache web server with the following command:
sudo systemctl status apache2
You should see the following output:
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
??apache2-systemd.conf
Active: active (running) since Wed 2019-01-16 17:43:29 CET; 8s ago
Process: 7401 ExecStop=/usr/sbin/apachectl stop (code=exited, status=0/SUCCESS)
Process: 7407 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
Tasks: 77 (limit: 2313)
CGroup: /system.slice/apache2.service
??7455 /usr/sbin/apache2 -k start
??7456 Passenger watchdog
??7459 Passenger core
??7468 Passenger ust-router
??7482 /usr/sbin/apache2 -k start
??7483 /usr/sbin/apache2 -k start
Jan 16 17:43:29 server1 systemd[1]: Starting The Apache HTTP Server...
Jan 16 17:43:29 server1 systemd[1]: Started The Apache HTTP Server.
Access Redmine Web Interface
Redmine is now installed, it's time to access it through a web browser. Open your web browser and type the URL of the Redmine installation, in my case: http://example.com. Now, click on the Sign In button, you will be redirected to the Redmine login page.
Provide username as admin and password as admin, then click on the Login button. Next, change your current password and click on the Apply button.
Congratulations! you have successfully installed and configured Redmine on Ubuntu 18.04 server. You can now host your own project management system and manage your projects easily using Redmine.