Skip to content

Instantly share code, notes, and snippets.

@kharmabum
Last active December 20, 2015 15:19
Show Gist options
  • Save kharmabum/6153512 to your computer and use it in GitHub Desktop.
Save kharmabum/6153512 to your computer and use it in GitHub Desktop.
setup new ec2 ubuntu instance

ec2 ubuntu setup

become god

sudo su

enable multiverse and universe - http://goo.gl/73C8sq

vim /etc/apt/sources.list

upgrade installers, package managers

apt-get update
apt-get -y upgrade

install ec2 cli tools - http://goo.gl/b42hAv

apt-get install ec2-api-tools

install node

apt-get install gcc 
apt-get install g++
apt-get install make 
apt-get install openssl 
apt-get install git 
git clone git://github.com/joyent/node.git 
cd node

target select node version - http://nodejs.org/

git tag -l
git checkout v0.XX.XX
./configure
make
make install

zsh

apt-get update && apt-get install zsh

oh-my-zsh

wget –no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O – | sh

set zsh as default shell for all users

exit 
sudo vim /etc/passwd
exit

get and edit ~/.zshrc

cd ~    
wget --output-document .zshrc http://goo.gl/mkfXZE
export EC2_KEYPAIR=<your keypair name> # name only, not the file name
export EC2_URL=https://ec2.<your ec2 region>.amazonaws.com
export EC2_PRIVATE_KEY=$HOME/<where your private key is>/pk-XXXXXXXXXXXXXXXXXXXXXXXXXXXX.pem
export EC2_CERT=$HOME/<where your certificate is>/cert-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.pem
export JAVA_HOME=/usr/lib/jvm/java-6-openjdk/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment