Skip to content

Monthly Archives: May 2015

How to move a WordPress site to a new server or host with no downtime

Yesterday, I finished building a new and improved WordPress server. This means I had to migrate the serenity-networks.com WordPress installation from the old server to the new. I wanted to do this with zero downtime, which is actually quite easy and straightforward if you have a plan in place. The process works something like this.

  • Export the database from the old server using phpmyadmin
  • Copy all WordPress files from the old server to the new server
  • Import the database on the new server using phpmyadmin
  • Add temporary hostname entry into your local hosts file

You might be asking yourself, why on earth would I add a hostname entry into the hosts file on my workstation? Well, this will allow you to pull your website from the new server without changing your public DNS settings. If you are only hosting one site on the new server, and not using virtual headers, you can skip this step if you like. So lets get it started.

Moving a WordPress site to a new server

The only real requirement, other than a server capable of running WordPress, is having phpmyadmin installed on both of your web servers. Most already do, but if you don’t, click here to learn how. We need this to export and import the WordPress database.

First, log into phpmyadmin on your old server so we can download the WordPress database. It should be pretty obvious which database is for your WordPress instance, but if you aren’t sure you can see the name of it by looking at the wp-config.php file, located in the root of your WordPress installation.

Select your database in the left column and then click the Export tab at the top of the right column. Leave the selection set as Quick, and click Go.

Click Here To Read The Rest!

How to build your own WPEngine copycat WordPress server on Ubuntu 14.04 with an Ansible Playbook

There is no denying that WPEngine offers the fastest WordPress hosting on planet earth. They’ve invested millions into building the fastest platform possible. That’s why they charge so much money for their services. Because they are worth it. Some of us can’t afford to pay $100-$1000/mo for WordPress hosting. The good news is that if you’re not afraid to get your hands dirty on a Linux command line, you can build your own server that will get you most of the way to a WPEngine class WordPress instance. There are a few key technologies that make this possible.

  • Percona DB (like MySQL)
  • HHVM – A super fast PHP VM
  • PHP-FPM – Just in case HHVM has a problem
  • NGINX
  • Varnish – Awesome reverse proxy cache
  • Memcached & APC

I think you’re probably starting to get the idea. These are the highest performers of the high performance technologies out there. We’re going to make them all work together to make your site blazing fast. It’s not all that hard and it doesn’t take very long.

All you need is a VPS or Virtual Machine running Ubuntu 14.04. Go ahead and SSH into it and we’ll get started.

How to build a WPEngine copycat server for FREE

The server you are working with MUST be able to resolve the hostnames of the sites you’re going to set up, to itself. So, if you are building this to replace a server that’s running and you don’t want to take that site down until everything is migrated, simply add hostname entries mapping the FQDN to the IP address in /etc/hosts.

First thing’s first, let’s make sure your Ubuntu 14.04 installation is updated and upgraded.

sudo apt-get update && sudo apt-get upgrade

Now we need to add the Ansible ppa.

sudo add-apt-repository ppa:ansible/ansible

Click Here To Read The Rest Of This Post!

Need to recover a FreeNAS server? How to import an existing FreeNAS iSCSI target that existed on a prior installation

Last night I noticed a new version of FreeNAS 9.3 was released. Just two days earlier I built this FreeNAS server, so I wanted everything to be up to date. When I tried to update FreeNAS via the web GUI, it errored out. As I came to find out, this was one of the bugs addressed in the update I was trying to install. It was a catch-22. So, I downloaded the installation disc, burnt it to CD, and booted the FreeNAS server from it. That errored out as well. I had no choice but to blow away the existing installation and do a fresh FreeNAS load. All of my shares and iSCSI targets were stored on a 4 disk RAID-Z array, and FreeNAS itself is installed on an 8GB USB Thumb drive. So, I expected my data to stay in tact.

When I booted the fresh installation for the first time, it automatically imported the zpool stored on the RAID array. I was able to re-create the SMB shares and point them to the /mnt folders those shares pointed to before, everything was going well. Until I got to work trying to bring my iSCSI target volumes back online. In Storage > Volumes, I could see all of the volumes that matched up with my previous ISCSI targets, but I couldn’t import them. I couldn’t figure out how to do anything with them. All of my virtual machines were stored on these volumes so I was desperate to find a solution. I did.

Have you lost your FreeNAS installation? Just recovered from a catastrophe? Recently reinstalled FreeNAS and need to get your iSCSI and other shares back? Going through a FreeNAS recovery? You’ve come to the right place.

How to import an iSCSI target volume from an old FreeNAS installation

First, let’s make sure the volumes that previously correlated to iSCSI targets are visible. Navigate to Storage > View Volumes. Here is what mine looks like.

Screen Shot 2015-05-27 at 3.08.37 PM

Click Here To Read The Rest Of This Post!

How to run Android apps (apk) using Google Chrome on Windows, OSX, and Linux

Last night I was in a pinch and needed to poke around in an Android app, but I didn’t have an Android phone or tablet with me. So, I started trying to figure out a way to run Android apps, or .APK files, on my Macbook Pro. The solution I found actually works on any desktop or laptop computer running Windows, OSX, or Linux. All you need is Google Chrome. It’s very easy and only takes about 30 seconds to setup. Here’s how to do it.

How to run Android Apps, .APK files, on your PC or MAC

You will only need a few items to do this.

The magic that runs Android apps in Chrome is ARC Welder. This app is developed by Google, and it’s pretty new. There are some compatibility issues with it and apps that require the Google Play store, but they are working through those issues relatively quickly. Let’s go ahead and download the Google ARC Welder app from the Chrome store.

Head over to this link and click “ADD TO CHROME” in the top right-hand corner of the box that pops up.

Click Here To Keep Reading This Post!

How to monitor a VMware ESXi 5 / 6 host with Check_MK & OMD

Recently I posted a guide detailing how to install OMD (Open Monitoring Distribution) on Ubuntu 14.04. Part of OMD is the Check_MK network monitoring platform. I consider it the best available in the Open Source world. Check_MK supports monitoring VMware ESXi hosts, as well as vSphere servers. It uses the vSphere API to communicate with the host, so it’s able to pull much more data than SNMP. It’s not exactly a very intuitive process to get an ESXi host added to Check_MK, but it’s very easy if you know what to do. The documentation available is sub par, at best. So, I’m going to change that! This guide applies to all versions of ESXi 5 or later. So, ESXi 5, 5.1, 5.5 and 6.

Check_MK is capable of monitoring all sorts of valuable data from an ESXi host. This includes, CPU usage, RAM usage, Datastore usage, Network bandwidth statistics, health sensors and virtual machine power state.

How to add an ESXi 5, 5.1, 5.5 or 6 host to Check MK

Go ahead and log in to your Check_MK web interface. In the Configuration navigation area of the left, click on Host & Service Parameters.

Screen Shot 2015-05-26 at 3.23.21 PM

Click Here To Continue Reading!

How to install OMD (Open Monitoring Distribution) on Ubuntu 14.04

Open Monitoring Distribution (OMD) is an Open Source network, server, and datacenter monitoring platform and it’s absolutely fantastic. It’s basically a bunch of different monitoring systems all pooled into one platform. My favorite part of OMD is that it includes Check_MK, which I think is the best monitoring interface out there. But, it’s a lot more than that. Here is a breif list of what OMD contains (there’s more than this).

  • Nagios
  • Icinga
  • Shinken
  • Check_MK
  • Multisite
  • DokuWiki
  • NagVis
  • pnp4nagios
  • rrdtool

That’s just a brief list of all the greatness that’s packaged into OMD. Every network and home lab should have an OMD installation running on a virtual machine to keep tabs on everything and alert you when something goes wrong. Today, I’ll be installing and configuring OMD on an Ubuntu 14.04 virtual machine. So, lets get started already.

Installing OMD on Ubuntu 14.04

I always like to make sure everything is updated and upgraded when I’m setting up a new server. So lets go ahead and do that.

sudo apt-get update

sudo apt-get -y upgrade

Now we can get to work installing OMD. Fortunately, there are OMD packages already made for some of the more popular Linux distributions, Ubuntu 14.04 included. You can see all of the available packages by clicking on this link. As of this writing, OMD version 1.20 is the latest so that’s what I’m going to install. Check and see what the latest version is before getting started.

Click Here To Read The Rest Of The Post!

How To Add Windows Install Images To WDS (Windows Deployment Services) On Server 2012 R2

If you read my post on “How To Install WDS (Windows Deployment Services) on Windows Server 2012 R2.” you might be at a point where you have a WDS server set up, but you don’t have any Windows images loaded to install anything. Or, you might be having issues adding images to your WDS server. Either way, I’m here to help.

How to add images to WDS

Open up Windows Deployment Services by selecting it from the Tools menu on Server Management.

Screen Shot 2015-05-25 at 8.30.25 PM

If you have an ISO for Windows 7, Windows 8, Server 2008, or Server 2012, you’ll want to extract it using a tool like WinRAR, and move it over to your WDS server or make sure it’s available via a network share. If you are using a physical server and you have a CD ROM, you can put the OS installation CD in the drive as an alternative if you like. I prefer working with images.

There are two files we will need to add your first image. These are.

  • boot.wim – this is the Windows boot image
  • install.wim – this is the actual installation image

Click Here To Read The Entire Post!!