Skip to content

Instantly share code, notes, and snippets.

@jmolivas
Last active January 7, 2017 21:02
Show Gist options
  • Save jmolivas/3de754462f6a425239455e9ad347beb3 to your computer and use it in GitHub Desktop.
Save jmolivas/3de754462f6a425239455e9ad347beb3 to your computer and use it in GitHub Desktop.

Digital Ocean server setup

Install Droplet

Default D8 Image

Update php 5.6

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install php5.6 php5.6-fpm php5.6-xml php5.6-curl php5.6-gd php5.6-mbstring php5.6-mysql

Add user

https://www.digitalocean.com/community/tutorials/how-to-create-a-sudo-user-on-ubuntu-quickstart

adduser deploy 
usermod -aG sudo deploy
usermod -aG www-data deploy

Password-less How To Set Up SSH Keys

https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2

cat ~/.ssh/id_rsa.pub | ssh deploy@IP_ADDRESS "mkdir -p ~/.ssh && cat >>  ~/.ssh/authorized_keys"

Generate ssh_keys and add to private repo

Clone repo to add keys

git clone git@REPO_URL.git

Install composer

https://www.digitalocean.com/community/tutorials/how-to-install-and-use-composer-on-ubuntu-14-04

curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
sudo chmod +x /usr/local/bin/composer

Install git

https://www.digitalocean.com/community/tutorials/how-to-install-git-on-ubuntu-14-04

sudo apt-get update
sudo apt-get install git

Change directory ownership

sudo chown -R deploy:www-data /var/www/html

Other commands

sudo apt-get install tree

Nginx

https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-14-04-lts

Mysql pass

https://www.digitalocean.com/community/questions/default-mysql-password

cat /root/.my.cnf

How To Create a New User and Grant Permissions in MySQL

https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql

How To Set Up Basic HTTP Authentication With Nginx on Ubuntu 14.04

https://www.digitalocean.com/community/tutorials/how-to-set-up-basic-http-authentication-with-nginx-on-ubuntu-14-04

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