Installing Redmine on Centos 6.4 + GIT Support

Ruby Install

# yum install httpd-devel ruby ruby-devel -y
# cd /tmp
# wget
# tar zxvf mod_ruby-1.3.0.tar.gz
# cd mod_ruby-1.3.0/
# ./configure.rb --with-apr-includes=/usr/include/apr-1
# make
# make install


Configure Ruby to load with Apache

# vi /etc/httpd/conf.d/ruby.conf

Paste the following in the file

LoadModule ruby_module modules/
RubyAddPath /1.8

Now Restart the web server

# service httpd restart


Install Redmine

# cd /tmp
# wget
# tar -zxvf redmine-2.3.3.tar.gz

 Now move this to where ever you want to keep it



# mysql -p

In MySQL Console

 mysql > CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'PASSWORD';
 mysql > GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';


Copy config/database.yml.example to config/database.yml and edit this file in order to configure your database settings for “production” environment.


Following are the settings for For Ruby 1.8.7


# vi config/database.yml
 adapter: mysql
 database: redmine
 host: localhost
 username: redmine
 password: PASSWORD


Make sure you are inside the redmine directory with ‘Gemfile’. Run the following command

# gem install bundler


Before installing the bundles update the Gemfile, add

# vi Gemfile
gem 'mail', '2.5.3'


inside it. If you don’t use this, it will install mail 2.5.4 which will not work with redmine 2.3.3. I read somewhere that if ruby is >= 1.9.* we can use 2.5.4 version of mail but not sure.

# bundle install --without development test


If ImageMagick is not installed on your system, you should skip the installation of the rmagick gem using:

# bundle install --without development test rmagick


# rake generate_secret_token


# RAILS_ENV=production rake db:migrate
# RAILS_ENV=production rake redmine:load_default_data


Select your language [en]


File/folder permission

# mkdir -p tmp tmp/pdf public/plugin_assets
# sudo chown -R USER:USERGROUP files log tmp public/plugin_assets
# sudo chmod -R 755 files log tmp public/plugin_assets


Testing the Installation

# ruby script/rails server webrick -e production


Now in your browser go to http://yourip:3000

Use the following details

Login: admin
Pass: admin


EMAIL Settings

# vi config/configuration.yml

locate and change the following


 # Outgoing emails configuration (see examples above)
   delivery_method: :sendmail
     port: 25

GIT Integration

# which git

normally it is in ‘/usr/bin/git’

# vi config/configuration.yml

locate and add the path

scm_git_command: /usr/bin/git

Login to admin, create project, in project settings create Repository, in repository settings page, Select GIT, and in path provide full path including git dir, for example



Apache Configuration

Used this one


# gem install passenger
# passenger-install-apache2-module


More details on passenger


# rake generate_session_store


Create /etc/httpd/conf.d/passenger.conf

# vi /etc/httpd/conf.d/passenger.conf
LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/buildout/apache2/
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18
PassengerDefaultRuby /usr/bin/ruby
# the following line is required, as files uploaded will be owned by apache, if not
# added it will cuase 500 internal server error on file delete/ or issue/project
# delete where files are attached with issues
PassengerDefaultUser apache


Redmine Apache Config

# vi /etc/httpd/conf.d/redmine.conf
Listen *:3000
   <VirtualHost *:80>
       ServerAdmin webmaster@<YOUR-DOMAIN>.com
       DocumentRoot /var/www/clients/client1/web1/web/red/public/
       ErrorLog logs/redmine_error_log
       #If you are using mod_fcgid and are going to upload files larger than
       #131072 bytes you should consider adding the following line
       #that allows to upload files up to 20 mb
       MaxRequestLen 20971520
       <Directory "/var/www/clients/client1/web1/web/red/public/">
               Options Indexes ExecCGI FollowSymLinks
               Order allow,deny
               Allow from all
               AllowOverride all

For more details follow the tutorial link provided above

Check Memory Consumption

# passenger-memory-stats


Unable to delete a project – check that there are files attached with any of its issues? if yes make sure to include PassengerDefaultUser in the passenger.conf file, when file is uploaded passenger store it as root and can not delete it later

Only registered users can comment.

Leave a Reply

Your email address will not be published. Required fields are marked *