Redmine is a flexible project management web application written using Ruby on Rails framework. It is easy to install it using CloudLinux Ruby Selector. Follow this guide to install Ruby-Selector. It works with CageFS, so make sure to enable it for the account. Redmine version described in installation instructions is different from Redmine version used. The example given describes the process for version 3.3.1. For other versions please refer to doc/INSTALL file provided with downloaded Redmine archive or to the official Installation Guide.
Setting up a working environment
1. In cPanel (as a user) create MySQL database, create MySQL user and Add user to Database granting all privileges.
2. Create a new application with 'Setup Ruby Application' menu, use Ruby version 2.3. Domain root or any subdirectory can be used.
3. (if you'd like to use GUI) After the application created, add the following modules with the proper version for each.
bundle, bundler#1.9.0, rails#22.214.171.124, bigdecimal#1.4.4, rake#12.3.2, mysql2#0.3.21
Click Update. It will take about 2 minutes to have them and dependent modules installed.
(if you'd like to use CLI) Log in as a cPanel user (it's redmine in this example):
su -l -s /bin/bash redmine
selectorctl --interpreter=ruby --version 2.3 --user redmine --create-webapp redmine /
This will create a web app in document_root/redmine (example : /home/redmine/redmine) under main domain URI (Example: http://redmine.com/). Next, you'll need to install extensions:
selectorctl --interpreter=ruby --enable-user-extensions=bundle,bundler#1.9.0,rails#126.96.36.199,bigdecimal#1.4.4,rake#12.3.2,mysql2#0.3.21 redmine
This will enable all necessary modules required by redmine (here ‘redmine’ is your app folder)
IMPORTANT: rails gem will update bundler to 2.0.1 version, which is not compatible with the current installation, so it is important to remove this version and leave 1.9.0 in place.
selectorctl --interpreter=ruby --disable-user-extensions=bundler#2.0.1 redmine
NOTE: in case mysql2 installation results in error, install it as root:
[root@192-168-245-55 redmine]# source /home/redmine/rubyvenv/redmine/2.3/bin/activate
(redmine:2.4)[root@192-168-245-55 redmine]# gem install mysql2 -v 0.3.21
Building native extensions. This could take a while...
Successfully installed mysql2-0.3.21
Parsing documentation for mysql2-0.3.21
Installing ri documentation for mysql2-0.3.21
Done installing documentation for mysql2 after 0 seconds
1 gem installed
4. Install ImageMagick-devel for rmagick gem:
$ yum install ImageMagick-devel
1. Log in to the server as a user (ssh or su -):
$ su -l -s /bin/bash redmine
2. Download the latest Redmine:
$ wget http://www.redmine.org/releases/redmine-3.3.1.tar.gz
3. Unpack it and move to the chosen application directory (called redmine in our example):
$ tar xfz redmine-3.3.1.tar.gz
$ cp -rp redmine-3.3.1/* redmine/
4. Fill out database credentials that we have created with cPanel:
$ cd redmine
$ cp config/database.yml.example config/database.yml
$ vi config/database.yml
5. Activate the Ruby environment:
$ source ~/rubyvenv/redmine/2.3/bin/activate
6. Make sure that you are in the app directory. Add the "bigdecimal" gem into Gemfile:
$ cd redmine
Install the modules required by Redmine:
$ bundle install --without development test
Redmine stores session data in cookies by default, which requires a secret token to be generated. Do it and create database structure:
$ bundle exec rake generate_secret_token $ bundle exec rake db:migrate RAILS_ENV="production"
- Open Redmine location URL in the browser. Use the default administrator account to log in: login: admin password: admin
- Change your password to a new one with the proposed form.
- Go to Administration on the top, choose a preferred language and load the default configuration.
* After adding some other modules to an Application with cPanel interface you may need to restart the application, which can be done on the same Ruby Selector page.