Skip to content

Instantly share code, notes, and snippets.

@snooc
Created September 5, 2012 20:24
Show Gist options
  • Save snooc/3644140 to your computer and use it in GitHub Desktop.
Save snooc/3644140 to your computer and use it in GitHub Desktop.
CentOS 6.3 Chef-Solo Bootstrap - Ruby1.9.3 + libyaml
#! /bin/bash
#####################
# Run this as root! #
#####################
yum update
yum groupinstall "Development Tools"
yum install zlib-devel readline-devel openssl-devel
cd /tmp
# Compile libyaml
wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
tar xzvf yaml-0.1.4.tar.gz
cd yaml-0.1.4
./configure --prefix=/usr/local
cd ..
# Compile Ruby
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz
tar xzvf ruby-1.9.3-p194.tar.gz
cd ruby-1.9.3-p194
./configure --prefix=/usr/local --enable-shared --disable-install-doc --with-opt-dir=/usr/local/lib
make
make install
ruby -v # Check to see that it worked
# No RI or RDoc
echo -e "install: --no-rdoc --no-ri\nupdate: --no-rdoc --no-ri" > /etc/gemrc
# Update Gems
gem update
# Install chef-solo
gem install chef ruby-shadow
# Setup Chef
mkdir /var/chef
cd /var/chef
@graft
Copy link

graft commented Nov 26, 2012

You seem to be missing make/make install after your configure step at line 18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment