FamousPhil.com -- Home My Calendar Youtube LinkedIn Facebook MySpace Twitter RSS Blog Feed

Blog Navigation

Blog Home



Partners

Latest Activity

MySQL Singleton Classes in PHP and Python

Phil gives the source code for implementing a MySQL singleton class in both PHP and Python.



Posted on: November 21st, 2011 by Famous Phil

Most of the Matthouse infrastructure is running on old Celeron processors and limited RAM, you may laugh at me, but that hardware has been very reliable and has lasted Matthouse for the better part of 3 years, and some of it may continue to power Matthouse well into the future!  But there are some applications out there that require a little more juice to run well, and (unfortunately) Exchange falls into this category.  I say it is unfortunate since the Exchange server hosts a handful (< 10) mailboxes, yet it costs quite a bit to maintain compared to other Mail Transfer Agents (MTA).  So anyways, this blog is dedicated to the procedure that I took to migrate Exchange over to brand new, shiny, fast hardware.

First, I had Server 2008 R2 Datacenter as my operating system on both the existing server (denoted double) and the new server (denoted ruby).  The servers could clearly communicate with each other within the same datacenter as well so that file / data transfers could be effective.  The first thing to adding any server is to give the new server a name and know its network configuration details ahead of time.  I’m not going to go into details about how to install Windows, since it’s pretty simple.  Just make sure that you have the correct drivers installed for your server after the installation completes.

Note about installing Windows: just so that you don’t run into any issues with your system, make sure that your primary hard drive is attached to the first port for your motherboard’s interface, in my case, the first hard drive was connected to SATA 0.  If you don’t do this, you’ll run into a lot of problems and waste a lot of time (like I did!).  In addition, make sure that your BIOS has AHCI enabled prior to installing Windows, this also caused problems in my scenario.  Once Windows is installed, make sure that you can disable write caching on your hard disk without the operating system freezing (in computer management, under storage, right click the disk and optimize for quick removal).  If you followed the above, this shouldn’t cause Windows to hang, and will prevent Active Directory from incapacitating your system during the restart phase of the installation.  In addition, this is a good time to name your computer, join it to some default workgroup, add remote administration features, and change the time zone / clock settings.

Before continuing, I’d also recommend disabling Internet Explorer’s advanced security features; this is done by going to the computer management main screen and scrolling down, finding IE ESC and turning it off (acknowledging all of the warnings).  If you keep them on, you’ll find yourself doing way too much work to download necessary applications, etc.  These features are only useful if you plan on doing general web surfing on the server (which I would not recommend for security reasons).  I also activated windows, ran all the necessary windows updates (several reboots and optional updates as well).  After this all has been done, I ended up rebooting the machine a final time.

At this point, I installed several applications (using IE to get Google Chrome initially).

Tags: , , , , , , ,
Posted in Hosting / Server Administration, Technology
|| No Comments »

Posted on: January 5th, 2011 by Famous Phil

For any CPanel administrator, migrating accounts between servers is an issue that comes up now and again and I have not found any really great sources online on how to do this properly and minimize downtime so I thought I’d write my own guide.  As always, the information provided is on an as-is basis with no warranty that this will work for your situation.

Background:
Since November, the Matthouse CPanel server (int) was sick.  It started in early November by going offline with no response (my nagios monitor caught it).  I thought nothing of it and hard-rebooted the machine.  I read the error logs and found nothing out of place. 

Aside: The kernel is the lowest level of an operating system, it is what makes disk access and other critical functions available to an operating system, BIOS typically calls a bootloader that then runs the kernel.  Kernel panics are basically a condition when the kernel doesn’t know how to handle an error, and since the kernel holds the operating system up, the computer crashes and a BSOD (or equivalent) is displayed on the screen.

The next night, int crashed again, but because of the non-existent error logs, I decided to wait for a KVM device to be connected so that I could read the console screen.  Thankfully when a system crashes, it leaves information up on the screen that is helpful to the administrator.  In my case, the quota service was causing the panic.  I disabled the quota service after rebooting the system and this helped for about a week.  Then it happened again with a similar error on the console.  After a lot of digging, I ran out of ideas and finally had the server checked for hardware problems.  All the tests passed successfully so I let it be.  Strange enough it made it for another week then the same problem occurred.

At this point, I thought it would be in the best interest of my clients to get them off the existing server and onto some new hardware in hopes of finding a long term solution to this problem.  This is where the title of this blog comes into play.  How do I implement a new CPanel server and move all the customers to it with almost no downtime?  If you wish to know the solution, please open up the full version of this blog and read on.

Read the rest of this entry »

Tags: , , , , , , , , ,
Posted in Hosting / Server Administration
|| 3 Comments »

Posted on: January 19th, 2009 by Famous Phil

As you probably know, I host websites as a side hobby to keep myself busy.  If you didn’t know, I host websites through http://www.matthouse.us.

Over the past few years, I have hosted on the OpenVZ platform (Virtual Private Server).  I started out with lxadmin and moved my way up to cpanel accounts for my clients due to many problems with lxadmin.  After a lot of newly formed concerns about security after noticing hacking attempts, I have attempted to tighten my server, however openvz has presented many challenges while performing these tasks.   At first, I was recording 20 to 30 hack attempts per day to my main webserver (mthsweb1.matthouse.us), and this was totally unacceptable to me.  I have tightened that server down but am finding that my server is much slower than it once was and I was forced to find a better solution.  This is why I’ve decided to migrate my entire customer base to a new server running on the Virtuozzo platform which is much more stable, secure and less of a pig when it comes to memory consumption.

Within the next couple of weeks, I hope to contact everyone and migrate every website over to the new server completely.  I will personally verify each site is completely transferred with minimal to no downtime as possible.  To all of my customers, I would like to thank you for your continued support.  Your support helps me learn new techniques to managing servers and providing appropriate customer service!

One additional note, I promise that I will have a photo gallery up by next weekend!  Have a great Martin Luther King day!

Tags: , ,
Posted in My Site
|| 1 Comment »