curl https://raw.github.com/gist/4598302/install-rvm.sh | sh
-
-
Save crmaxx/4598302 to your computer and use it in GitHub Desktop.
Amazon AWS EC2 production for Ruby on Rails
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo 'Installing RVM' | |
bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) | |
echo 'Prepare ENV' | |
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile | |
echo '# Ruby tuning' >> ~/.bash_profile | |
echo 'export RUBY_HEAP_MIN_SLOTS=1000000' >> ~/.bash_profile | |
echo 'export RUBY_HEAP_SLOTS_INCREMENT=1000000' >> ~/.bash_profile | |
echo 'export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1' >> ~/.bash_profile | |
echo 'export RUBY_GC_MALLOC_LIMIT=1000000000' >> ~/.bash_profile | |
echo 'export RUBY_HEAP_FREE_MIN=500000' >> ~/.bash_profile | |
apt-get install libtcmalloc-minimal0 | |
echo 'export LD_PRELOAD=/usr/lib64/libtcmalloc_minimal.so.0.1.0' >> ~/.bash_profile | |
source ~/.bash_profile | |
echo 'Installing ruby 1.9.3-perf with falcon patch' | |
rvm get head | |
rvm install 1.9.3-perf --patch falcon | |
rvm use 1.9.3-perf --default | |
rvm use 1.9.3-perf@global | |
echo 'Installing rails' | |
gem install rails --no-rdoc --no-ri | |
echo 'Installing bundler' | |
gem install bundler --no-rdoc --no-ri | |
echo 'Creating ~/.gemrc' | |
echo "install: --no-rdoc --no-ri" >> ~/.gemrc | |
echo "update: --no-rdoc --no-ri" >> ~/.gemrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment