Page tree
Skip to end of metadata
Go to start of metadata

Overview

This document describes how to install the Redmine web application. The Redmine application is a project management web application that functions on the Ruby on Rails platform. You can manage the Redmine application's configurations in cPanel's Application Manager interface (Home >> Software >> Application Manager).

Warning:

  • We recommend that only experienced system administrators attempt to perform these steps.
  • We are not responsible for any data loss that an attempt to perform these steps causes.

Notes:

  • We recommend that you perform the steps in this document via the command line as a cPanel user unless otherwise specified.
  • In this document, user represents the cPanel user, and greenmine represents the Redmine web application's name.


For more information, read Redmine's documentation.

Install Redmine


Pre-installation settings.

Before you begin, make certain that the following RPMs exist on the server:

  • ea-ruby24-mod_passenger
  • ea-ruby24-ruby-devel
  • ImageMagick-devel

To install these RPMs, run the following command as the root user:

yum install ea-ruby24-mod_passenger ea-ruby24-ruby-devel ImageMagick-devel

 


 

Install the bundler gem.

To install the bundler Ruby gem, run the following command:

scl enable ea-ruby24 'gem install bundler'

If you do not wish to use the scl utility, perform the following steps to install the bundler Ruby gem:

  1. Log in to the server via the command line as a cPanel user.

  2. Add the following line to your shell's rc file (for example, /home/user/.bashrc file):

    /opt/cpanel/ea-ruby24/enable
  3. Log out of your account, and log back in again.

    Note:

    You can also create a new shell prompt.

 


 

Extract the redmine archive.

After you install the bundler and rake Ruby gems, download the redmine application and extract the archive file. To do this, perform the following steps:

  1. Navigate to the Redmine website in a web browser.
  2. Download the most recent .tar.gz file from the Stable Releases section. To do this, run the following command:

    wget url http://www.redmine.org/releases/redmine-3.3.3.tar.gz
  3. Extract the .tar.gz file's contents. To do this, run the following command:

    tar xvzf redmine-3.3.3.tar.gz
  4. After you extract the file, rename the archive to your Ruby application's name. To do this, run the following command:

    mv /home/$user/redmine-3.3.3 /home/user/greenmine

 


 

Change the Ruby on rails version

After you extract the redmine archive file and rename the file, change the Ruby on Rails (RoR) version that the application uses. To do this, perform the following steps:

  1. Open the /home/user/greenmine/Gemfile file with a text editor.
  2. Locate the following line in the file:

    gem "rails", "4.2.7.1"
  3. Change the ROR version from the 4.2.7.1 version to the 4.2.8 version, for example:

    gem "rails", "4.2.8"

 


 

Create the database and database users.

After you change the application's ROR version, create the application's database and configure the database users. To do this, perform the following steps:

  1. Create production and development databases and database users in cPanel's MySQL Database Wizard interface (Home >> Databases >> MySQL Database Wizard).
  2. Copy the contents of the /home/user/greenmine/config/database.yml.example file to the /home/user/greenmine/config/database.yml file.
  3. Open the /config/database.yml file with a text editor.
  4. Add the following information to the file:
    • The databases' names.
    • The databases' usernames.
    • The databases' passwords.

    The file will resemble the following example:

     Click to view...
    # Default setup is given for MySQL with ruby1.9.
    # Examples for PostgreSQL, SQLite3 and SQL Server can be found at the end.
    # Line indentation must be 2 spaces (no tabs).
     
    production:
      adapter: mysql2
      database: kermit_greenminetest
      host: localhost
      username: kermit
      password: "misspiggy1"
      encoding: utf8
    
    development:
      adapter: mysql2
      database: kermit_greenmine_development
      host: localhost
      username: kermit_dev
      password: "fozzy1"
      encoding: utf8
     

 


 

Install your Ruby Gems.

To install the Ruby Gems that reside in the /home/user/greenmine/Gemfile file, change to the /home/user/greenmine directory and run the following command.

scl enable ea-ruby24 'bundle install' 

 


 

Create a secret key.

After you install your Ruby Gems, create the "secret" key. RoR uses this random key to encode cookies and prevent cookie tampering.

To do generate the "secret" key, run the following command:

scl enable ea-ruby24 'rake secret' 

This command returns a key hash that resembles the following example:

0d3f00336c10ac419f9ed08b4448dc1e652179b86eb1c434d3e4cf68b15aa92fbac1dc1f24a19b150b63a133fe4e89b8fb79ca5e78026bcbcf8ce183f5c9ca8c

After you create the secret key, create the /home/user/greenmine/config/secrets.yml file and add the following content:

production:
  secret_key_base: secretkey

Note:

Replace secretkey with the key that the scl enable ea-ruby24 'rake secret' command returned.

 


 

Create the database structure.

After you add the security key to the /home/user/greenmine/config/secrets.yml file, create the database structure. To do this, change to the /home/user/greenmine directory and run the following command:

RAILS_ENV=production scl enable ea-ruby24 'bundle exec rake db:migrate'

The output will resemble the following partial example:

 Click to view...
== 20160416072926 RemovePositionDefaults: migrating ===========================
-- change_column("boards", :position, :integer, {:default=>nil})
   -> 0.0025s
-- change_column("custom_fields", :position, :integer, {:default=>nil})
   -> 0.0024s
-- change_column("enumerations", :position, :integer, {:default=>nil})
   -> 0.0023s
-- change_column("issue_statuses", :position, :integer, {:default=>nil})
   -> 0.0021s
-- change_column("roles", :position, :integer, {:default=>nil})
   -> 0.0022s
-- change_column("trackers", :position, :integer, {:default=>nil})
   -> 0.0020s
== 20160416072926 RemovePositionDefaults: migrated (0.0139s) ==================

== 20160529063352 AddRolesSettings: migrating =================================
-- add_column(:roles, :settings, :text)
   -> 0.0109s
== 20160529063352 AddRolesSettings: migrated (0.0109s) ========================

 


 

Create the data configuration.

After you create the database structure, create the database's default configuration data set. To do this, perform the following steps:

  1. Run the following command:

    RAILS_ENV=production scl enable ea-ruby24 'bundle exec rake redmine:load_default_data'
  2. When the system prompts you, select the database's locale. To do this, enter your chosen locale's two letter abbreviation in the command line, for example:

    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-GB

    Note:

    This example selects British English (en-GB) as the database's locale.

 



 

Set the file system permissions.

After you create the database's data configuration, set the file system permissions. To do this, change to the /home/usr/greenmine directory and run the following series of commands:

$ mkdir -p tmp tmp/pdf public/plugin_assets
$ chown -R user. files log tmp public/plugin_assets
$ chmod -R 755 files log tmp public/plugin_assets

 


 

Create the application.

After you set the file permissions, create the greenmine application's Apache configuration. To do this, use UAPI's register_application_config function.

 


 

Restart apache.

Important:

This step is optional. UAPI's register_application_config function performs an Apache restart, but may not execute immediately.

After you create the greenmine application's Apache configuration, restart Apache. To do this, run the following command as the root user:

/usr/local/cpanel/scripts/restartsrv_httpd

After Apache restarts, you can access the greenmine application in cPanel's Application Manager interface (Home >> Software >> Application Manager).

 

Additional documentation


  • No labels