Skip to content

Instantly share code, notes, and snippets.

@hanksudo
Created November 25, 2015 13:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hanksudo/ca43a81dabdab97b05ac to your computer and use it in GitHub Desktop.
Save hanksudo/ca43a81dabdab97b05ac to your computer and use it in GitHub Desktop.
install chef-solo by rubygem on ubuntu in China (aliyun)
apt-get update
apt-get 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 -y
# install ruby
cd /tmp
wget https://ruby.taobao.org/mirrors/ruby/ruby-2.2.2.tar.gz
tar -zxvf ruby-*.tar.gz
cd ruby-*
./configure --prefix=/usr/local
make
make install
# change gem source
gem sources --add https://ruby.taobao.org/ --remove https://rubygems.org/
# install chef-solo
cd /tmp
curl -o chef.tar.gz -L https://api.github.com/repos/opscode/chef/tarball
tar -zxvf chef.tar.gz
cd chef-*
gem build chef.gemspec
gem install chef --no-ri --no-rdoc
chef-solo -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment