Skip to content

Instantly share code, notes, and snippets.

@lazywei
Forked from gogojimmy/bootstrap-chef-solo.sh
Last active December 20, 2015 21:49
Show Gist options
  • Save lazywei/6200864 to your computer and use it in GitHub Desktop.
Save lazywei/6200864 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 install rbenv
cd ~
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile
echo 'eval "$(rbenv init -)"' >> ~/.profile
exec $SHELL -l
# Install ruby-build
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
# Install rbenv-readline
git clone git://github.com/tpope/rbenv-readline.git ~/.rbenv/plugins/rbenv-readline
# Install ruby
rbenv install 2.0.0-p247
rbenv rehash
# Download and build Chef
cd /tmp
curl -L https://www.opscode.com/chef/install.sh | sudo bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment