sysadmin

Installing Git on a Shared Host

Git is a fantastic tool and is very useful for deployment. If you can't install git system wide or don't want to mess with installing it on the entire system here is an easy way to install it for a single user. This also works well on Mac OS X where installing git is more challenging than necessary. Script included

I used this script to install git on 1and1. The same script should work anywhere with no or little modification.

Preparation

Goto http://git-scm.com/download and get the link to the latest git release.

Script

You should be able to just copy and paste this (replacing the link with the one from git-scm.com)

Running Multiple MemCache Instances

There are plenty of reasons to want to run multiple instances of memcache on the same box. We use it to have multiple testing enviroments on the same cluster. By running different instances on different ports we can safely test without collisions. These directions are written for centOS, but could be easily applied to other distributions.

Scaling Web Sites (LAMP) : Top Resources

Luckily it’s 2009 and there have been a bunch of successful websites that have had to deal with large scalability challenges. Many have been kind enough to share their knowledge with the world. Here is a list of the best books, articles, presentations and practices from the likes of Twitter, Facebook, Flickr and more.

Backup Your Files

Microsoft Baseline Security Analyzer

Image via Wikipedia

One of the worst experiences you can have as a computer operator is to realize you (or something else) just did something and wiped out your files. The purpose of this article is to show you how to automatically backup your files often and automatically. I use this setup to backup my documents every hour (I save more often then that). This gives me hourly versions of all my files I am working on. It even protects me from accidentally saving over an important document (at least to the last hour).

 Install Rsync-incr

You could do everything you need with Rsync... but our goal here is easy and automatic. Rsync-incr is a nice shell script that uses Rsync to do incremental backups, surrounding it with an easy interface. Win Win.. The stability of Rsync, with an easy to use interface.

Secure, Automated, Key based SSH

Keychain

Image via Wikipedia

SSH is great and secure… Unless you need to automate it. Then it sucks because your only options are to create a passwordless key, or login add your key to ssh-agent, stay logged in forever. Here’s a quick guide to having the best of both worlds. A Secure SSH Connection that can be used in automated scripts. ( with the single catch, that upon reboot you need to re-enter your key’s password )

Backing up MySQL

MySQL

Image via Wikipedia

I don't know very many people that haven't been devastated by the loss of data... Yet I am baffled that millions of professional IT workers still ignore backing up their data. Since computers are great at doing repetitive things like backups.. why not spend 20 minutes setting up your machine to backup your files for you. This guide will be specific to mysql to create a local copy of the backup. Then read my other guide about copying files securely to a remote backup server for the 2nd part.