How to Install a Redmine® Web Application
Last modified: August 10, 2020
- Because cPanel, L.L.C. doesn’t develop or ship Redmine®, cPanel Technical Support can’t help you with it.
- We recommend that only experienced system administrators perform these steps.
- We are not responsible for any data loss.
This document describes how to install the Redmine web application. The Redmine application is a project management web application that functions on the Ruby platform. You can register the Redmine application in cPanel’s Application Manager interface (cPanel >> Home >> Software >> Application Manager).
We recommend that you perform the steps in this document via the command line as a cPanel user unless the step specifies otherwise.
You can also perform these steps in cPanel’s Terminal interface (cPanel >> Home >> Advanced >> Terminal).
To use this feature, the cPanel account must possess compiler access in WHM’s Compiler Access interface (WHM >> Home >> Security Center >> Compiler Access). If the account does not possess compiler access, the system will return an error similar to the following message:
make: execvp: gcc: Permission denied
In this document,
userrepresents the cPanel user, and
greenminerepresents the Redmine web application’s name.
For more information, read Redmine’s documentation.
Before you begin, ensure that you remove the operating system-provided Ruby installation. Then, install Ruby via the following RPMs:
If you enable this module, the system will disable Apache’s
ea-apache24-mod_envmodule allows you to add environment variables when you register your application. For more information about environment variables, read our Application Manager documentation.
To install these RPMs, run the following command as the
yum install ea-ruby24-mod_passenger ea-ruby24-ruby-devel ImageMagick-devel ea-apache24-mod_env
Install the bundler gem
To install the bundler Ruby gem, run the following command as a cPanel user:
scl enable ea-ruby24 'gem install bundler --user-install'
If you do not wish to use the
scl utility, perform the following steps to install the
bundler Ruby gem:
Log in to the server as a cPanel user.
Add the following line to your shell’s
rcfile (for example, the
Log out of your terminal session, and log back in again.Note:
You can also create an additional terminal session.
gem install bundler --user-installcommand.
Extract the redmine archive file
After you install the
rake Ruby gems, download the application and extract the archive file. To do this, perform the following steps:
Access the Redmine website in a web browser.
Download the most recent
.tar.gzfile from the Stable Releases section. To do this, run the following command:
Make certain that you install wget before you run this command.
wget url http://www.redmine.org/releases/redmine-X.X.X.tar.gz
.tar.gzfile’s contents. To do this, run the following command:
tar xvzf redmine-X.X.X.tar.gz
After you extract the
.tar.gzfile, rename the file to your Ruby application’s name. To do this, run the following command:
mv /home/$user/redmine-X.X.X /home/user/greenmine
In the above examples:
redmine-X.X.X.tar.gzrepresents the most recent
greenminerepresents your web application’s name.
Create the database and database users
After you extract the
redmine archive file, create the application’s database and configure the database users. To do this, perform the following steps:
Create production and development databases and database users in cPanel’s MySQL Database Wizard interface (cPanel >> Home >> Databases >> MySQL Database Wizard).
Copy the contents of the
/home/user/greenmine/config/database.yml.examplefile to the
/config/database.ymlfile with a text editor.
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...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
# 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, which the system uses to encode cookies. To 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:
After you create the secret key, create the
/home/user/greenmine/config/secrets.yml file and add the following content:
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:
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:
Run the following command:
RAILS_ENV=production scl enable ea-ruby24 'bundle exec rake redmine:load_default_data'
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
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/user/greenmine directory and run the following series of commands:
Register the application
After you set the file permissions, register your web application. To do this, use UAPI’s
PassengerApps::register_application function, or cPanel’s Application Manager interface (cPanel >> Home >> Software >> Application Manager).
This step is optional. UAPI’s
PassengerApps::register_application function performs an Apache restart, but may not execute immediately.
After you register the Apache configuration, restart Apache. To do this, run the following command as the
After Apache restarts, you can access the
greenmine application in cPanel’s Application Manager interface (cPanel >> Home >> Software >> Application Manager).