Category Archives: howto

HOWTO run DD-WRT on a Netgear WNDR3700

Netgear WNDR3700 v1

The Netgear WNDR3700 v1

At home I’ve had my trusty Linksys WRT54GL, the Linux based router that ran the Tomato firmware so well, for years; it’s an awesome router and the only time it went down was when I was upgrading it. The only reason to look for a new one is that the wifi is G speed, and the network is only 10/100. Eventually newer, sleeker, and far faster routers, tempted me too much. After looking around I found the best bang for the buck, and then I found an online factory reconditioned version and the decision was made. I’m now running the Netgear WNDR3700 (v1) N600 Wireless Dual Band Gigabit Router, and after playing around with the stock firmware, I installed DD-WRT on it, and couldn’t be happier with it. It looks and feels a bit more hardcore than Tomato, and unlocks all sorts of features of the hardware that the factory firmware blocked access to. But first let’s look at the router, it’s a shiny, thin, tall (if setup with the included stand) router with brighter than average lights that the rim of the router help reflect out, more blinky lights is always a plus in my book. It’s a dual-band Wireless-N router, it has simultaneous networks running on 2.4 GHz and 5.0 GHz which support supports A/B/G/N speeds, it has a 680 MHz MIPS 32-bit processor (for comparison the WRT54GL had a 200 Mhz proc), 64 Meg RAM (again, the WRT54GL had 16 Meg RAM), 5 Gigabit ethernet ports, a USB 2.0 port for external networked storage (or networked printer if you’re running DD-WRT), dynamic DNS, firewall, and expanded QoS settings to handle things like VPN and VoIP. So that’s about it, this is still one of the fastest routers out there, and big step up from where I was previously. I knew I wouldn’t need to reference much from it, but I pulled up the FAQ and grabbed the manual in PDF form. Since this was a refurb I didn’t expect it to have the latest firmware installed, and it didn’t, instead having some version 1.0.4, while the latest was 1.0.16. So I grabbed the latest firmware for it, and flashed away, after a few minutes it rebooted, and I had version 1.0.16.98dnsNA installed. Then the fun began!

HOWTO install php5-fpm on Debian Squeeze

PHP5-FPM

PHP5-FPM

Once PHP hit version 5.3, it started shipping with PHP-FPM, which is the new way to handle PHP requests when serving web content. Their site describes it as, “PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation with some additional features useful for sites of any size, especially busier sites“, but this is being pretty modest when you consider the host of improvements it brings over the old way of doing things when running PHP with an ‘alternate’ webserver such as lighttpd or nginx. So, it sounds like a slam dunk, time to remove all the handwritten fastcgi-php scripts from /etc/init.d, update PHP and go to town, right? Not so fast hot shot, in Debian Squeeze (stable) they don’t include PHP-FPM with PHP 5.3 (reasons for this tend to fall in the ‘not enough testing‘ variety), so we have to look elsewhere for a PHP with this (and other upgrades) enabled. This is exactly what the site and repo Dotdeb is there for, and they have the updated PHP 5.3 that includes the FPM module. So, to get it installed on Debian Squeeze we first have to add the repo line to sources.list

HOWTO tame Apache Tomcat’s logging

Apache Tomcat

Apache Tomcat

If you’re like me, you’ve had to support Apache Tomcat for a good chunk of your IT career, and it hasn’t all been wine and roses. Typically Tomcat will work great in a development, or in a proof of concept environment, but when it comes time to put it in production and have it face some real traffic, well, you get complaints. Now, why do I have a picture of Tomcat on a messenger bag here? It’s because I would like to put Tomcat in a bag…and throw it in a river! But, since I haven’t done that (yet), I’ll talk about recently when I had some tomcat servers pumping out hundred of MGs of logfiles that weren’t being rotated quickly enough, filling up the log partition and causing alerts to go off. Now logrotate is supposed to handle things, and while it’s defaults will generally work fine, any persistant error from tomcat will make the logs quickly eat up all your space and cause you grief, so it’s best to set it up to handle them ahead of time. First take a look at:

HOWTO automate Debian installs with preseed

Automatic (you know, for the people)

Automatic (you know, for the people)

I’ve installed Linux, probably 100s of times, and while going through all the questions and answers used to be fun, once you have everything decided it’s mainly a case of tab, space, enter, tab, tab, enter, space, space, tab, enter. I remember reading about kickstart, which was Red Hat‘s way of automating the install process, but Debian GNU/Linux (and by extension Ubuntu Linux) support  preseed. From Debian’s wiki, “Preseeding provides a way to set answers to questions asked during the installation process, without having to manually enter the answers while the installation is running. This makes it possible to fully automate most types of installation and even offers some features not available during normal installations.” So preseeding automates the install of the OS, the questions that you’d normally need to answer interactively are predetermined, and defined by a supplied configuration file, and sometimes boot parameters. So while Ubuntu is known for it’s user-friendly OS installer, Ubiquity, preseeding the Debian-Installer  (also known as “d-i”) is the recommended method for automating Ubuntu installations and for building custom install CDs. With this in mind I set out to build a preseed config file that would automate installs of virtual KVM machines we were provisioning at a gig, but looking at how I do such bare-bones base installs, this would work for most of my normal Debian installs at home too.

HOWTO retrieve email with fetchmail and forward it on with procmail

fetchmail

fetchmail logo

I’m starting a new gig Monday, so I got a new email address for use while I work there. Now of course, I have many, many email addresses, but thanks to Google Apps, I still check them all through a Gmail frontend, and can ‘send as’ any address I want; which makes it almost seamless to integrate new email accounts. However, today we hit a snag, whereas my last client offered to simply forward my mail to another address, the new one wouldn’t with something about auditing as their reason, which I can completely understand, as long as they understand, having to check email via multiple clients just won’t scale. That’s right Anthony, ‘this won’t scale’. So, since we’re rocking Linux and open source we know we can fix it some way, and that’s what I live for, the challenge. Ya, that’s right, I was given a stumbling block, I stared it down and proclaimed, “challenge accepted”.

Page 1 of 912345...Last »