Last active
June 20, 2018 10:14
-
-
Save muhammadghazali/2f27f33f5805f400233d912434a79063 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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 |
This file contains hidden or 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
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to use: