Skip to content

Instantly share code, notes, and snippets.

@haohcraft
Last active August 29, 2015 14:23
Show Gist options
  • Save haohcraft/6a7c576bd366bd7802a4 to your computer and use it in GitHub Desktop.
Save haohcraft/6a7c576bd366bd7802a4 to your computer and use it in GitHub Desktop.
Server Setup Basic

####Create a New User

  1. add adduser hao
  2. set root privilege gpasswd -a hao sudo
  3. switch user su - root

####Add pulic key ssh-keygen

####Install g++ sudo apt-get install build-essential g++ ####Install NVM/nodeJS

  1. curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash
  2. nvm instal xx.xx

####git/NPM/nginx

sudo apt-get update
sudo apt-get install git
sudo apt-get install nginx

>Setup Git
git config --global user.name "Your Name"
git config --global user.email "youremail@domain.com"

sudo npm install npm -g

####Manage Nginx

sudo service nginx stop
sudo service nginx start
sudo service nginx restart

####Create a SWAP file to allocate memory https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-12-04

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