Finishing this guide you'll get:
- A running WordPress installation
- Nginx proxy with PHP and Fast CGI
- MySQL server accessible with phpMyAdmin
Specification of latest running installation:
- Date: 03.03.2014
check process hhvm with pidfile /var/run/hhvm/pid | |
group hhvm | |
start program = "/usr/sbin/service hhvm start" with timeout 60 seconds | |
stop program = "/usr/sbin/service hhvm stop" | |
if failed unixsocket /var/run/hhvm/hhvm.sock then restart | |
if mem > 400.0 MB for 1 cycles then restart | |
if 5 restarts with 5 cycles then timeout |
user ashley; | |
worker_processes 1; | |
pid /run/nginx.pid; | |
events { | |
worker_connections 1024; | |
multi_accept on; | |
} | |
http { |
Finishing this guide you'll get:
Specification of latest running installation:
#!/bin/bash | |
## Email Variables | |
EMAILDATE=`date --date="today" +%y-%m-%d` | |
EMAIL="you@yourdomain.com" | |
SUBJECT="[servername] Backup Script Started! - "$EMAILDATE | |
EMAILMESSAGE="/tmp/emailmessage1.txt" | |
echo "Just to let you know that the backup script has started."> $EMAILMESSAGE | |
/bin/mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE |
#!/bin/sh | |
echo 'Started' | |
date +'%a %b %e %H:%M:$S %Z %Y' | |
s3cmd sync --recursive --preserve /srv s3://nameofyours3bucket | |
s3cmd sync --recursive --preserve /etc s3://nameofyours3bucket | |
s3cmd sync --recursive --preserve /home s3://nameofyours3bucket | |
s3cmd sync --recursive --preserve /var s3://nameofyours3bucket | |
dpkg --get-selections > dpkg.list | |
s3cmd sync --recursive --preserve dpkg.list s3://nameofyours3bucket | |
date +'%a %b %e %H:%M:$S %Z %Y' |
This is a simple way to backup your MySQL tables to Amazon S3 for a nightly backup - this is all to be done on your server :-)
Sister Document - Restore MySQL from Amazon S3 - read that next
this is for Centos 5.6, see http://s3tools.org/repositories for other systems like ubuntu etc
# The MySQL database server configuration file. | |
# | |
# DESC: InnoDB mainly, heavy queries, fewer connections, 4GB RAM | |
# | |
# Remember to edit /etc/mysql/debian.cnf when changing the socket location. | |
[client] | |
port = 3306 | |
socket = /var/run/mysqld/mysqld.sock | |
# This was formally known as [safe_mysqld]. Both versions are currently parsed. |
# Generated by Percona Configuration Wizard (http://tools.percona.com/) version REL5-20120208 | |
# Configuration name server-1 generated for Luke at 2014-10-22 09:47:40 | |
[mysql] | |
# CLIENT # | |
port = 3306 | |
socket = /var/lib/mysql/mysql.sock | |
[mysqld] |
# block humans.txt scans | |
# http://perishablepress.com/protect-against-humans-txt-query-string-scans/ | |
<IfModule mod_rewrite.c> | |
RewriteCond %{QUERY_STRING} http\:\/\/www\.google\.com\/humans\.txt\? [NC] | |
RewriteRule .* - [F,L] | |
</IfModule> |