linux

Apache Virtual Hosts: A Clean Setup for (PHP-)Developers

If you work on multiple Apache-based Web projects in parallel you probably know this problem: You have to set up a virtual host configuration for every single project on your development machine. It would be very nice to reduce the steps required for this to a minimum. My favorite solution:
Have a directory in your home directory containing symbolic links to your projects - where the names of the links are your local host names.

The following instructions assume you're on Debian/Ubuntu - but "translating" them to other distros or even Windows shouldn't be that hard.

Using rsnapshot for File and Database Backups

rsnapshot is my favorite tool for doing automated distributed backups on Linux machines. It saves you a lot of headaches - and it finally replaced all those hundreds of hand-made backup scripts I previously used.

rsnapshot itself is easy to use. But setting up the infrastructure for it - namely password-less ssh logins and database dumps - always requires some work. Here's how I do it.

Gentoo Kernel Update

Do you also do the same thing every time a new kernel ends up in your /usr/portage? Here's a Ruby script that does all required steps automatically for you:

  • The kernel symlink gets updated to point to the latest kernel in /usr/src/.
  • An existing .config file gets copied from the previously used kernel.
  • genkernel is used to compile the new kernel.
  • The kernel gets installed on your /boot partition.
  • /boot/grub/grub.conf gets updated (please check manually before booting) to use the new kernel.

Standard for USB web cams

Webcams and Linux always lacked good drivers. One of the main problems was the missing standard for USB cams. Now this standard exists. It's called "USB Video Class (UVC)" and you can get the spec here.

And a Linux driver is already work-progress. Logitech seems to be the first vendor being compliant to the standard. The Quickcam Fusion, Orbit, Pro for Notebooks, and Pro 5000 are supported. Guess one of the cams is the one I'm gonna buy.

USB storage spin down

Here is a Ruby script that uses sg3_utils to automatically put a SCSI device into standby mode after a configurable idle time period. This also works with USB storage devices (tested with Linux Kernel 2.6.14, sg3_utils 1.11 on Gentoo Linux with an NEC PCI USB 2.0 controller and an external Samsung SP2514N hard disk in an ICY Box).

You can download version 0.1 here.

Syndicate content