Posts Tagged ‘iptables’

h1

Sweet home West Virginia

2009-10-03

Having been entrusted with yet another infrastructure deployment project, I purchased a SuperMicro barebones system from Newegg along with a Xeon X3220 processor, 8 GB of RAM, and two WD 320 GB SATA-II hard disks. Installing Arch Linux was (as always) a walk in the park, but care had to be taken to set up the RAID properly. The latest version of Arch allows the admin to set up the array, and then write the output of mdadm to mdadm.conf, and doesn’t require kernel parameters– mdadm.conf is loaded immediately during initrd so that no kernel parameters are needed to reload the array.

I was very pleased when the server came online in WV without needing operator assistance. I attribute this to carefully configuring the rc.conf to have the correct IP settings and making sure iptables allowed only SSH access into the machine. Arch Linux isn’t difficult to configure in regard to TCP/IP settings, but it does require some know-how. It isn’t obvious from looking at rc.conf that the gateway settings need to be provided in terms that the route command can directly understand. I referred to my previous work to make sure I had it down cold.

Now that it’s online, I’m spending time tuning and tweaking the system for optimal performance. I realized that some of the code I had written before was very suboptimal, mainly because every page referred to a gigantic >1000 line monstrosity of a PHP class that contained everything needed for the entire management site. I decided to peel layers away from it piece by piece, and I’ve now ended up with several smaller files that are dynamically loaded when they are needed. The common functions live in their own file, and each database table gets its own file to handle validation and presentation. The average load time has dropped significantly as a result.