Over the past couple of days, I’ve been rewriting the recovery script for a Linux LAMP application I wrote about 5 years ago. I test it every so often to make sure it still works. This year, it doesn’t. Basically, we’ve reached a stage where the software versions don’t support the LAMP stack I chose (XAMPP). Besides, XAMPP isn’t really suitable for production servers even though its served us well in the intervening years.
So, I’ve embarked on updating the recovery script to fit in with an ‘off-the-peg’ LAMP stack which will be easier to maintain going forward.
My favorite distribution is Debian and that’s the one I’ve most experience with. However, the preferred distro in the office is RHEL, or variants based therein. So I got myself a fresh download of the Fedora 19 network install CD, loaded it into the virtual machine and off we go. The installer is a bit err, low-rent – pretty graphics and the like, but not a lot of options to choose. I suppose I’m too used to the ‘expert’ mode of the Debian network install. Anyway, went through the necessary steps to get the network up and running, configure it to talk to our proxy server etc, find the disk config menu (hidden off-screen on a low-res screen) then go to the package selection screen. Being reasonably accomplished now in administering Linux systems, I went for the minimal selection so I could add the other packages later on, and off we went.
I quite liked how you can set the root password and create a new user whilst the OS installs – thats efficient. Then that was that, server installed. And that’s when the trouble started.
Giving yum proxy access was straightforward (although why the configs don’t carry across from the installer, I don’t know) and getting the LAMP stack installed was straightforward. The httpd service came straight up after install and was ready to go. Except that it wasn’t. I could not for the life of me get a http page to come up. It seemed that SSH was the only default port opened. I checked network config and that all looked okay. I could even wget http://localhost and get a page back. So why no external connection? Then I discovered SELinux was installed and running. Disabled that, and a reboot – still no damn connection! There looked to be a load of IPTables rules still listed; could they be a carryover from SELinux I wondered? Dropped the iptable rules and magically got http access back. Rebooted and same problem again.
After reaching out to a colleague who has a little more experience with these distro’s that I, and after installing Webmin, we discovered that firewalld was running on startup.
Now, when I install a minimal distro installation, I expect the following:
- A bootloader
- A kernel
- A shell
- Enough configuration to get from the bootloader to a shell
- An ability to extend the system with a package manager.
I do not expect other things to get in the way, especially as I hadn’t asked for them. SELinux and Firewalls are good practice, but I do not want them imposed on me, especially if I’m not expecting them. There were a number of other packages loaded (wpa_supplicant) that to me do not classify as essential to getting Linux up and running.
Fedora 19 and I have not immediately started as friends.