Skip to content

Instantly share code, notes, and snippets.

@ychin
Last active August 29, 2015 14:18
Show Gist options
  • Save ychin/8d5beb0f1b197b7701ee to your computer and use it in GitHub Desktop.
Save ychin/8d5beb0f1b197b7701ee to your computer and use it in GitHub Desktop.
Initialize and set up a new Amazon EC2 instance to have Node.js installed and ready to go
# Run this in a bash environment in an Amazon Linux instance
sudo yum -y update
sudo yum install gcc-c++ make
sudo yum install openssl-devel
sudo yum install git
mkdir libs
pushd libs
git clone https://github.com/joyent/node.git
git clone https://github.com/npm/npm.git
pushd node
./configure
make
sudo make install
popd
# This makes sure node will be found under sudo
echo "Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin">>/etc/sudoers
pushd npm
./configure
sudo make install
popd
popd
sudo npm install express -g
sudo npm install forever -g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment