0

I learn chef recently, and I find the tutorial on the Internet,they install the ruby environment and chef before they install software on the server machine.

apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline5-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz
tar -xvzf ruby-1.9.3-p125.tar.gz
cd ruby-1.9.3-p125/
./configure --prefix=/usr/local
make
make install
gem install chef ruby-shadow --no-ri --no-rdoc

my question is the ruby environment and gem chef is a requirement if I want to install software on the server machine?

StephenKing
  • 36,187
  • 11
  • 83
  • 112
wcc526
  • 3,915
  • 2
  • 31
  • 29

1 Answers1

3

Since Chef 11, Chef is shipped with Omnibus Installer. This brings (almost) everything that Chef needs, including a ruby environment. So you don't have to install any ruby and you are not supposed to install the Chef gem.

Instead download chef-client and follow the install instructions. Alternatively, you can use this command:

curl -L https://www.opscode.com/chef/install.sh | sudo bash
StephenKing
  • 36,187
  • 11
  • 83
  • 112
  • Actually Chef client versions back to 10.12 are available through omnibus. But if you are just getting started, you should start with the latest 11+. – Charlie Jun 15 '14 at 21:33