post

S3 Backup options: s3sync & duplicity

s3sync
http://s3sync.net/wiki
a ruby rsync command line tool, that mirrors folders on S3.

* S3 directories readable by any S3 browser (including standard HTTP calls)
* Bandwidth heavy; non encrypted

HOWTO; http://blog.eberly.org/2006/10/09/how-automate-your-backup-to-amazon-s3-…

Duplicity
http://duplicity.nongnu.org/index.html
GNU tar style backup tool, with many backing stores (SCP, FTP, S3).

* Fast, bandwidth efficient deltas
* Encrypted

post

HOWTO: Subversion + SSH/SVN, TortoiseSVN

Here is a great HOWTO on connecting to Subversion via ssh+svn:// using TortoiseSVN.

http://tortoisesvn.net/ssh_howto

Some additional tips:

  • Make sure you change file permissions of the svn respository folder so that the SSH user you are using has full RW access
post

HOWTO: Symfony 1.0.8 with Nginx on Ubunty Feisty VPS

Get Symfony


# pear channel-discover pear.symfony-project.com
# pear install symfony/symfony

Using the command:

# pear config-show

we find the symfony libraries have been installed in:

$php_dir/symfony/ /usr/share/php/symfony/ main libraries
$data_dir/symfony/ /usr/share/php/data/symfony/ skeleton of symfony applications, default modules and configuration
doc_dir/symfony/ /usr/share/php/docs/symfony/ documentationCreate / configure a new symfony application


# mkdir /var/www/myproject
# cd /var/www/myproject
# symfony init-project myproject
# symfony init-app myapp


# ln -s /etc/nginx/sites-available/wattprint.org /etc/nginx/sites-enabled/wattprint.org
# /etc/init.d/nginx restart

post

HOWTO: Ubuntu Server 7.0.4 on VMWare Server 1.0.4 on Windows XP

My local PHP/Symfony DEV environment is an Ubuntu Feisty Fawn server, running under VMWare on my Windows XP laptop. All the server side stuff runs on the Ubuntu VM, which mirrors the setup of my production host.

Install VMWare Server (free) from http://www.vmware.com/download/server/

This is a pretty straight forward Windows install, once you have registered and received the (free) license key via email

Your machine needs to have plenty of RAM, and a couple of gigs of free HDD space. (It works fine on my Dell Inspiron 510m, 1.6GHz, 1.25GB RAM laptop)

Install Ubuntu Feisty Fawn 7.04 VM

Download the installation CD ISO from http://www.ubuntu.com/getubuntu/download

Fire up the VMWare Server console, create a new VM. Use a NAT ethernet adapter. Make sure the VM’s CDROM points to the ISO you just downloaded.

Run through the installation proceedure, doing just the bare bones standard install. At the end, reboot, and don’t be alarmed at the crash:

Int 14: CR2 c1000000 err 00000002 EIP c03f3c3e CS 00000060 flags 00000006
Stack: 373c0046 00000000 ffffffff c0490000 00001400 00000080 00400000 ffffff80

The default server kernel won’t work with a VPC (http://www.virtualbox.org/ticket/289), so we need to install the desktop one.

* Re-Boot the server CD (NOT the server install), select recovery mode.
* Go through all the (recovery) steps ….
* Once you get to the command line :

# apt-get install linux-386
# apt-get remove linux-serverReboot, and login. Viola!

Finally, run ifconfig from the Ubuntu command line – to find the (current) IP address of the VM.

post

Optimized Nginx config file

A useful Gzip + other optimized /etc/nginx/nginx.conf file

Thanks to http://brainspl.at/articles/2007/01/03/new-nginx-conf-with-optimizations


# user and group to run as
user www-data www-data;

# number of nginx workers
worker_processes 3;

# pid of nginx master process
pid /var/run/nginx.pid;

# Number of worker connections. 1024 is a good default
events {
worker_connections 1024;
}

# start the http module where we config http access.
http {
# pull in mime-types. You can break out your config
# into as many include’s as you want to make it cleaner
include /etc/nginx/mime.types;

# set a default type for the rare situation that
# nothing matches from the mimie-type include
default_type application/octet-stream;

# configure log format
log_format main ‘$remote_addr – $remote_user [$time_local] ‘
‘”$request” $status $body_bytes_sent “$http_referer” ‘
‘”$http_user_agent” “$http_x_forwarded_for”‘;

# main access log
access_log /var/log/nginx/access.log main;

# main error log
error_log /var/log/nginx/error.log debug;

# no sendfile on OSX
sendfile on;

# These are good default values.
tcp_nopush on;
tcp_nodelay off;
# output compression saves bandwidth
gzip on;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_proxied any;
gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;

#keepalive_timeout 0;
keepalive_timeout 65;

#vhost includes
include /etc/nginx/sites-enabled/*;

}