Skip to content

Instantly share code, notes, and snippets.

@ferblape
Created March 10, 2013 19:06
Show Gist options
  • Select an option

  • Save ferblape/5129922 to your computer and use it in GitHub Desktop.

Select an option

Save ferblape/5129922 to your computer and use it in GitHub Desktop.
Install Ruby 1.9.3-p392 and chef-solo in Ubuntu 12.04.x
#!/bin/bash
export DEBIAN_FRONTEND=noninteractive
aptitude update &&
apt-get -o Dpkg::Options::="--force-confnew" -y -fuy dist-upgrade &&
# Install base packages
apt-get remove -y nano &&
apt-get install -y gcc g++ make zlib1g-dev git-core libxml2-dev libxslt-dev libopenssl-ruby\
libsqlite3-dev sqlite3 autoconf imagemagick curl libssl-dev\
libcurl4-openssl-dev libreadline6-dev libncurses5-dev openntpd\
libyaml-0-2 libyaml-dev vim build-essential libz-dev libc6-dev\
libreadline6-dev &&
cd /usr/local/src &&
wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz &&
tar xzvf yaml-0.1.4.tar.gz &&
cd yaml-0.1.4 &&
./configure --prefix=/usr/local &&
make &&
make install &&
# Install Ruby and Chef
cd /usr/local/src &&
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.tar.bz2 &&
tar jxvf ruby-1.9.3-p392.tar.bz2 &&
cd ruby-1.9.3-p392 &&
autoconf &&
./configure --prefix=/usr/local --enable-shared --disable-install-doc --with-opt-dir=/usr/local/lib &&
make && make install &&
gem install chef --no-ri --no-rdoc &&
echo "Installation finished"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment