Redmine is a free and open source web based flexible project management and issue tracking tool written in Ruby on Rails framework which is released under the terms of the GNU General Public License v2 (GPL). Redmine integrates with various version control systems like SVN, CVS, Git, Bazaar, etc and includes a repository browser and diff viewer. It has been localized in more than 34 languages and can be run in any platform as it is cross-platform and cross-database from the core. It makes users easy to manage multiple projects with its associated sub-projects. Here are some remarkable features of Redmine which has made it such a popular open source project management product.
- Redmine supports multiple projects with sub-projects.
- It has a flexible role based access control.
- It consists of issue tracking as well as time tracking system with email creation.
- It supports SCM integration (SVN, CVS, Git, Mercurial, Bazaar and Darcs).
- It has integrated Gantt chart and calendar, news, documents & files management.
- It allows web Feeds & email notifications with per project wiki and forums.
- Custom fields for issues, time-entries, projects and users
- It supports multiple LDAP authentication, multilanguage and multiple database making it highly flexible.
- It supports various plugins and provides a REST API
Here are some easy steps on how we can setup the latest release of Redmine version 3.1.1 in our machine running Fedora 22.
Before we get into the installation of Redmine, we'll need to ensure that we have a machine with at least 10GB storage and 1GB ram with 1GB swap file for better performance. As this tutorial is specifically on Fedora 22 so we'll also need to ensure that our machine is running Fedora 22 in it. All these installation work requires the user to have access to root or sudo commands so, here in this tutorial we'll run all the commands under root user. After everything is checked, we'll now go further towards the installation of the latest release of Redmine version 3.1.1.
1. Installing Dependencies
First of all, we'll need to ensure that we have got all the required dependencies installed in our Fedora 22 linux machine. Some of the required dependencies are Apache Web Server, MariaDB server, Ruby and Postfix (MTA) with other dependencies. In order to install them, we'll need to run the following commands in a terminal or console under root or sudo access.
# dnf install apr-devel apr-util-devel curl-devel gcc gcc-c++ git httpd httpd-devel ImageMagick-devel mariadb-devel mariadb-server postfix ruby-devel tar libxslt-dev libxml2-dev
2. Starting and Enabling Services
Now, as we have got our required dependencies installed and ready to get configured, we'll first need to start the required applications and make them start automatically in every boot. As we know, fedora 22 has systemd preinstalled as init system so, we'll need to run the following systemd command in order to start the daemon services.
# systemctl start httpd mariadb postfix
After its started, we'll now make it able to start automatically in every system boot.
# systemctl enable httpd mariadb postfix
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/postfix.service to /usr/lib/systemd/system/postfix.service.
3. Configuring MariaDB Database
After we have started MariaDB for the first time in our machine, we'll need to configure our mariadb and set a new password for its root user. To do so, we'll need to run the following command as shown below.
This will ask us to enter the password for root but as we haven’t set any password before and its our first time we’ve installed mariadb, we’ll simply press enter and go further. Then, we’ll be asked to set root password, here we’ll hit Y and enter our password for root of MariaDB. Then, we’ll simply hit enter to set the default values for the further configurations.
so you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on…
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
Set root password? [Y/n] y
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
installation should now be secure.
Thanks for using MariaDB!
4. Creating a new Redmine DB
After we have successfully configure our MariaDB server, we'll now go for creating a new Redmine Database so that redmine will be able to use MariaDB to store its required data and information. So, we'll need to login to the MariaDB command prompt as root by executing the following command in a terminal or console.
# mysql -u root -p
Here, we’ll need to enter the password of the MariaDB root account that we had set above. After we’re logged in into the mariadb command prompt, we’ll gonna create the database for our redmine application.
> CREATE DATABASE redminedb CHARACTER SET utf8;
> CREATE USER 'redmineuser'@'localhost' IDENTIFIED BY 'Pa$$worD123';
> GRANT ALL PRIVILEGES ON redminedb.* TO 'redmineuser'@'localhost';
> FLUSH PRIVILEGES;
Note: We’ve successfully created a new database for our redmine application named redminedb with username redmineuser and password as Pa$$worD123 . It is strongly recommended to replace the above variables as your desire for the security issue.
5. Installing Redmine
Now, as our servers are up and running, we'll now go to grab our latest stable release of redmine from its official website https://www.redmine.org/releases/ . As the latest stable release while writing this article is 3.1.1 so, we'll gonna download the tarball of this release from the above site using wget command as shown below.
# cd /tmp/
# wget https://www.redmine.org/releases/redmine-3.1.1.tar.gz
--2015-11-04 06:44:08-- https://www.redmine.org/releases/redmine-3.1.1.tar.gz
Resolving www.redmine.org (www.redmine.org)... 184.108.40.206
Connecting to www.redmine.org (www.redmine.org)|220.127.116.11|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2246322 (2.1M) [application/x-gzip]
Saving to: ‘redmine-3.1.1.tar.gz’
redmine-3.1.1.tar.gz 100%[========================>] 2.14M 61.2KB/s in 21s
2015-11-04 06:44:32 (102 KB/s) - ‘redmine-3.1.1.tar.gz’ saved [2246322/2246322]
After we have successfully downloaded it, we'll now extract that tarball using tar command.
# tar xfzv redmine-3.1.1.tar.gz
Next, we'll gonna move our extracted redmine directory to the location of our Apache Web Server as follows.
# mv redmine-3.1.1 /var/www/redmine
Then, we'll need to change the ownership of our redmine installation directory to apache so that apache process owner will have full access over the directory and files.
# chown apache:apache -R /var/www/redmine
6. Configuring Redmine
We'll now configure our redmine so that it will be able to connect the MariaDB database that we had just created above. For that, we'll need the database name, database user and password which was noted above. We'll first need to copy the example of configuration file provided by the Redmine Team which is under config folder. To do so, we'll need to run the following command in a terminal or console.
# cd /var/www/redmine/config
# cp database.yml.example database.yml
Next, we'll gonna edit the database.yml and configure it to connect with the MariaDB database.
# nano database.yml
Now, we'll need to append the file database.yml under the production definition as shown below and make it connect with the database.
production: adapter: mysql2 database: redminedb host: localhost username: redmineuser password: "Pa$$worD123" encoding: utf8
After done, we'll need to save and exit the file.
7. Configuring Email Service
Next, we'll need to configure our SMTP settings of our Redmine, so that redmine will be able to send notifications via emails. To do so, we'll need to configure production definition under configuration.yml . The example of configuration file is already prepacked with our redmine package so, we'll simply use that example configuration file. To do so, we'll simply copy that example configuration file to configuration.yml using copying command.
# cd /var/www/redmine/config
# cp configuration.yml.example configuration.yml
Next, we'll gonna edit the configuration.yml using a text editor.
# nano configuration.yml
We'll now search for production definition and append it as shown below.
production: email_delivery: delivery_method: :smtp smtp_settings: address: "localhost" port: 25 domain: 'redmine.linoxide.com' rmagick_font_path: /usr/share/fonts/ipa-pgothic/ipagp.ttf
8. Installing Ruby Gem
We'll now install the required ruby dependencies for running our Redmine. Those dependencies are managed by bundle. So, to install it, first we'll need to install bundler by running the following command.
# gem install bundler
Successfully installed bundler-1.10.6
Parsing documentation for bundler-1.10.6
Installing ri documentation for bundler-1.10.6
Done installing documentation for bundler after 5 seconds
1 gem installed
Next, we'll gonna install all those required ruby dependencies by excluding postgresql, sqlite, test and development dependencies using --without flag.
# bundle install --without postgresql sqlite test development
9. Initializing Redmine Database
Now, we'll go further for the initialization of Redmine database. To do so, we'll first generate a secret key for session management by running the following command.
# cd /var/www/redmine
# /usr/local/bin/rake generate_secret_token
Next, we'll setup the database with exporting RAILS_ENV variable as "production" with below command.
# /usr/local/bin/rake db:migrate RAILS_ENV="production"
Then, finally the database needs to be populated with default data by executing the following command. This command will prompt us to choose a language for it, we'll simply go with the default language ie English (en).
# /usr/bin/rake redmine:load_default_data RAILS_ENV="production"
Select language: ar, az, bg, bs, ca, cs, da, de, el, en, en-GB, es, es-PA, et, eu, fa, fi, fr, gl, he, hr, hu, id, it, ja, ko, lt, lv, mk, mn, nl, no, pl, pt, pt-BR, ro, ru, sk, sl, sq, sr, sr-YU, sv, th, tr, uk, vi, zh, zh-TW [en] en
Default configuration data loaded.
10. Installing and Configuring Passenger
As we are going to setup for production, we'll gonna go for installing Passenger so that we can host our Redmine through apache2 via Passenger. To setup the Passenger bootstrap, we'll need to run the following command.
# gem install passenger
Fetching: passenger-5.0.21.gem (100%)
Building native extensions. This could take a while...
Successfully installed passenger-5.0.21
Parsing documentation for passenger-5.0.21
unable to convert "\x88" from ASCII-8BIT to UTF-8 for src/cxx_supportlib/vendor-modified/boost/thread/future.hpp, skipping
unable to convert "\x97" from ASCII-8BIT to UTF-8 for src/cxx_supportlib/vendor-modified/boost/utility/declval.hpp, skipping
Installing ri documentation for passenger-5.0.21
Done installing documentation for passenger after 69 seconds
1 gem installed
Next, after we have installed passenger, we'll need to install a passenger-apache2 module. To do so, we'll need to run the below command.
It will help us to diagnose any issues as well as provide some default settings for our specific installation.
Note: To compile Passenger, our machine requires at least 1GB of RAM or 1GB of RAM + Swap space combined.
After its installed, we'll now go further towards the configuration of Passenger.
Now, as we have got our required packages installed in our fedora 22 machine, we'll now need to configure our apache server for proper use of passenger. To do so, we'll need to create a new file passenger.conf in which we'll define configuration for our passenger.
# nano /etc/httpd/conf.d/passenger.conf
After its opened via our text editor, we'll need to append this file with the configuration as shown below.
LoadModule passenger_module /usr/local/share/gems/gems/passenger-5.0.21/buildout/apache2/mod_passenger.so <IfModule mod_passenger.c> PassengerRoot /usr/local/share/gems/gems/passenger-5.0.21 PassengerDefaultRuby /usr/bin/ruby </IfModule>
Once done, we'll need to save and exit the editor.
11. Configuring Apache Web Server
Now, as our passenger is configured completely, we'll now configure our apache configuration in order to run our Redmine via Apache Web Server. To do so, we'll need to create a new conf file under /etc/httpd/conf.d/redmine.conf using a text editor.
# nano /etc/httpd/conf.d/redmine.conf
Then, we'll need to copy the following lines of configuration into the file.
<VirtualHost *:80> ServerName redmine.linoxide.com DocumentRoot /var/www/redmine/public <Directory /var/www/redmine/public> AllowOverride all Options -MultiViews </Directory> </VirtualHost>
Once done, we'll simply save and exit the editor.
12. Restarting Web Server
Once everything above is configured and installed properly as done above, we'll now need to restart our Apache Web Server in order to run our Redmine for the first time. As Fedora 22 is shipped with systemd as init system by default, we'll simply run a systemd command in order to restart it.
# systemctl restart httpd
13. Allowing Firewall
Next, we'll need to configure our firewall program running in our linux machine to allow port 80 or http service so that our apache web server will be accessible within our network. As Fedora 22 has systemd preinstalled, firewalld is popular firewall program in it. So, we'll need to execute the following commands to allow port 80 or http service to expose from our linux machine.
# firewall-cmd --zone=public --add-service=http
# firewall-cmd --permanent --zone=public --add-service=http
14. Accessing Redmine
Now, as we have our apache web server running and http port forwarded, we should be able to access our Redmine web interface using a web browser. We'll simply need to point our web browser to http://ip-address/ or http://redmine.domain.com/ according to our configuration. Here, in this tutorial, we pointed our browser to http://redmine.linoxide.com/ as we had configured it in the apache web server in the above step. If everything went as expected, we should see our Redmine application running as follows.
Next, we'll gonna login into our Redmine Dashboard. To do so, we'll need to click on the Login button present just above in the navigation bar. Then, a login screen will appear which will ask for username and password. The default username and password of Redmine application is admin and admin respectively.
After we have successfully logged in, we'll go for creating our Projects. We can do that by navigating to Administration page from the above menu.
Then, we'll need to click on Projects and click on a button (+) New Project.
A form will appear in which we'll need to enter the required information and configuration for our Project as shown below. After we have completed the required information and settings, we'll need to Click on Create and Continue.
In this article, we learned how to setup a popular project management web application Redmine on a machine running Fedora 22 as operating system. It is an awesome cross platform application which makes project management, bug tracking and time tracking pretty easy with a bunch of different essential features. It is completely built and maintained by active community volunteers who are pretty helpful and loves to support its users. If you would like to take a demo of Redmine before going for installation, you can always visit http://demo.redmine.org/ . If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you !
You might also like
Filed Under : LINUX HOWTO