Project Management · Redmine · Ubuntu · Ubuntu 14.04

Installing Redmine on Ubuntu 14.04

Redmine is a web Based project management application based on Ruby. Some of the features of Redmine include:

  1. Role based access control.
  2. Per project wikis and forums, time tracking.
  3. Uses calendar and Gantt charts to aid visual representation of projects.
  4. Integrates with various version control systems and includes a repository browser and diff viewer.

Redmine can be installed on Ubuntu 14.04 LTS using the following procedure.

Let us start the installation by updating the packages. Run the following command to update the packages installed in this machine.

apt-get update && apt-upgrade

After the updating the packages, reboot may be needed if the kernel is also updated.
Note: Reboot the machine only if the Kernel is upgraded.

reboot

Let us now install the required support packages needed for redmine to work.

apt-get install apache2 libapache2-mod-passenger mysql-server mysql-client

Now that the installation of dependencies are done, we can install Redmine.

apt-get install redmine redmine-mysql

Select ‘Yes’ in the following screen to configure the database now. You can also choose ‘No’ to manually edit the related files later.

┌──────────────────────────┤ Configuring redmine ├──────────────────────────┐  
│                                                                           │  
│ The redmine/instances/default package must have a database installed and  │  
│ configured before it can be used.  This can be optionally handled with    │  
│ dbconfig-common.                                                          │  
│                                                                           │  
│ If you are an advanced database administrator and know that you want to   │  
│ perform this configuration manually, or if your database has already      │  
│ been installed and configured, you should refuse this option.  Details    │  
│ on what needs to be done should most likely be provided in                │  
│ /usr/share/doc/redmine/instances/default.                                 │  
│                                                                           │  
│ Otherwise, you should probably choose this option.                        │  
│                                                                           │  
│ Configure database for redmine/instances/default with dbconfig-common?    │  
│                                                                           │  
│                      <Yes>                  <No>                          │  
│                                                                           │  
└───────────────────────────────────────────────────────────────────────────┘

Select ‘mysql’ here. You can also choose any other database here. I have drafted the procedure for MySql in this article.

┌──────────────────────────┤ Configuring redmine ├──────────────────────────┐  
│ The redmine/instances/default package can be configured to use one of     │  
│ several database types. Below, you will be presented with the available   │  
│ choices.                                                                  │  
│                                                                           │  
│ Database type to be used by redmine/instances/default:                    │  
│                                                                           │  
│                                  sqlite3                                  │  
│                                  pgsql                                    │  
│                                  mysql                                    │  
│                                                                           │  
│                                                                           │  
│                                                                           │  
│                                                                           │  
└───────────────────────────────────────────────────────────────────────────┘

Enter the password of MySql ‘root’ user here.

┌──────────────────────────┤ Configuring redmine ├──────────────────────────┐  
│ Please provide the password for hte administrative account with which     │  
│ this package should create its MySQL database and user.                   │  
│                                                                           │  
│ Password of the database's administrative user:                           │  
│                                                                           │  
│ ******__________________________________________________________________  │  
│                                                                           │  
│                                                                           │  
│                                                                           │  
└───────────────────────────────────────────────────────────────────────────┘ 

Set the password for the default user in Redmine i.e. ‘redmine_default’.

┌──────────────────────────┤ Configuring redmine ├──────────────────────────┐  
│ Please provide a password for redmine/instances/default to register with  │  
│ the database server.  If left blank, a random password will be            │  
│ generated.                                                                │  
│                                                                           │  
│ MySQL application password for redmine/instances/default:                 │  
│                                                                           │  
│ *******__________________________________________________________________ │  
│                                                                           │  
│                                                                           │  
│                                                                           │  
└───────────────────────────────────────────────────────────────────────────┘ 

Confirm the password.

 ┌────┤ Configuring redmine ├─────┐                       
 │                                │                       
 │                                │                       
 │ Password confirmation:         │                       
 │                                │                       
 │ *******_______________________ │                       
 │                                │                       
 │                                │                       
 │                                │                       
 └────────────────────────────────┘  

Now edit the file /etc/apache2/mods-available/passenger.conf so as to look like this.

  PassengerDefaultUser www-data
  PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
  PassengerDefaultRuby /usr/bin/ruby

The apache server looks in the folder ‘/var/www’ for the files, but redmine files are installed in ‘/usr/share/redmine/public’. So we need to create a soft link named ‘/var/www/redmine’ pointing to ‘/usr/share/redmine/public’.

ln -s /usr/share/redmine/public /var/www/redmine

We can now install bundler which is also a dependency.

gem install bundler

Edit the file ‘/etc/apache2/sites-available/000-default.conf’ to look like this.

 ServerName my_domain.com
 DocumentRoot /var/www/redmine
 ServerAdmin user@example.com
 LogLevel warn
 ErrorLog /var/log/apache2/redmine_error
 CustomLog /var/log/apache2/redmine_access combined
 
 Options Indexes FollowSymLinks MultiViews
 AllowOverride None
 Order allow,deny
 allow from all
 RailsBaseURI /redmine
 PassengerResolveSymlinksInDocumentRoot on

The default ownership for the files in the folder ‘/usr/share/redmine’ would be of root user and root group. we would need to change this to www-data user and www-data group

chown -R www-data:www-data /usr/share/redmine/

Now the server is set. We need to restart Apache server to load the above changes.

service apache2 restart

Open a browser and load Redmine using the IP address of the server. For example, if 10.0.0.1 is the address of the server, then use the following URL.

http://10.0.0.1
Advertisements

6 thoughts on “Installing Redmine on Ubuntu 14.04

  1. Works great in Kubuntu 16.04. Had to make a small adjustment to the 000-default.conf file. I had to move the following code to the apache2.conf file:

    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    RailsBaseURI /redmine
    PassengerResolveSymlinksInDocumentRoot on

    With the above lines (without the Directory tags) in the 000-default.conf file, the Apache Server would not start.

    Thanks for the tutorial!!!

    1. I have to put inside Directory tags what I wrote in my first comment, and yes the tags go inside apache con site file 000-default.conf

  2. It works perfectly,I just had to add

    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    RailsBaseURI /redmine
    PassengerResolveSymlinksInDocumentRoot on

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s