Skip to content

Instantly share code, notes, and snippets.

@artakvg
Created September 13, 2015 13:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save artakvg/6bcda752f59492ea3a62 to your computer and use it in GitHub Desktop.
Save artakvg/6bcda752f59492ea3a62 to your computer and use it in GitHub Desktop.
#!/bin/bash
nodeVersion="v4.0.0"
## install libs
sudo apt-get -y update
sudo apt-get -y install build-essential
sudo apt-get -y install libssl-dev
sudo apt-get -y install libkrb5-dev
sudo apt-get -y install git
sudo apt-get -y install authbind
sudo touch /etc/authbind/byport/80
sudo "$USER" chown /etc/authbind/byport/80
sudo chmod 755 /etc/authbind/byport/80
## nvm install
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.26.1/install.sh | bash
source ~/.profile
source ~/.bashrc
source ~/.nvm/nvm.sh
nvm install "$nodeVersion"
nvm alias default "$nodeVersion"
npm install -g node-gyp
npm install -g gulp
npm install -g bower
npm install -g shipit-cli
npm install -g flightplan
npm install -g pm2
sudo su -c "env PATH=$PATH:/home/$USER/.nvm/versions/node/$nodeVersion/bin pm2 startup ubuntu -u $USER"
authbind --deep pm2 update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment