Skip to content

Instantly share code, notes, and snippets.

@muhammadghazali
Last active June 20, 2018 10:14
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 muhammadghazali/2f27f33f5805f400233d912434a79063 to your computer and use it in GitHub Desktop.
Save muhammadghazali/2f27f33f5805f400233d912434a79063 to your computer and use it in GitHub Desktop.
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get update
sudo apt-get install -y nodejs build-essential gcc g++ make
# fixing npm permissions
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
# use the NPM_CONFIG_PREFIX=~/.npm-global if you don't want to modify the .bashrc
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
#!/usr/bin/env bash
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get update
sudo apt-get install -y nodejs build-essential gcc g++ make
# fixing npm permissions
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
# use the NPM_CONFIG_PREFIX=~/.npm-global if you don't want to modify the .bashrc
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
npm install -g pm2
# setup nginx
sudo apt-get install -y nginx
sudo ufw allow 'Nginx Full'
sudo ufw allow 'OpenSSH'
sudo ufw enable
# configure locale https://stackoverflow.com/questions/26337557/badvalue-invalid-or-no-user-locale-set-please-ensure-lang-and-or-lc-environme
sudo locale-gen en_US.UTF-8
@muhammadghazali
Copy link
Author

How to use:

bash setup.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment