Skip to content

Instantly share code, notes, and snippets.

@gongzili456
Last active March 19, 2019 06:28
Show Gist options
  • Save gongzili456/0125a6d976f8336a949e8c00365db82e to your computer and use it in GitHub Desktop.
Save gongzili456/0125a6d976f8336a949e8c00365db82e to your computer and use it in GitHub Desktop.
init-node-env-on-ubuntu.sh
#/bash/sh
# 1. install node.js
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
# 2. install nginx
sudo apt-get install nginx -y
# 3. install git
sudo apt install git -y
# 4. install pm2
sudo npm install -g pm2
# 5. chown dir /srv
sudo chown -R ubuntu:root /srv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment