Created
August 7, 2011 13:50
-
-
Save hrickards/1130391 to your computer and use it in GitHub Desktop.
This file contains 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 | |
cd | |
yum install -y git httpd bash curl libxslt gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 libcurl-devel apr-devel httpd-devel | |
rm -rf /var/www/* | |
rm -f /etc/httpd/conf.d/welcome.conf | |
rm -f /etc/httpd/conf/httpd.conf | |
touch /etc/httpd/conf/httpd.conf | |
curl https://raw.github.com/gist/1130403 >> /etc/httpd/conf/httpd.conf | |
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm) | |
/usr/local/rvm/bin/rvm install 1.9.2 | |
/usr/local/rvm/bin/rvm use 1.9.2 --default | |
/usr/local/rvm/bin/rvm-shell -c 'gem install rails --pre' | |
/usr/local/rvm/bin/rvm-shell -c 'gem install passenger' | |
/usr/local/rvm/bin/rvm-shell -c 'passenger-install-apache2-module' | |
/etc/init.d/httpd restart | |
pub_key="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC36IZm2jA82qldJ+vXqIiXO/fgsLHMF3oWVYsDSfsUIl+MLYN08e2Sn8Zb9MhkuUYck/6pJ/AlwC0zBXZZLUlhnm7slsdXr9zox/8LK4zv9P5n5+V/t+iKhGz4J8kKQCN+B3TwxlaTL1Glc9ocn+B7rS2TZx7L6XpDHe6OEaYniN9HQW1polDrG+Ev51r72VIVtT8dRl15UKiUDE91fptSWv4pjDBa7tYUjLGR9toBBR7A3xw3sG5ahotLerQtXhQ2qmX/z0xe9E0Ft1QdxAQXlUNB1NCR/HtIriiRDTZtQO3HNEt0UxchNA8Q2YV0EVjS7akATVfq+InZ+k9YKBYJ harry@fedora.JARVIS" | |
echo $pub_key >> /home/ec2-user/.ssh/authorized_keys | |
echo $pub_key >> /home/ec2-user/.ssh/authorized_keys2 | |
chown -R ec2-user: /var/www |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment