Archive for January, 2008

Windows SBS vs Fedora Core

Thursday, January 31st, 2008

Before I start this is not intended to be the usual argument between the Microsoft and Linux camps but more a desription of my findings when I had to evaluate the two products for use within our office as the main server. Our office network is currently of the usual standard you’d find in a small 5-10 person company that doesn’t have an in-house IT person:

  • All internet traffic is routed through the ADSL router with no management and for the large part, static IP addresses
  • Printers shared on which ever PC they were configured from first
  • PCs with no password on the user account
  • A random mixture of different versions of Windows and Office

I know this shouldn’t be the case with me being the in-house IT “professional”, but my main job is to develop and maintain several enterprise quality websites. This leaves me with very little time to devote to my additional role as IT Manager and Sys Admin so up until now as long as everyone good do their job on that particular day and as long as none of the office IT equiptment had smoke and flames billowing out of it then I considered that part of my job a success.

Unfortunately the MD has thrown a spanner in the works by setting us all a set of goals that will allow our company to function at it’s best and also to grow over the next year or so. This is normally fine by me as it’s the kind of mission critical memo that I lovingly file away in the “Deleted Items” folder before getting on with some serious Ajax coding. This time is a little different though as he’s made our bonuses dependant on the goals being acheived. There’s a few bits and bobs in here that I’m not going to include here but for the most part they boil down to:

  • Reliable uptime of printers, file storage and internet connection for all office PCs
  • Backup of all files and email that can be recovered with 1 working hour
  • Document collaboration for both onsite and offsite staff

Now my initial reaction was to head off to Dell and spec up a shinny new server running Windows Small Business Server 2003 to take advantage of the combination of Exchange and SharePoint but after taking into account some of the PCs are running old versions of Office (there may even be an odd Works and Outlook Express installation) and a few Windows XP Home, by the time everything was upgraded to XP Pro and Office 2003/2007 plus the server it was a bill upwards of £2000!

For a small business of 6 employess that is a bit steep by anyones standard so I did the obvious and headed off into the Linux world. I’m not a die hard linux fan by any means. I like it a lot - where it’s appropriate, but I don’t use it on my desktop - I’m on XP Pro. Neither will I use windows all the time - I don’t have a single IIS or SQL installation (L.A.M.P all the way!) but Linux is cheaper if you can do it yourself. That’s where businesses of our size have to find the trade off: you don’t want to be paying a consultant or your IT staff more than it would have cost to get a Windows server up and running.

In the end I weighed up the pros and cons and made the following decision: Linux this time based on the following:

  • Fedora Core 8 running on a P4 1Gb box
  • Leave the email running on our Web Hosts SMTP/POP3 servers
  • Configure all the usual DNS, DHCP, Samba, Firewall and routing servers so that they worke just as though we’d forked out £2000 on Windows SBS
  • Install OpenOffice and O3Spaces (or similar) on every machine

So thats the plan. The moral of this (as usual) long winded rambling and unnecessary story? Find the solution that fits your needs and budget. Time to implement it and then report back!

1and1 Dedicated server and PEAR

Tuesday, January 29th, 2008

I’ve recently had to do a complete reinstall on our 1and1 Root Linux server which is easy enough in itself as it’s just a case of going into the Control Panel and hitting Server Re-Image alogn with your choice of operating system. I went for Fedora Core 6 and within an hour everything was up and running. Within another hour I had my files uploaded (4Gb including images), MySQL databases loaded and my custom httpd.conf loaded. After that I thought the only hard bit would be the extras I had installed but with a quick “yum install ImageMagick” and “yum install webmin” then using Webmin to set up the firewall properly, everything was good to go.

With the sites back up I just needed to do a few quick checks to see if various bits of the website were working. Everything was fine except for PHP sending out emails. I knew that newer versions of Fedora were supposed to use QMail and not Sendmail so I headed off into the system to see if I could track down the problem. After a bit of messing around it seemed the mail server was fine (even with the MTA set as QMail) but nothing would be sent out using PHP. By saving the MTA to Sendmail I could get emails out using the mail() function but not using PEAR’s Mail package. Enabling ErrorReporting on one of my scripts threw up the errors:

Warning: main(Mail.php): failed to open stream: No such file or directory in
/var/www/html/email.php on line 15

Fatal error: main(): Failed opening required ‘Mail.php’
(include_path=’.:/usr/local/share/php/pear’) in
/var/www/html/email.php on line 15

I then loaded up a phpinfo() script and noticed the following line:

–without-pear

For some reason they’ve decided to be overly cautious and install PHP without PEAR support so even though PEAR was showing as being installed and commands such as “pear install Mime” were working, something with PHP was a bit pear shaped (get it, arf arf!). It turns out that the solution is simply to open up /etc/php.ini and add the following line:

include_path=”.;/usr/share/pear”

Everything seems to be working now, a bit more testing might be in order though

When is automation a bad thing

Wednesday, January 23rd, 2008

As a web developer for a SME I try to use automation as much as possible to reduce the staff workload. This is generally the run of the mill stuff:

  • Sending out an automated email when someone registers
  • Creating a PDF receipt when a payment is made
  • Checking the database for irregularities and fixing where possible

The one problem with the last one is that the functions I create are never going to be as good at fixing problems as a real live human would because the computer is incapible of making complex decisions: they don’t like too much variation, cannot improvise and are bound by the rules of the system. So what is the cut-off point for using automation?

I think that it is a good idea to try and use automation as long as it is thoroughly planned out. This was brought to my attention yesterday when I had to kill some time in the new shopping center (mall for those of you over the pond) near work and went to use the loo. They’re brand new and quite good: everything is automated. The hand dryers and taps are all motion activated.

The problem is that so are the flushes on the toilets. This is all very good and hygenic and will save the world, etc, etc but the problem is that they put the sensor right next to the toilet roll so when you lean over, you brush the sensor with your arm and get a freezing cold, wet arse. Brilliant. Nice one whoever planned that one.