Created
June 9, 2013 10:10
-
-
Save mikechau/5743033 to your computer and use it in GitHub Desktop.
Amazon EC2 + Sinatra Application Deployment
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
## connecting | |
sudo chmod 0600 ~/Downloads/sandbox.pem | |
ssh -i ~/Downloads/sandbox.pem [email protected] | |
## create users | |
sudo adduser mike | |
## add user to admin | |
sudo adduser mike admin | |
## switch user | |
sudo su mike | |
## show sudo | |
cat /etc/sudoers | |
## security | |
mkdir ~/.ssh | |
touch authorized_keys | |
## get personal pub key from local machine | |
cat ~/.ssh/id_rsa.pub | |
## paste pub key into authorized_keys | |
vim authorized_keys | |
-> paste, save, exit | |
## ssh into machine, dont need to paste name if same as local machine | |
ssh ec2-23-22-18-249.compute-1.amazonaws.com | |
## install ruby -> remember to update first | |
sudo apt-get install ruby1.9.1-dev | |
ls -la /usr/bin | grep ruby |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment