Little T in the Cog linux

Nginx

2012-02-17

I've just switched this site over to Nginx from Apache. The main reason for doing this is Nginx is far better suited to lightweight sites like this as it is especially fast at serving static content while using a lot less ram and seeing as I'm not doing any fancy URL re-writing or other things like that Apache was a bit overkill. The reason I went with Apache in the first place when I first started this site a few years ago was simply it was what I was used to - all the web servers I've configured over the years have been Apache servers so it was all I knew. But since switching jobs about a month back I've been exposed to Nginx and after doing a bit of reading about it have decided that this little Intel Atom box with this very lightly trafficked site would be much happier with something a bit smaller and simpler. My first thought was to go with something like Araneum as it is really tiny and efficient with very few options so securing it is pretty easy. However Araneum isn't in the Debian repositories and the only .deb package available from the Araneum website is for i386 (I'm running amd64 on this box) and I certainly don't want to rely on compiling from source each time the server is updated, so Nginx it is*.

To be honest this site sees so little traffic I could probably run pretty much any web server :-)


* I do like how Araneum provides a Haiku package though - BeOS represent!


Ubuntu 11.10

2012-02-15

And I'm back to using a Linux workstation <3

I've recently switched jobs, leaving the telco for a web hosting outfit. In my new workplace we can choose which OS we want to use on our workstations (or even provide our own workstations - a bunch of guys are running Macs, the rest pretty evenly split between Win 7 and Linux) and I'm happily running Ubuntu 11.10 on my nice dual 22" screen rig. Well, when I say happily it's nearly all rosy - I can't say I'm thrilled with Unity. It's not that the concept is bad, or I can't work with it, no it's that it is simply a bit too buggy for my liking. The last version of Ubuntu I used was 10.10 and even then there were some regressions in regards to stability (and IPSec broke as well...) but 11.10 seems to take it to a new level, it honestly feels like I'm using a beta OS a lot of the time as I've had a few strange issues (I've "lost" windows a few times now, once I unlocked the desktop only to be greeted by a white screen, every kernel update seems to break the ATi drivers, terminal has crashed twice now...).

I'm actually thinking about installing vanilla Debian, the only thing putting me off is the fact that it would take me a day or two of tweaking to get all my apps installed and set up the way I like. I'll give Ubuntu 12.04 a whirl when it comes out in two months but if that isn't up to scratch I'll go back to tried and true Debian Squeeze.


Tweaking vim

2011-11-02

Well it's only taken me about 5 years but I've finally discovered the spell plugin for vim. Seeing as I use vim to blog with and my spelling is terrible (hey, I'm a child of the spell-checker-on-phone generation!) I thought I'd install the plugin and give it a whirl - suffice to say pretty much every entry on this blog had at least one typo/spelling error!

Hopefully from now on you'll notice fewer spelling errors going forward :-)


Nagios

2011-09-20

I've now got a full Nagios build running at home, monitoring various systems (my ADSL router, the bare metal Xen host, all the guests, my NAS etc) in my house. I originally installed it simply so I could check when updates were available for the Debian systems I have running here (rather than having to apt-get update manually to check) by using snmp coupled with a script that checks every night for updates but soon got carried away and now I'm monitoring and graphing (with cacti) a whole bunch of stuff.

I've installed Nagios before but it was a long time ago - either I knew less back then than I do now (quite possibly!) or it's got a lot easier because within about an hour I had monitoring, email alerts etc all working (and that time includes building the virtual host!)

<3 Nagios


Apache Bug

2011-08-25

I was just reading about this vulnerability in Apache (the web server that pretty much owns the internet). Quite nasty, a single machine can crash a web server with a simple http request. The Apache guys are scrambling for a fix which should be out in the next few days but until then there are a bunch of things you can do to mitigate the bug.

Guess which web server I'm running on this box... <gulp!>

UPDATE: And it's fixed - go get your apt-get update on.


Back to Windows

2011-05-20

I've lost my Linux workstation <sob! sniff!> and I'm now forced to use a company build of Windows XP. This came about because I've shifted internally to a new roll at work and they don't allow anything other than the company's build of WinXP on their network (and yes, Windows XP is just as bad as I remember it from years ago...)

I'm currently getting my Linux fix (other than the servers I work on for a living of course!) by ssh'ing into my little Intel Atom server at home and running irssi to connect to the channels I normally chat on. Somehow it's just not the same...


Read the Instructions

2011-04-15

Just got completely schooled by a xen upgrade - the XEN kernel got upgraded from 2.6.26 to 2.6.32 on squeeze and the device naming changed in the process. When I first upgraded to squeeze I was still booting the guests using the old kernel, but decided the time had come to get them onto the latest and greatest.

So I shut down this web server guest, mounted the drive on the bare metal and copied the kernel module tree across, tweaked the guest XEN config to use the new kernel and initrd and fired it back up again only to discover that it couldn't find it's root disk and dropped me into a busybox shell. Sure enough a quick shufty through /dev/ revealed the lack of any sd devices. Was I missing a module in initrd? No, /proc/modules looked pretty much as I would expect. Five minutes of furious googling later and I had the answer - in kernel 2.6.32 (and presumably later kernels) the XEN guests get a new disk naming scheme - instead of (say) /dev/sda2 it is now /dev/xvda2. I tweaked the guest config again, changing all instances of sda to xvda and fired the guest up again, this time to be greeted with a login prompt.

That'll teach me to RTFM. Still, better to discover this now on my own rig than out on a customer site...


New Toys

2011-02-07

So many shiny new things out today! Just installed Chrome 9 and I've gotta say I like it a lot. The biggest thing stopping me from using it in the past has been the terrible performance of animated gifs (a problem that seems to effect all WebKit based browsers). I know, I know... Animated gifs are the scourge of the web but unfortunately on one of the forums I frequent a lot of users have animated gifs as their avatars and opening a page full of them used to stall the browser for up to 30 seconds as they all stuttered into life. For whatever reason Firefox never suffered from this problem, and now with the latest release Chrome is also smooth as silk - and loads pages very quickly to boot. Will be interesting to see how good Firefox is when 4.0 is released...

The other big news is the release of Debian 6.0, a.k.a "Squeeze". I've already upgraded all my personal machines (including this web server) and plan on doing my work machines over the next week or so. The upgrade was smooth enough for the most part, at least on all my virtual machines (I'm running XEN on this rig as the box it runs on - an Intel Atom - doesn't have the VT extensions built in so I can't use VMWare/kvm etc) with only the hypervisor requiring some tweaking to get things working. There are a few new things which may take some getting used to (dash instead of bash for the shell, new boot sequence, some service name changes) but hopefully I'll survive :-)

It's funny because actually the whole thing feels more like Ubuntu... The student teaching the teacher?


Using Unix the Right Way

2010-11-26

I just read an excellent blog entry by Ted Dziuba pretty much summing up why I love working with Unix/Linux. I'm not actually a developer but use the shell every day for work - being able to whip up a shell script using all the built in Unix tools is a massive time saver (well, when I say *all* the built in Unix tools I really mean the ones that I've actually discovered and semi mastered - there are a ton of small utilities, not to mention Bash builtins...) and means I can come back to it half a year later and generally see what I was doing at the time by reading through the script. <3 Unix :-)


Attachmate Buys Novell

2010-11-23

So, Novell has been bought by Attachmate.

Can't actually say I've ever heard of them, but osnews has a brief but good write up about the deal which sees Attachmate Corp walking away with Novell and SuSE. My first taste of SuSE (as it was known back then before it had been acquired by Novell) was around version 7.something and I used it exclusively up until around 9.2ish. I remember it had (imo) hands down the slickest KDE desktop of any Linux in those days and things pretty much worked out of the box (including wireless!) when other distros required a good deal of tweaking. It was the second distro that I actually purchased (rather than downloading) and came in a nice box with install CDs and two hefty manuals (I think back in the 7.3 days I was still on dial-up so would have taken many evenings to download the ISOs - buying a box was much easier).

But time waits for no distro and I soon found I was getting annoyed with RPM/yast compared with apt* - it was simply too slow installing software and updates were painful. Sometime around 2005 I installed Ubuntu and dual booted for a while (I really didn't like Gnome at first!) but after time realised I hadn't booted into SuSE for months so blew away the partition. I've never used it on my personal systems since.

Where I work we still have some SLES 10 machines running but pretty much everything is now on Red Hat so I hardly have to touch SUSE now - a good thing as I find myself getting just as frustrated with the speed of rug (the package manager) as I did with yast back in the day. I'll be interested to see what Attachmate does with its new acquisition but for me at least SUSE lost its relevance many years ago...


* My first taste of "this lynix thing" was actually Corel Linux, a short lived distro that I first used in 2000. It was based on debian so I was thoroughly spoiled by apt and everything else since has never managed to touch that packaging system. This site is running on debian ;-)