How to Install and Configure Redmine on CentOS 7


  • You must have Alibaba Cloud Elastic Compute Service (ECS) activated and verified your valid payment method. If you are a new user, you can get a free account in your Alibaba Cloud account. If you don’t know about how to setup your ECS instance, you can refer to this tutorial or quick-start guide. Your ECS instance must have at least 2GB RAM and 1 Core processor.
  • A domain name registered from Alibaba Cloud. If you have already registered a domain from Alibaba Cloud or any other host, you can update its domain nameserver records.
  • Domain name must be pointed to your Alibaba Cloud ECS’s IP address
  • Server’s hostname is set up.
  • Access to VNC console in your Alibaba Cloud or SSH client installed in your PC

Setting Up Your Alibaba Cloud ECS Instance

Basic Installations

Install Apache

# sudo yum install httpd-devel

Install MySQL

# sudo yum install mysql-devel

Install curl-devel

# sudo yum install curl-devel

Install Unzip

# sudo yum install unzip

Install Ruby

# curl -sSL | bash -s stable
# gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
# curl -sSL | bash -s stable
# source /home/aareez/.rvm/scripts/rvm
#  rvm install 2.4
# ruby -v

Install RubyGems

# sudo yum install rubygems

Install Phusion Passenger

# gem install passenger

Set Up Permissions for Phusion Passenger

# sudo chmod o+x "/home/aareez"

Install Phusion Passenger Apache 2 Module

# passenger-install-apache2-module

Configure Phusion Apache

# sudo nano /etc/httpd/conf.modules.d/00-base.conf
LoadModule passenger_module /home/aareez/.rvm/gems/ruby-2.4.1/gems/passenger-5.3.1/buildout/apache2/
# sudo nano /etc/httpd/conf/httpd.conf
<IfModule mod_passenger.c>
PassengerRoot /home/aareez/.rvm/gems/ruby-2.2.2/gems/passenger-5.3.1
PassengerDefaultRuby /home/aareez/.rvm/gems/ruby-2.2.2/wrappers/ruby
# sudo service httpd restart

Install MariaDB

# sudo yum install mariadb-server
# sudo systemctl start mariadb
# sudo systemctl enable mariadb
# sudo mysql_secure_installation

Create Database for Redmine

# mysql -u root -p
create database redmine character set utf8;
create user 'redmine'@'localhost' identified by 'your-password-here';
grant all privileges on redmine.* to 'redmine'@'localhost';

Install Redmine

# wget
# unzip
# sudo cp -av redmine-3.4.5/* /var/www/html
# cd /var/www/html/config
# sudo cp database.yml.example database.yml
# sudo nano database.yml

Configure Rails

# sudo chown -R aareez:aareez /var/www/html

Installing ImageMagick and ImageMagick-devel

# sudo yum -y install ImageMagick ImageMagick-devel

Installing rmagick

# gem install rmagick

Installing bundler

# gem install bundler
# sudo nano /var/www/html/Gemfile
# file: /var/www/html/Gemfile
source ""
gem "rake", "12.3.1"
gem "rack", "1.6.0"
gem "rubytree", "0.5.2", :require => "tree"
gem "RedCloth", "~>4.2.3", :require => "redcloth" # for CodeRay
# cd /var/www/html
# bundle install
# bundle update

Set Up the Environment

# RAILS_ENV=production bundle exec rake generate_secret_token
# RAILS_ENV=production bundle exec rake db:migrate
# RAILS_ENV=production bundle exec rake redmine:load_default_data
# cd /var/www/html/public
# mv htaccess.fcgi.example .htaccess
# mv dispatch.fcgi.example dispatch.fcgi

Set rights for apache user

# cd /var/www
# sudo chown -R apache:apache html
# sudo chmod -R 755 html

Set Up Virtual Host

# sudo nano /etc/httpd/conf.d/welcome.conf
<VirtualHost *:3000>
DocumentRoot /var/www/html/public/
PassengerRoot /home/aareez/.rvm/gems/ruby-2.4.1/gems/passenger-5.3.1
PassengerRuby /home/aareez/.rvm/gems/ruby-2.4.1/wrappers/ruby
PassengerUser aareez
<Directory /var/www/html/public/>
Allow from all ExecCGI
Options -MultiViews
Require all granted
# sudo service httpd restart

Access Redmine




Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

This weird old tip unlocks running Slack on a laptop with less than 32GB of memory

Dynamic website navigation with Faceted search, using RDFox

Saving Data to Google Sheets From BigQuery

cs371p Spring 2022 Week 14: Badr Belhiti

How to Use VMware vApp in a vSphere Environment: Short Walkthrough

Django and React Gatsby using GraphQL API to create a blog

Creating a Machine/Deep Learning Dataset from Google Images using Selenium

Sending Multipart / Form Data with InvokeHTTP in Apache NiFi 1.12-SNAPSHOT

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:

More from Medium

Produce and consume messages from a Kafka topic using docker

The idea behind Docker and Linux containers

What Is Docker?

Introduction To Docker: A Beginner’s Guide