Opscode
Home     Introduction to Chef     Cookbooks     Blog     GitHub     Tickets 

Installation on CentOS 4 with RubyGems

CentOS 5 users!

You should follow the instructions for Installation on RHEL and CentOS 5 with RPMs as they are well tested.

Centos4 has a problem with installing gems from source since the included version of Ruby is very old.

This page describes how to set up the CentOS Testing repository to get a usable version of Ruby.

Create Yum Repository

Create the file, /etc/yum.repos.d/CentOS-Testing.repo with your favorite text editor with the following contents.

vi /etc/yum.repos.d/CentOS-Testing.repo

Install GCC and G++

To compile native extensions for some Gems, we'll need GCC and G++, as well as for Chef Server to compile the Apache module for Passenger.

install gcc, g++

Install Ruby Packages

Install the required Ruby packages by specifying this repository.

Install Ruby


Ruby 1.8.6, 1.8.7, 1.9.1 or 1.9.2 with SSL bindings and development tools to build RubyGems with native extensions is required. You will need to install the appropriate packages for your operating system.

On Debian and Ubuntu

(We need wget as well for the next step)

On Red Hat and CentOS

Enable EPEL repository:

Enable ELFF repository to get Ruby 1.8.6.

(Modify the release to match your local system for EPEL and ELFF)

Install Ruby and development tools:

Install RubyGems from Source


We prefer to install RubyGems from source rather than use the OS-provided version (if any), as it is cross platform, so we know what to expect.

Install RubyGems

Install Chef Gem


Now we'll install the Chef RubyGem. This also installs Chef's dependencies.

Install Chef

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Copyright © 2009 Opscode, Inc. All Rights Reserved.