Skip to content

Instantly share code, notes, and snippets.

@tyraeltong
Forked from gogojimmy/bootstrap-chef-solo.sh
Last active August 29, 2015 14:08
Show Gist options
  • Select an option

  • Save tyraeltong/b203decc9189da621f5f to your computer and use it in GitHub Desktop.

Select an option

Save tyraeltong/b203decc9189da621f5f 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.1.3
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.3.tar.gz
tar -xvzf ruby-2.1.3.tar.gz
cd ruby-2.1.3
./configure --prefix=/usr/local
make
make install
# Download and build Chef compatible with Ruby 2.1
cd /tmp
curl -o chef.tar.gz -L https://github.com/opscode/chef/archive/11.16.4.tar.gz
tar -xvzf chef.tar.gz
cd chef-11.16.4
sudo gem build chef.gemspec
sudo gem install chef-11.16.4.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