Last active
August 29, 2015 14:05
-
-
Save donaldparker/0902c451896cfa96d556 to your computer and use it in GitHub Desktop.
AWS install MEAN + socket.io
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
aws install MEAN | |
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html | |
#makesure you are in the directory with .pem file downloaded from ec2 console | |
ssh -i myec2access.pem ec2-user@URL.compute.amazonaws.com | |
sudo yum install gcc-c++ | |
sudo yum install openssl-devel | |
sudo yum install git | |
git clone git://github.com/joyent/node.git | |
cd node | |
export JOBS=2 | |
./configure | |
make | |
sudo make install | |
sudo nano /etc/sudoers #Find and edit the line “Defaults secure_path …” and add “:/usr/local/bin” to the end of the path | |
#i think i may have installed twice | |
curl -O -L https://npmjs.org/install.sh | sudo sh | |
cd .. | |
git clone git://github.com/isaacs/npm.git | |
cd npm | |
sudo make install | |
#verify | |
node -v | |
npm -v | |
#before install https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo-linux.md | |
#if perfomed above add symlink to bower once installed | |
#install global packages | |
sudo npm install -g grunt-cli express bower | |
#install mongo & mongod | |
sudo nano /etc/yum.repos.d/10gen.repo | |
#add to file | |
[10gen] | |
name=10gen Repository | |
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64 | |
gpgcheck=0 | |
#save and quit | |
sudo yum install mongo-10gen-server mongo-10gen | |
sudo mkdir -p /data/db/ | |
#verify | |
sudo mongod —help | |
#port forwarding for one site | |
sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080 | |
#OR | |
sudo yum install nginx #read more here https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-12-04-lts-precise-pangolin | |
#config node sites https://www.digitalocean.com/community/tutorials/how-to-host-multiple-node-js-applications-on-a-single-vps-with-nginx-forever-and-crontab |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment