Skip to content

Instantly share code, notes, and snippets.

@douglascorrea
Last active August 29, 2015 14:11
Show Gist options
  • Save douglascorrea/83d91bbb8f38e143a067 to your computer and use it in GitHub Desktop.
Save douglascorrea/83d91bbb8f38e143a067 to your computer and use it in GitHub Desktop.
Installing NodeJS on EC2 instances on Amazon AWS
# Connect to EC2
ssh -i key.pem ec2-user@ec2-198-51-100-1.compute-1.amazonaws.com
# Update, install the compiler and git
sudo yum update
sudo yum install gcc-c++ make
sudo yum install openssl-devel
sudo yum install git
# install nodejs
git clone git://github.com/joyent/node.git
cd node
git checkout v0.10.33
./configure
make
sudo make install
# Add node to sudo’s path
sudo su
nano /etc/sudoers
# Add :/usr/local/bin to the end of this line:
# Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin
# ctrl + x and save
exit
# Install NPM
cd
git clone https://github.com/isaacs/npm.git
cd npm
git checkout v2.1.11
sudo make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment