Skip to content

how to - 3. page

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!!

How To Install WDS (Windows Deployment Services) on Windows Server 2012 R2

This is the first in a three part series on “The Ultimate PXE Server Configuration.” PXE is the protocol that your network card can use to boot from the network. Having a good PXE server is a major need on every decently sized network or home lab. It’s really nice to never have to scrounge for a USB thumb drive or accumulate piles of burnt CDs that are only used once. All of those headaches can be avoided with a properly configured PXE server.

Microsoft Windows Server 2008 and 2012 both include what’s called WDS. This stands for Windows Deployment Services. This is a network boot (PXE) environment that allows you to install all sorts of different Windows versions, all over the network. A network install of Windows 7 or 8 over a gigabit network takes just a few minutes. It’s insanely fast.

In the Linux world, the defacto standard for PXE is the SysLinux package. It’s excellent for installing various Linux distributions, hypervisors (like vmware and xen), and tools (such as gparted, AV software, and disc cloning utilities). It even supports Windows installations, sort of. But, it’s quite a hassle.

In a perfect world, we would just combine both of these so that we can use WDS to take care of the Windows installations, and use SysLinux to handle linux installations, tools, and everything else. Well, guess what? You can, and that’s exactly what were going to to do in this series. The first post, the one you’re reading, covers installing WDS on Microsoft Windows Server 2012 R2. The second post will cover adding SysLinux to WDS. The third and final part will cover adding a ton of useful tools and installation sources. So, let’s get it started.

Installing WDS on Server 2012 R2

There are a few requirements for a WDS installation.

  • Active Directory – You need to run dcpromo on your WDS server to make it a domain controller if you don’t already have one already.
  • DHCP – It’s best to use Microsoft’s DHCP server, and like AD, I will be installing this service right along side WDS on a single server.
  • DNS – WDS needs DNS, which you will obviously have if you have a domain controller.
  • (Optional) Web Server – IIS will work well. Some packages install via http. This isn’t needed for Windows installation.
  • (Optional) NFS Server – The NFS Server role under file and storage services works well. This isn’t needed for Windows installation.

Click Here To Read The Rest Of The Post!