SlideShare a Scribd company logo
Beautiful accounting software
Building your own
LEMP stack on
AWS
Steven Cooper
@developersteve
717,000+
global subscribers
AWS servers
LEMP vs LAMP
Linux
NGINX vs APACHE
MySQL
PHP/Python/Pearl…
The Instance
Amazon Free Tier
Create an Ubuntu instance
Generate key pair
Chmod 600 {keypair name}
Open Ports
The public URL
The command line
Terminal
Putty
https://linuxacademy.com/blog/linux/connect-to-
amazon-ec2-using-putty-private-key-on-
Connect to the instance
Open port 22 on any local firewalls
ssh –I {keypair} ubuntu@{url of instance}
Server Build
Some basics
Sudo –I for root or use sudo [command]
/var/logs for most debugging
mkdir /var/www/
Change root password – passwd root
APT-GET
APT-GET Update, APT-GET upgrade, APT-
GET Install
APT-GET install git
APT-GET install VIM
APT-GET remove UFW
NGINX /etc/nginx/
APT-GET install Nginx
vi /etc/nginx/sites-enabled/default
i
Change root to /var/www/
Escape then :wq
Service nginx restart
PHP /etc/php/
APT-GET install php7.0
Add-apt-repository ppa:ondrej/php
Apt-get update
apt-get install php7.0 php7.0-cli php7.0-fpm
NGINX PHP template
MYSQL
APT-GET install mysql-server
mysql –u root –p
Create database dev1;
GRANT ALL PRIVILEGES ON dev1.* TO
"devuser"@"localhost" IDENTIFIED BY
"password";
Flush Privileges;
Exit
Swap Space
dd if=/dev/zero of=/var/swap bs=1M
count=2048
mkswap /var/swap
swapon /var/swap
Vi fstab and add
/var/swap swap swap defaults 0 0
SSL
Open port 443
https://certbot.eff.org
Performance
Blitz.io load testing
New Relic
UpDown
And if there's time
DNS
bind9
Email
Postfix and Dovecot
https://linode.com/docs/email/postfix/email-with-postfix-dovecot-and-
mysql
“The three most dangerous things in
the world are a programmer with a
soldering iron, a hardware type with a
program patch and a user with an
idea.”
Rick Cook - The Wizardry Consulted
Beautiful accounting software
www.xero.com

More Related Content

PPTX
Cluster Computing for $0.27/hr using Amazon EC2 and IPython Notebook
PPTX
Cloudera amazon-ec2
ODP
Forget MAMP and WAMP, Use Virtual Box to Have a Real Ubuntu Server
PDF
Jones_Lamp_Tutorial
PPTX
Hadoop presentation
PDF
Talk about Ansible and Infrastructure as Code
PPT
How To Deploy A Cloud Based Webserver in 5 minutes - LAMP
PDF
Installing Tomcat on Ubuntu Instance
Cluster Computing for $0.27/hr using Amazon EC2 and IPython Notebook
Cloudera amazon-ec2
Forget MAMP and WAMP, Use Virtual Box to Have a Real Ubuntu Server
Jones_Lamp_Tutorial
Hadoop presentation
Talk about Ansible and Infrastructure as Code
How To Deploy A Cloud Based Webserver in 5 minutes - LAMP
Installing Tomcat on Ubuntu Instance

What's hot (20)

PDF
Installation of LAMP Server with Ubuntu 14.10 Server Edition
PPTX
Hadoop presentation
PPTX
Introduction To Programming in GNU-LINUX
PDF
Composer Tutorial (PHP Hampshire Sept 2013)
PDF
WordPress Security - A Top Down Approach
PPTX
Effective ansible
PDF
Aeon mike guide transparent ssl filtering
PDF
Aeon mike guide transparent ssl filtering (1)
DOCX
How to install and configure LEMP stack
PDF
How to turn any dynamic website into a static site | 24.01.2018 | Artem Danil...
PPTX
Linux for programmers
PPS
Squidinstallation
TXT
PDF
Using filesystem capabilities with rsync
ODP
Capifony. Minsk PHP MeetUp #11
PDF
Plesk CLI Wrapper
PDF
Caching for Cash: Benchmarking and Profiling
PPT
Your own minecraft server on a linode vps
PPT
Nuxeo5 - Continuous Integration
PDF
Caching for Cash: Caching
Installation of LAMP Server with Ubuntu 14.10 Server Edition
Hadoop presentation
Introduction To Programming in GNU-LINUX
Composer Tutorial (PHP Hampshire Sept 2013)
WordPress Security - A Top Down Approach
Effective ansible
Aeon mike guide transparent ssl filtering
Aeon mike guide transparent ssl filtering (1)
How to install and configure LEMP stack
How to turn any dynamic website into a static site | 24.01.2018 | Artem Danil...
Linux for programmers
Squidinstallation
Using filesystem capabilities with rsync
Capifony. Minsk PHP MeetUp #11
Plesk CLI Wrapper
Caching for Cash: Benchmarking and Profiling
Your own minecraft server on a linode vps
Nuxeo5 - Continuous Integration
Caching for Cash: Caching
Ad

Viewers also liked (20)

PPTX
Timo Sirainen - Dovecot Story - Mindtrek 2016
PPTX
Epicenter: Powering Performance & Productivity – Dr. James A. Goenner & Jason...
PPTX
Building the future as a full stack dev
PPTX
PHP Australia
PPTX
Holiday in romania
PPTX
SydPHP Presentation
PDF
Betume tomo i
PDF
PPTX
The Wizardry of Braintree hosted fields - PHP
PPTX
Bootstrapping Startup
PPTX
Drupal South - IoT Commerce
PPTX
Have you been vaccinated
PPTX
Have you been vaccinated
PDF
Commerce of Things 2015
PDF
Capitulo6
PDF
Real time control and communication ( Robots , Machines , IOT )
PPTX
Machines for accounting records
PPTX
PHPConf.Asia - The Sound of PHP
PDF
Execucoes fiscais
PDF
Rtp webinar-verifone-final deck-fv
Timo Sirainen - Dovecot Story - Mindtrek 2016
Epicenter: Powering Performance & Productivity – Dr. James A. Goenner & Jason...
Building the future as a full stack dev
PHP Australia
Holiday in romania
SydPHP Presentation
Betume tomo i
The Wizardry of Braintree hosted fields - PHP
Bootstrapping Startup
Drupal South - IoT Commerce
Have you been vaccinated
Have you been vaccinated
Commerce of Things 2015
Capitulo6
Real time control and communication ( Robots , Machines , IOT )
Machines for accounting records
PHPConf.Asia - The Sound of PHP
Execucoes fiscais
Rtp webinar-verifone-final deck-fv
Ad

Similar to Compcon 2016 Workshop (20)

PDF
Installing Lamp Stack on Ubuntu Instance
PDF
One-Man Ops
PDF
Automation day red hat ansible
PDF
Automação do físico ao NetSecDevOps
PPTX
PPTX
How to Install LAMP in Ubuntu 14.04
PPTX
Installaling Puppet Master and Agent
PDF
AMIMOTO: WordPress + Amazon Web Services MANILA
PDF
L.A.M.P Installation Note --- CentOS 6.5
PDF
AMIMOTO: WordPress + Amazon Web Services University of the Philippines Los Baños
PPT
Tame Your Build And Deployment Process With Hudson, PHPUnit, and SSH
PPTX
Journey to Microservice architecture via Amazon Lambda
PDF
Ansible new paradigms for orchestration
PDF
Making Spinnaker Go @ Stitch Fix
PPTX
Baylisa - Dive Into OpenStack
ODP
Itb session v_memcached
PDF
AMIMOTO: WordPress + Amazon Web Services Hands-on WARSAW
PDF
WordPress + Amazon Web Services Hands-on WARSAW
PPTX
Java App On Digital Ocean: Deploying With Gitlab CI/CD
PDF
WordPress Home Server with Raspberry Pi
Installing Lamp Stack on Ubuntu Instance
One-Man Ops
Automation day red hat ansible
Automação do físico ao NetSecDevOps
How to Install LAMP in Ubuntu 14.04
Installaling Puppet Master and Agent
AMIMOTO: WordPress + Amazon Web Services MANILA
L.A.M.P Installation Note --- CentOS 6.5
AMIMOTO: WordPress + Amazon Web Services University of the Philippines Los Baños
Tame Your Build And Deployment Process With Hudson, PHPUnit, and SSH
Journey to Microservice architecture via Amazon Lambda
Ansible new paradigms for orchestration
Making Spinnaker Go @ Stitch Fix
Baylisa - Dive Into OpenStack
Itb session v_memcached
AMIMOTO: WordPress + Amazon Web Services Hands-on WARSAW
WordPress + Amazon Web Services Hands-on WARSAW
Java App On Digital Ocean: Deploying With Gitlab CI/CD
WordPress Home Server with Raspberry Pi

More from Steven Cooper (20)

PPTX
Scaling the Stack and Yourself with it
PPTX
All a flutter about Flutter.io
PPTX
APIDays Australia - Openresty for scale
PPTX
The Robot and the Cloud
PPTX
Textual Interface - the rise of the chatbot
PPTX
Unihack2016 opening
PPTX
Unihack2016 closing
PPTX
IoT Commerce using Ruby, PHP and Arduino
PPTX
Time Travelling E-Commerce
PPTX
The PayPal Here symphony
PPTX
Holographic Payments
PPTX
MongoDB - The database strikes back
PPTX
E-Commerce Melbourne
PPTX
APIDays Sydney
PPTX
BattleHack Melbourne
PPTX
IoTMelb
PPTX
Wordcamp Sydney 2014
PPTX
The Emergence of IoT and How its Reshaping How We Interact With The Digital W...
PPTX
Android V.Zero
PPTX
Zero to Online Cafe in 20 minutes
Scaling the Stack and Yourself with it
All a flutter about Flutter.io
APIDays Australia - Openresty for scale
The Robot and the Cloud
Textual Interface - the rise of the chatbot
Unihack2016 opening
Unihack2016 closing
IoT Commerce using Ruby, PHP and Arduino
Time Travelling E-Commerce
The PayPal Here symphony
Holographic Payments
MongoDB - The database strikes back
E-Commerce Melbourne
APIDays Sydney
BattleHack Melbourne
IoTMelb
Wordcamp Sydney 2014
The Emergence of IoT and How its Reshaping How We Interact With The Digital W...
Android V.Zero
Zero to Online Cafe in 20 minutes

Recently uploaded (20)

PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Empathic Computing: Creating Shared Understanding
PDF
Encapsulation theory and applications.pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPT
Teaching material agriculture food technology
PPTX
Big Data Technologies - Introduction.pptx
PPTX
A Presentation on Artificial Intelligence
PDF
Approach and Philosophy of On baking technology
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
DOCX
The AUB Centre for AI in Media Proposal.docx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
KodekX | Application Modernization Development
20250228 LYD VKU AI Blended-Learning.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Network Security Unit 5.pdf for BCA BBA.
Empathic Computing: Creating Shared Understanding
Encapsulation theory and applications.pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Mobile App Security Testing_ A Comprehensive Guide.pdf
Teaching material agriculture food technology
Big Data Technologies - Introduction.pptx
A Presentation on Artificial Intelligence
Approach and Philosophy of On baking technology
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Spectral efficient network and resource selection model in 5G networks
CIFDAQ's Market Insight: SEC Turns Pro Crypto
The AUB Centre for AI in Media Proposal.docx
“AI and Expert System Decision Support & Business Intelligence Systems”
KodekX | Application Modernization Development

Compcon 2016 Workshop

Editor's Notes

  • #3: Need fun bio
  • #4: You think about that thought, that’s not just single users that businesses with not only multiple users but doing all the things to run businesses that employ people. 1 trillion transactions $31K per second
  • #14: Chmod 600 keypair
  • #19: https://linuxacademy.com/blog/linux/connect-to-amazon-ec2-using-putty-private-key-on-windows/
  • #24: Put a index.html into var/www
  • #26: Put a index.html into var/www
  • #38: Get the server whitelisted