sysadmin's blog

Standalone Solr Listen to Localhost only

I like firewalls as much a the next man. But sometimes they're just not necessary. Back in the day (back in the world of banking) I used to review sites that had a liberal sprinkling of firewalls. Literally. I remember one site that had as many firewalls as they did servers!

Resend Drupal registration email

Blimey, what a palavah that was!

I've been using a module called Account Reminder to resend peoples registration details if they hadnt activated their account.

This is all fine and dandy, you can set it so it emails after a predefined period with custom email content etc. All good so far.

Journaling file system commits (reducing disk activity for Desktop machines)

Adding this string

noatime,commit=60

to /etc/fstab for local disks does two things:

  • First off noatime stops linux writing an access time to every file every time it is read. This is a big performance increase with zero impact to stability

Compile FFmpeg on Ubuntu Linux Karmic

Install the following packages:

$ sudo apt-get install faad libmp4v2-dev libfaac0 libfaac-dev libxvidcore4 libxvidcore4-dev liba52-0.7.4 liba52-0.7.4-dev libx264-dev libgsm-tools libogg-dev libtheora-bin libfaad-dev libvorbis-dev libtheora-dev libdts-dev git-core yasm texi2html checkinstall

Then:

apt-get purge ffmpeg (in case you have any pre-installed stuff from the standard repo)

Latest version of Yasm

$ wget http://www.tortall.net/projects/yasm/releases/yasm-0.7.2.tar.gz
$ cd yasm
$ ./configure;make;
$ sudo make install

Script for efficient drupal database backup to S3 on Ubuntu Linux EC2

This script backs up all the permanent data in a drupal database (no point backing up an ephemeral table like sessions, nor a table that can be reconstructed like search), compresses the hell out of it (http://www.initsix.co.uk/content/modern-compression-techniques-reduce-s3...), and then dumps it into s3 with a unique name based on the timestamp and db name. Using the timestamp at the front of the name means friendly listings by date and by db in apps like S3 organizer - https://addons.mozilla.org/en-US/firefox/addon/3247

Modern compression techniques reduce S3 hosting costs by half

We backup all our databases and files each night to various on and offsite locations. One of them being Amazon S3. All this moving and storing costs by the gigabyte month, however cpu time is cheap and is a fixed cost. Therefore any reduction in file size will have an immediate positive impact on the bottom line, so long as the cpu usage doesnt impact normal system performance.

Khtmld and khtml2png2 on ubuntu 8.04 php screenshot server

Khtmld is a deamon which will run on the webserver. Provides a simple interface to khtml2png2 without having to give the webserver a shell account.

khtmld creates a spool file (FIFO) in /tmp/khtmldspool. You can use php to write url and output filename pairs into this file and they will be used as arguments to khtml2png2.

Install khtmld

Get a copy of khtmld from http://sourceforge.net/projects/khtmld/ and untar it, then compile it

tar -xzf khtmld-0.3.8.tar.gz
cd khtmld-0.3.8/
./autogen.sh
make
sudo make install

How to make a xfs 4 disk raid 0 partition for ec2 mysql for maximum disk io performance

Use this technique at your own risk. You need to be hot on snapshots, backups and restores to ensure you dont lose everything.

  • Raid 0 offers no fault tolerance
  • Disk reads and writes can be potentially 400% faster
  • Loss of one disk will destroy the entire dataset

Although moving the binary log to its own ebs volume means at least you can recover the transactions from another redundant volume which could also be mirrored and should be snapshotted as part of the process.

how to compile icecast 2.3.2 and ezstream on hardy 8.04

download icecast 2.3.2 from here http://www.icecast.org/

install these required modules

steev@initsix.co.uk:~$ sudo apt-get install libxslt-dev libogg-dev vorbis-tools libvorbis-dev libtheora-dev speex libspeex-dev curl libcurl4-openssl-dev

explode the archive, change directory then compile

steev@initsix.co.uk:~$ icecast-2.3.2$ tar -xzf icecast-2.3.2.tar.gz
steev@initsix.co.uk:~$ cd icecast-2.3.2
steev@initsix.co.uk:~$ icecast-2.3.2$./configure
steev@initsix.co.uk:~$ make
steev@initsix.co.uk:~$ make install

Integrating Jungle Disk, EC2 and Drupal 6 image Gallery

User story
As a PR consultant i need to scan a lot of print media articles and have them included in reports for clients to show them their results. I dont have a lot of time so cant upload them individually to Drupal, and i use a lot of interns that do the scanning and dump them to a NAS in the office. I would like the scans to be automatically uploaded to the Drupal site where they can be approved at leisure by a senior member of staff and then treated as any other node we create.

Syndicate content