Skip to content

Instantly share code, notes, and snippets.

@masa-ita
Last active December 12, 2015 09:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masa-ita/4752223 to your computer and use it in GitHub Desktop.
Save masa-ita/4752223 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Tested for Ubuntu 12.04
[[ "$(id -u)" -ne "0" ]] && echo "must be root!" && exit 1
RBVER="2.0.0-p0"
apt-get update
apt-get install -y build-essential bison zlib1g-dev libssl-dev libgdbm-dev libreadline-dev libncurses-dev libffi-dev libyaml-dev wget rsync git-core
# Install Ruby
cd /tmp
wget "http://ftp.ruby-lang.org/pub/ruby/${RBVER[0,3]}/ruby-${RBVER}.tar.bz2"
tar -xjf ruby-${RBVER}.tar.bz2
cd ruby-${RBVER}/
./configure --prefix=/usr/local
make
make install
gem install ruby-shadow --no-ri --no-rdoc
cd /tmp
git clone git://github.com/opscode/chef.git
cd chef
gem build chef.gemspec
gem install chef-11.4.0.gem
mkdir -p /var/chef/cache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment