Posts Tagged ‘arch linux’

h1

Time allocation

2009-10-07

Here’s how I spent my day:

3pm-5pm
Tutoring introductory algebra. Subtract that from both sides. No not divide, subtract. Ok, now divide both sides… y = mx + b is slope-intercept form.

5pm-9pm
Installing a 32-bit chroot on Arch Linux in order to compile and use nsis on a 64-bit platform. Shell scripts and aliases are your friends. Linux32 seems to provide a transparent way to make it work.

9pm-12:30am
Troubleshooting software installation on Vista. Spent the first 2-3 hours trying various manifest and packaging options and instructing the user to uninstall and install various versions of the Visual C++ 2005 Redistributable file from Microsoft. The only thing that fixed it was using Visual C++ 2008 SP1 in VirtualBox on my MacBook to compile the software, and point to the newer Redistributable. Seriously Microsoft, it shouldn’t be this complicated.

Advertisements
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.