Last active
August 29, 2015 14:18
-
-
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
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
# 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