(Last Updated On: March 25, 2017)

Redmine is a popular Project management software. Redmine is built on top of RoR (Ruby on Rails) and the redmine installation is very similar to how one would go about installation an RoR application. This however can get overwhelming and time consuming if you have not installed RoR apps before since RoR apps are a bit different to setup than their PHP counterparts. However, if you have been setting up CakePHP apps before, you might find it a bit easier. Here is a step by step redmine installation guide which will help you even if you are installing it for the first time.

Pre-requisites

Web Hosting: Redmine is a self hosted software so you would need to buy a web hosting yourself to host the Redmine. Please note that redmine is a Ruby on Rails(RoR) application so your host should you have RoR hosting enabled. Here are a few hosts that provide ready to go RoR hosting:

  1. Shared Hosts: Most of the shared hostings like hostgator, bluehost, dreamhost, siteground, inmotion hosting etc provide RoR ready Shared hosting.
  2. VPS: You might find it a bit difficult to find a VPS with RoR installed however you will still find a good number of hosts supporting RoR already installed. Nonetheless most of the VPS will provide you with a root access using which you can install Ruby and Rails by yourself.
  3. Dedicated Servers: In case you are using dedicated servers, you are mostly on your own, however you have quite some help available on the web for setting up Ruby and RoR on the dedicated servers. E.g there are bitnami images for EC2, there are detailed blogs for digitalocean and so on.

Database: Redmine can be based on top of mysql, postgresql or SQL Server. If you are using a shared host like bluehost, sitegroud etc to host redmine, then mysql will be your default database. However on VPS or dedicated server, you are free to install redmine on top of postgresql as well since you have freedom to install the applications with super user access.

Web Server: On Shared host, you are mostly stuck with the choice of web server and have to go with whatever your shared host provides. However while on VPS or dedicated server, it is easy enough to install redmine on any webserver you will like e.g Apache, nginx or any other host.

Additional Requirements

  1. The latest versions of redmine have deprecated support for Ruby 1.9.x and 2.0.x. So please ensure that the web host has atleast ruby 2.2.x installed.
  2. If you would like support for Gantt Charts etc, imagemagick would be required. Please check this with your shared host. You can anyways install image magick or any other application on a Virtual or a dedicated host.

Download Redmine

Alright, so now when we have our server set, its time to download redmine from the official repository. We will download and extract the redmine in the webroot i.e the folder accessible by webserver, from where it can pickup and run the scripts.

You can go here to download redmine. For the purpose of this blog we assume that the redmine downloaded is the latest version as of writing this blog i.e 3.3.x. This essential means that we will need to have a host which has atleast Ruby 2.2.x installed.

Install Redmine

Installing redmine is no difficult from installation any RoR application. The steps are mostly similar. Here is the step by step redmine installation guide:

  1. Database Creation: Create an empty database. You can do this from cpanel/plesk on the shared host. You can do this with console commands to create database on the VPS/dedicated server. Let us assume that you created a user <redmine> with password <your_password>. Please ensure to change these creds or this can be a big security loop in your server.
  2. Database Configuration: All the rails applications require that you configure the database in config/database.yml file. The configuration is simple and just requires that you enter the database name, user name and password. A sample database file looks like file.
    1. production:
        adapter: mysql2
        database: redmine
        host: localhost
        username: redmine
        password: my_password
  3. Install dependencies: Installing discrepancies in a Ruby on Rails application is a breeze. You just got to run the bundle command and bundler will install all required gems in place. You might also be required to add the path to the gems to the bash profile of linux user where the redmine is being installed. A simple command like as follows
    1. bundle install
  4. Generate Session Store Secret key: Just like every RoR App, generate a session store secret. The generation of session store secret is just a matter of running a simple rake command.
    1. bundle exec rake generate_secret_token
  5. Migrate Database: Its time to migrate the database. The migration of database will create the required tables and relationships in the database required to run the application. Again migration is a simple Rails rake task.
    1. bundle exec rake db:migrate
  6. Load default data to database: Redmine requires certain configuration options to be loaded into the database. This is loaded via a pre-configured rake script. At this step you can chose to configure the language in which you want to load the default data in. Redmine provides a host of language support. Just run a simple rake command to load the data to the database like:
    1. RAILS_ENV=production bundle exec rake redmine:load_default_data
  7. Grant Permissions to the web server user: The user running the web server must have these permissions for the file attachment, uploading and other functionality to work fine. files, log, tmp and public/plugin_assets folders should have write access for the user running the web server.
  8. Test the Installation: Its now time to test drive the installation. If you have been installing all this on a local system, you can just test the application with the built in server by running and test that the application is working on http://localhost:3000
    1. bundle exec rails server webrick -e production
  9. Migrate Redmine to the hosting server: Redmine comes with rails dispatcher and htaccess file to place in the webroot folder, where you can just place the files and get the redmine going. You might need to configure htaccess file as per your hosting environment and settings.

We hope that this redmine installation guide was helpful in getting you up and running with Redmine. Enjoy your shiny new redmine installation !!

Feel free to drop a comment if you get stuck somewhere, we will try to help as much as possible.