Skip to content

Instantly share code, notes, and snippets.

@hnagato
Forked from juno/README.md
Last active December 19, 2015 19:39
Show Gist options
  • Save hnagato/6007738 to your computer and use it in GitHub Desktop.
Save hnagato/6007738 to your computer and use it in GitHub Desktop.

Install rbenv and ruby-build to Amazon Linux (cloud-init).

  1. Copy & paste content of user-data.sh to EC2 RunInstances user-data
  2. Then, logging in to EC2 instance as ec2-user and run install-ruby.sh.
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
source ~/.bashrc
# Install and enable ruby-1.9.3-p448
rbenv install 1.9.3-p448 && rbenv global 1.9.3-p448
#!/bin/sh
# Install developer tools
yum install -y git gcc make readline-devel openssl-devel libxml2-devel libxslt-devel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment