Upload
jonathan-perlman
View
365
Download
1
Tags:
Embed Size (px)
DESCRIPTION
This WordCamp Montreal 2014 talk is about things to know and think about when leaving shared hosting
Citation preview
Jonathan Perlman
August 17, 2014
Montreal, Quebec
@jpurpleman
http://purpleman.org/wcmtl
@
+ 10 years asa web developerat Dawson College
+ 6 years teachingthe World Wide Weband Microsoft Office
+ 4 years using and learning WordPress
I’m not a Linux network administrator
I’m not a security expert
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Image credit: alexidagher.com
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Image credit: office.com
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Image credit: commons.wikimedia.org
Restrictions
Software limitations
Can’t modify configurations
Resources
CPU intense
Noisy neighbors
Reliability
Downtime
Lack of support
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Image credit: flickr (roger4336 )
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
UnmanagedManaged
Image credit: commons.wikimedia.org Image credit: flickr (retropc )
Managed
Shared hosting for WordPress
Support knows WordPress
Relevantly easy and hands off
Costly in $$$
Unmanaged
Learning curve
Very DIY
“ Painful “
Costly in time
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
WPEngine http://wpengine.com
WebSynthesis http://websynthesis.com
Flywheel http://getflywheel.com
Page.ly https://pagely.com
Pressable http://pressable.com
SiteGround http://siteground.com
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Digital Ocean http://www.digitalocean.com
Linode https://www.linode.com
Media Templehttp://mediatemple.net/webhosting/
vps/developer/
Site5 http://www.site5.com
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Image credit: commons.wikimedia.org
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
RAM CPUDisk
Space
Image credit: commons.wikimedia.org
purpleman.org
• Photo clients
• Personal use
• Ram: 1 Gig
• CPU: 1 Core
• Disk: 30 Gigs
snookercanada.ca
• Snooker players
• Media relations
• Ram: 2 Gigs
• CPU: 2 Cores
• Disk: 40 Gigs
dawsoncollege.qc.ca
• + 10,000 students
• + 1,000 faculty / staff
• Ram: 16 Gigs
• CPU: 4 Core
• Disk: 128 Gigs
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
DNS
Linux Web
PHP Db
CloudFlare
https://www.cloudflare.com
Easydns
https://www.easydns.com
DNS with domain or hosting provider
Local “Hosts” file
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Stable
CentOS 7
Supported till 2024
Bleeding edge
Ubuntu 14.04 LTS
Supported till 2019
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
cPanel
www.cpanel.net
Parallels Plesk
sp.parallels.com/
products/plesk/
ZPanel
www.zpanelcp.com
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Text Editor
vi / nano
File System
cd & ls
cp & mv & rm
mkdir
Permissions
chmod & chown
Process Management
ps & top
Kill
http://www.ee.surrey.ac.uk/Teaching/Unix/
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Stan Lee
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Image credit: sapienstoonz.deviantart.com
All powerful server administrator
Terminal Root User = WordPress Admin User
Constantly targeted and attacked
New servers are under attack in hours
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Change it’s password
Make it a super secure password!
Deny Root from remote login
Create a non-admin user account
Assign admin rights with VISUDO
https://www.digitalocean.com/community/tutorials/initial-server-setup-with-centos-6
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Generating keys
http://kb.siteground.com/how_to_generate_an_ssh_key_on_windows_using_putty/
http://coolestguidesontheplanet.com/make-passwordless-ssh-connection-osx-10-9-
mavericks-linux/
Set up keys on the server Login via SSH keys
https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Block everything
Allow specific ports from specific IPs
22 – SSH
80 – Web
443 – Secure Web
3306 – MySql
Allowing for dynamic IPs
Use hit count rules
https://github.com/jpurpleman/linux
http://cyberciti.biz/tips/linux-iptables-examples.html
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Image credit: support.Microsoft.com
yum update for CentOS
apt-get update for Ubuntu
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Image credit: commons.wikimedia.org
Apache or Nginx
Use virtual hosting for multiple domains
Create development domains
.htaccess is off by default in Apache
Change “AllowOverride” to All
https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-centos-6
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
php.ini
allow_url_fopen
session.gc_maxlifetime
disable_functions
display_errors
post_max_size
memory_limit
max_execution_time
upload_max_filesize
.htaccess
php_value
upload_max_filesize
10M
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
http://php.net/manual/en/ini.list.php
MySql or MariaDB
Setup steps
Set a secure root user
Remove test database
Create web user with limited access
Create yourself a user with full access
https://www.digitalocean.com/community/tutorials/a-basic-mysql-tutorial
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Download and extract
Create the database
and a user
Set up wp-config.php
Run the install script
http://codex.wordpress.org/
Installing_WordPress
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
http://codex.wordpress.org/
Hardening_WordPress
http://codex.wordpress.org/
Changing_File_Permissions
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Home directory
Root home directory
Configuration directory
Web files
Database
Automysqlbackuphttp://sourceforge.net/projects/automysqlbackup/
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Image credit: memofixdatarecovery.com
http://aws.amazon.com/backup-storage
http://mozy.com/product/solutions/
server-backup
https://www.jungledisk.com/
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Google Apps for Business
http://www.rackspace.com/email-hosting/
https://www.fastmail.fm
https://www.zoho.com/mail
https://www.pobox.com/
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Uptime Robot
Pingdom
New Relic
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Image credit: opmlink.com
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Get a virtual private server – call it professional development
Set it up
Play around – learn!
Edit your hosts file and point your domain to the server
Create a development WordPress site
Setup your WordPress site
Create a production WordPress site
Change the DNS!
You’re live!
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Setting up and configuring SSL
2 Servers - Web & MySQL
Varnish / Memcache for caching
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
https://www.digitalocean.com/community/
https://www.linode.com/docs
http://www.youtube.com/user/TJsWebDev/
http://www.cyberciti.biz
http://www.rosehosting.com/blog
http://www.servermom.org
http://www.tecmint.com
http://webchat.freenode.net/?channels=digitalocean&uio=d4
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
Mike Johnson.http://gdargaud.net/Humor/QuotesHardwareSoftware.html
Jonathan Perlman - WordCamp Montreal 2014 August 17, 2014
August 17, 2014Jonathan Perlman - WordCamp Montreal 2014
Questions
Thank you!
Jonathan Perlman
August 17, 2014
Montreal, Quebec
@jpurpleman
http://purpleman.org/wcmtl
@