Skip to content

Instantly share code, notes, and snippets.

@gogojimmy
Forked from ruliana/bootstrap-chef-solo.sh
Last active March 14, 2019 02:43
  • Star 18 You must be signed in to star a gist
  • Fork 20 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save gogojimmy/5523985 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Pre-requisites
sudo apt-get -y update
sudo apt-get --no-install-recommends -y install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev libgdbm-dev ncurses-dev automake libtool bison subversion pkg-config libffi-dev vim
# Download and compile Ruby 2.0.0-p0
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.gz
tar -xvzf ruby-2.0.0-p0.tar.gz
cd ruby-2.0.0-p0
./configure --prefix=/usr/local
make
make install
# Download and build Chef compatible with Ruby 2.0
cd /tmp
curl -o chef.tar.gz -L https://api.github.com/repos/opscode/chef/tarball/CHEF-3935
tar -xvzf chef.tar.gz
cd opscode-chef-634ad58
sudo gem build chef.gemspec
sudo gem install chef-11.4.0.gem --no-ri --no-rdoc
# The rest
sudo gem install ruby-shadow --no-ri --no-rdoc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment