Skip to content

Instantly share code, notes, and snippets.

@alChaCC
Forked from windless/bootstrap-chef-solo.sh
Last active August 29, 2015 14:06
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 alChaCC/f1295f5024eb4de71008 to your computer and use it in GitHub Desktop.
Save alChaCC/f1295f5024eb4de71008 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 git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties
# Download and compile Ruby 2.1.2
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz
tar -xvzf ruby-2.1.2.tar.gz
cd ruby-2.1.2
./configure --prefix=/usr/local
make
sudo make install
# Download and build Chef compatible with Ruby 2.1
cd /tmp
curl -o chef.tar.gz -L https://github.com/opscode/chef-repo/tarball/master
tar -xvzf chef.tar.gz
cd opscode-chef-repo-f9d4b0c
curl -L https://www.opscode.com/chef/install.sh | sudo bash
# 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