[HowTo] Install ChiliProject (or Redmine) on CentOS

This a quick and dirty guide to getting a chiliproject or redmine installation up on CentOS 5.5 with the following:

  • Ruby Enterprise Edition
  • Rails
  • RubyGems
  • Passenger
  • Apache
  • MySQL

This is just a suggested method that I would use for testing locally, there are MANY alternate, better ways of doing this. This is just to get you started in the right direction to setup and test ChiliProject/Redmine. In the future I’ll post a full proper tutorial as soon as I get time. In this “tutorial” I assume you are doing things as root on a server intended only to host a single redmine, in general this is not a secure or perfect setup but is fine for internal use.

First, let’s install some prerequisites and the things we want from the centos repositories:

yum install gcc zlib-devel curl-devel expat-devel gettext-devel httpd httpd-devel apr-devel apr-util-devel mysql mysql-server mysql-devel openssl openssl-devel make gcc-c++ patch readline-devel ImageMagick ImageMagick-devel

This will get mysql and apache, as well as the basic tools you should need to build the remaining applications.

Start httpd and make sure there are no errors, configure the server to start automatically

/etc/init.d/httpd start
Starting httpd:                                            [  OK  ]
/sbin/chkconfig httpd on

Same with mysql

/etc/init.d/mysqld start
Starting MySQL:                                            [  OK  ]
/sbin/chkconfig mysqld on

Ensure both are done correctly:

/sbin/chkconfig --list httpd
httpd          	0:off	1:off	2:on	3:on	4:on	5:on	6:off
/sbin/chkconfig --list mysqld
mysqld         	0:off	1:off	2:on	3:on	4:on	5:on

Download, extract and install ruby enterprise edition, if you are not comfortable managing and updating a source installaiton, you should consider using this repository or rvm.

wget http://rubyforge.org/frs/download.php/71096/ruby-enterprise-1.8.7-2010.02.tar.gz
tar xzvf ruby-enterprise-1.8.7-2010.02.tar.gz

Follow the prompts in the installer, the defaults should be fine.

Create some useful symlinks:

ln -s /opt/ruby-enterprise-1.8.7-2010.02/bin/rake /usr/bin/rake
ln -s /opt/ruby-enterprise-1.8.7-2010.02/bin/gem /usr/bin/gem
ln -s /opt/ruby-enterprise-1.8.7-2010.02/bin/ruby /usr/bin/ruby
ln -s /opt/ruby-enterprise-1.8.7-2010.02/bin/irb /usr/bin/irb

Remove the included copy of rails and install the version required by ChiliProject

gem uninstall rails
gem install rails -v=2.3.5

Let’s install passenger:


Once it completes it will give you the following lines to place in the apache config, you can use your favorite editor to add these to /etc/httpd/conf/httpd.conf

   LoadModule passenger_module /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/passenger-3.0.2/ext/apache2/mod_passenger.so
   PassengerRoot /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/passenger-3.0.2
   PassengerRuby /opt/ruby-enterprise-1.8.7-2010.02/bin/ruby

Restart Apache:

/etc/init.d/httpd restart

In case you don’t have git and svn installed, enable EPEL repositories and get them:

su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
yum install git subversion

Now just follow the directions at https://www.chiliproject.org/projects/chiliproject/wiki/Installation (or redmine)

Once you have confirmed it’s working with webrick, add this to your apache conf:

   <VirtualHost *:80>
      ServerName www.yourhost.com
      DocumentRoot /somewhere/public    # <-- be sure to point to 'public'!
      <Directory /somewhere/public>
         AllowOverride all              # <-- relax Apache security settings
         Options -MultiViews            # <-- MultiViews must be turned off

In my example setup it would be like the following:

<VirtualHost *:80>
      ServerName www.my.domain.com
      DocumentRoot /var/www/chiliproject/public
      <Directory /var/www/chiliproject/public>
         AllowOverride all
        Options -MultiViews

Restart apache and everything should be working as expected :)

This is just a rough guide, hit me up on IRC for specific help. If you are setting up a site for public use, this guide isn’t recommended at all.


  • Fantastic. Very sorely needed information on installing Redmine! Will let you know how it goes.

  • [...] is a quick guide on how to setup ChiliProject (or redmine) on CentOS 5.6. This is a followup to this post, with some different, slightly better methodology. I’ll likely be iterating on this guide a [...]

Leave a comment

You must be logged in to post a comment.