Skip to content

Instantly share code, notes, and snippets.

@rkjha
Last active September 25, 2015 15:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rkjha/3e315723bac65f87364a to your computer and use it in GitHub Desktop.
Save rkjha/3e315723bac65f87364a to your computer and use it in GitHub Desktop.
Basic server setup for deploying static websites
## Basic VPS Setup for deploying static sites
## Server OS : Ubuntu 14.04 LTS 64 bit
## Author: Ramesh Jha (ramesh[at]rameshjha.com),(http://blog.sudobits.com)
## License: MIT
#### SSH into the server `ssh root@IP_ADDRESS`
### 1. Update system packages
apt-get -y update
apt-get -y upgrade
### 2. For apt-add
apt-get install python-software-properties
### 3. Create a deployment user
adduser example_user --ingroup sudo
### 4. Install server (nginx)
apt-add-repository -y ppa:nginx/stable
apt-get -y update
apt-get -y install nginx git-core
#### Logout from the remote server (exit)
#### and setup ssh authentication
### Upload ssh key [dev machine]
### run `ssh-keygen`command to generate a ssh key if you don't already have one
ssh-copy-id example_user@IP_ADDRESS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment