Servers – Michael Groff /blog Expand or Die Wed, 04 Dec 2019 16:59:20 +0000 en-US hourly 1 https://wordpress.org/?v=6.9.4 Home Lab 2.0 /blog/home-lab-2-0/ Fri, 01 Mar 2019 00:22:12 +0000 /blog/?p=927

This post will serve as the 10,000 ft overview of my environment and what it all consists of. I plan to follow up this post with a series of smaller posts breaking down my Home Lab into the following sections:

(as I update these blog posts, links will appear and become active)
  • Home Lab Servers & Storage
  • Home Lab Routing & Switching
  • Home Lab Access Points
  • Home Lab Surveillance
  • Home Cat6 Cable Wiring

Home Lab Servers & Storage

In this post I go into details about the server and storage that I use in my Home Lab environment.

The current hardware I use is:

  • Dell PowerEdge R710 SFF & LFF
  • Dell PowerEdge C2100
  • Dell PowerEdge CS24-SC (Essentially a 2950)
  • Dell PowerEdge R510 LFF

The operating systems that I use are:

  • VMware esxi 6.5
  • VMware esxi 6.7
  • Windows Server 2012 R2
  • Windows Server 2016
  • Windows Server 2019
  • FreeNAS 11.1 (U7 if you care)

I have purchased or otherwise acquired some Gen10 and Gen11 Dell PowerEdge Servers throughout my years in IT. I enjoy having a Home Lab to work in and learn new things without repercussions of really messing something up. In my environment, nuke and pave is not frowned upon at all. I do my best to say up-to-date and using the latest and greatest trial software, but due to the hardware I am running, that goal comes with some limitations.For instance, my C2100 servers simply cannot be upgraded beyond esxi 6.5. The processors are not compatible with esxi 6.7. However, I was able to upgrade my vCenter Server to 6.7 and still have it manage my 6.5 hosts.

Most of my servers are running Windows Server 2019, but some are still running 2016 as I havent had the time or need to update them. (Such as DC’s and DB’s)

My Storage devices are all PowerEdge Servers running FreeNAS. I set them up with FreeNAS and configure the iSCSI service for MPIO to my esxi hosts. I find it is a set-it and forget-it type of thing. I am subscribed to some FreeNAS emails and RSS feeds, so I look out for OS updates and install them accordingly.

Home Lab Routing & Switching

In this post I will cover all the networking equipment that I use in my home lab and how I use it.

The networking hardware that I use is:

  • Unifi USG-PRO-4 (Gateway)
  • Unifi US-24 (Switch)
  • Unifi US-8-150 (Switch)
  • 3 x Dell PowerConnect 7048P (Switch)
  • Netgear ProSAFE GS108Ev3 8-Port

For most of my networking equipment, I run Ubiquiti Unifi equipment. This is marketed as “Enterprise” networking equipment, but imho, it is far from “Enterprise”. I would place it solidly in the “prosumer” line of networking equipment. Dont get me wrong, their WAP’s are pretty awesome. But their switching and routing devices leave much to be desired. Their GUI is quite pretty and you can do enough to get by through it, but for really advanced setups, you are required to edit a json file. Often the editing of the json file is unsupported and a PITA the figure out.

For the rest of my networking equipment, I run some classic Dell PowerConnect switches. I run the 7048P’s. For the most part, I dont need the PoE feature, but for under $150 per switch, I couldnt not get the PoE feature. I just disable it on the ports where it is not needed. The language is pretty similar to Cisco so getting by in command line is my preferred way to manage these.

Oh, and I have a Netgear managed 8-port switch. This little guy has kept up with the other two brands of switches afaic. I like the little guy and it works great as an under the desk switch.

Home Lab Access Points

In this post I will cover the Access point that I use in my home, discussing wiring, port and physical placement.

The hardware access points I currently use are:

  • Unifi UAP-AC-PRO
  • Unifi UAP-AC-M-PRO
  • Unifi UAP-IW-PRO

For all my Wireless, I trust in the Ubiquiti Unifi line. They are a great “prosumer” product at a price that I can afford. And they definitely do their job for my home needs. I have even installed these at a few businesses with very solid results.

Home Lab Surveillance

In this post I will cover my Home Surveillance Solution using my Home Lab equipment.

Some of the equipment I use is as follows:

  • Home Server (Sometimes virtualized, sometimes standalone)
  • BlueIris NVR Software
  • Reolink IP Cams
    • RLC-410
    • RLC-411
    • RLC-420
    • RLC-423
  • HikVision IP Cams
    • DS-2CD2142FWD-IS 4MP
  • Ring Pro Doorbell

When I first got into the surveillance game, I was purchasing Hikvision IP Cameras from a specific re-seller in my area. Since then, Reolink has become quite a mainstream prosumer product and I can get them from Amazon. So as of late, all of my Reolink cams have been purchased from random amazon sales.

Overall I enjoy both cams, but prefer the Reolink branded cams over Hikvision.

As for the Ring Pro Doorbell. I got it because it’s easy for the wife to use and not answer the door if she doesn’t want to. I have it on a “security device” vlan, so it is segmented off. I actually do enjoy the device. It is nice having something in the cloud separate from Blue Iris.

Home Cat6 Cable Wiring

In this post I will go through what it takes to wire up your home with Cat6 cabling. This is currently an ongoing process for me and may be for some time yet to come.
The materials you will need to complete wiring in your house are as follows:

  • Cat6 cabling
  • RJ45 Cat6 Jacks
  • RJ45 Boots
  • RJ45 Crimping tool
  • RJ45 Punch Down tool
  • Cat6 Wall Plates with Jacks
  • Pull String

Wiring your house is a process. If you have unlimited amounts of money, then hire a company to do it and they will charge you a few grand to go in there and get it done. They will most likely run the cables in a manner that works, but is not tech approved bc they are dudes who just know how to run cables, not why they are run or consequences of how they are run. If you are like me where money is not an endless pit of fun and you like having control over things, then you will want to take on wiring yourself. Overall you can do this for a fraction of the cost compared to contracting it out, but it will be a lot of work and sometimes, a complete, PITA. If you live in Texas like me, only plan on doing this kind of work from late October through late April… It gets hot in there.

Overall, I have found wiring my house to be quite rewarding, both financially and emotionally. I am able to “put a stamp” on my work and be proud of what I have done.

]]>
WordPress Permissions for Windows /blog/wordpress-permissions-for-windows/ Tue, 26 Feb 2019 03:08:00 +0000 /blog/?p=662

So I have had this post sitting in the “Draft” stage for years now. Probably 3 or 4. I thought I was going to tackle this and set something definitively out there for some people to follow. And today I will finally do just that.

Here are the suggested WordPress file permissions for Windows:

RUN LINUX!

RUN LINUX!

RUN LINUX!

]]>
Identify Failed Port and Replace NIC /blog/identify-failed-port-and-replace-nic/ Tue, 26 Feb 2019 02:03:15 +0000 /blog/?p=958

This past week, I had a failed port one one of my C2100’s. The specific part was a Intel PRO/1000 VT Quad Port Gigabit PCI-E Ethernet Network Adapter (HM9JY). Now just one single port failed and I was using all 4 ports for iSCSI from my FreeNAS C2100 to my esxi cluster. Luckily I have 4 ports so naturally MPIO is configured and I didnt notice the failure immediately. I first noticed this in my cluster and also saw the port was failed in FreeNAS. Since there is no OMSA for BSD, I was unable to gather more information about the status of the port.

This is how I noticed the failed port on an esxi host

I went onto ebay and ordered the new part for $20 with free shipping. It came in today and I took some time to replace it this evening. It is a pretty simple process, I will walk you through it below.

The first things I am going to do is power off my server and then remove all the cabling from it. Some people choose to not remove networking when doing this, but I am running PoE switches, and even though PoE has been disable on the ports, I dont trust it. I remove all potential of electricity running through the system other than the CMOS and RAID batteries.

So, Power off your server, remove all the cabling, pull it out of the rack and remove the cover.

The new part looks like this. It will just slide right into a PCIe slot and I will screw it in.

Here we are with the top open.

I am going to pull out that part in the upper left hand corner to replace.

Here is the empty slot that we will plug back into.

The top device  is the one I pulled out and replace.

It is the top device due to the photo orientation and the fact that I pulled it out of the server. When I put it back in the server, it will “on the bottom”. I find placing NIC card below RAID card make it easier to unplug booted cables from the server.

Now that the NIC has been replaced, all iSCSI paths are available!

]]>
Configure and Run vCheck /blog/configure-and-run-vcheck/ Thu, 22 Jun 2017 20:16:50 +0000 /blog/?p=844

vCheck is a PowerShell HTML framework script that started with one guy, but is now a community driven and from what I have seen, it’s pretty neat.

vCheck can be configured to just run once, or as a scheduled task on a Windows box. It also offers the option of sending the report via email. With those two features coupled together, you can set up a daily environment scan to run an hour or two before you get to work each morning and have a nice HTML report in your inbox of what changed and/or broke since you left the night before.This tutorial covers the installation and configuration of the vCheck tool.

Programs Needed:

Download and Extract vCheck with Powershell:

$ZipPath = "C:\vCheck\vCheck-vSphere-master.zip"
$Destination = "C:\vCheck\"

IF (-not (Test-Path -Path "$Destination"))
{
    New-Item -Path $Destination -ItemType Directory -ErrorAction SilentlyContinue
}

iwr https://github.com/alanrenouf/vCheck-vSphere/archive/master.zip -OutFile "$ZipPath"
Add-Type -assembly "system.io.compression.filesystem"
[io.compression.zipfile]::ExtractToDirectory($ZipPath, $Destination)

Load PowerCLI (open the Program)
Login to vCenter Server

Connect-VIServer

– or –

Connect-VIServer VCENTER.DOMAIN.COM -User DOMAIN\Administrator -Password -SaveCredentials

Run vCheck ps1 file

& "C:\vCheck\vCheck-vSphere-master\vCheck.ps1"

- or - 

. "C:\vCheck\vCheck-vSphere-master\vCheck.ps1"

You will then be asked to respond to the following prompts:

# Report header [vCheck]:
# Would you like the report displayed in the local browser once completed ? [$true]:
# Display the report even if it is empty? [$true]:
# Use the following item to define if an email report should be sent once completed [$false]:
# Please Specify the SMTP server address (and optional port) [servername(:port)] [mysmtpserver.mydomain.local]:
# Would you like to use SSL to send email? [$false]:
# Please specify the email address who will send the vCheck report [me@mydomain.local]:
# Please specify the email address(es) who will receive the vCheck report (separate multiple addresses with comma) [me@mydomain.local]:
# Please specify the email address(es) who will be CCd to receive the vCheck report (separate multiple addresses with comma) []:
# Please specify an email subject [$Server vCheck Report]:
# Send the report by e-mail even if it is empty? [$true]:
# If you would prefer the HTML file as an attachment then enable the following: [$false]:
# Set the style template to use. [VMware]:
# Do you want to include plugin details in the report? [$true]:
# List Enabled plugins first in Plugin Report? [$true]:
# Set the following setting to $true to see how long each Plugin takes to run as part of the report [$true]:
# Report on plugins that take longer than the following amount of seconds [30]:

Connection settings for vCenter
# Please Specify the address (and optional port) of the vCenter server to connect to [servername(:port)] [192.168.0.0]:
# Maximum number of samples to gather for events [100000]:

General Information
# Set the number of days of DRS Migrations to report and count on [1]:
# Set the number of days of Storage DRS Migrations to report and count on [1]:

Windows vCenter Error Event Logs
# Set the number of days of VC Events to check for errors [1]:
# Set the number of days of VC Event Logs to check for warnings and errors [1]:

vCenter Sessions Age
# Enter maximum vCenter session length in hours [48]:
# Enter minimum vCenter session length in minutes (IdleMinutes) [10]:
# Do not report on usernames that are defined here (regex) [DOMAIN\\user1|DOMAIN\\user2]:

vCenter License Report
# Enable License Reporting? [$true]:

HA configuration issues
# HA Configuration Issues, do not report on any Clusters that are defined here [Example_Cluster_*|Test_Cluster_*]:
# HA should be set to ... [$true]:
# HA host monitoring should be set to ... [$true]:
# HA Admission Control should be set to ... [$true]:

HA VMs restarted
# HA VM restart day(s) number [5]:

DRS & SDRS Migrations
# Set the number of days of DRS Migrations to report and count on [1]:
# Set the number of days of Storage DRS Migrations to report and count on [1]:

Cluster Slot Sizes
# Number of slots available in a cluster [10]:

Datastore Consistency
# Do not report on any Datastores that are defined here (Datastore Consistency Plugin) [local*|datastore*]:

Clusters with DRS disabled
# Clusters with DRS Disabled, do not report on any Clusters that are defined here [VM1_*|VM2_*]:

QuickStats Capacity Planning
# Max CPU usage for non HA cluster [0.6]:
# Max MEM usage for non HA cluster [0.6]:

s/vMotion Information
# Set the number of days to go back and check for s/vMotions [5]:
# Include vMotions in report [$true;]:
# Include Storage vMotions in report [$true;]:

DRS Rules
# Display VM affinity rules? [$true]:
# Display VM anti-affinity rules? [$true]:
# Display HOSTaffinity rules? [$true]:
# Set DRS Rule name exception (regex) [ExcludeMe]:

Hosts Overcommit state
# Return results in GB or MB? [GB]:

NTP Name and Service
# The NTP server which should be set on your hosts [pool.ntp.org|pool2.ntp.org]:

VMKernel Warnings
# Disabling displaying Google/KB links in order to have wider message column [$true]:

Syslog Name
# The Syslog server which should be set on your hosts [syslogserver]:

Disk Max Total Latency
# Disk Max Total Latency Settings in Milliseconds [50]:
# Disk Max Total Latency range to inspect (1-24) [24]:

Lost Access to Volume
# Set the number of days of Lost Action Volume to report and count on [1]:

Check LUNS have the recommended number of paths
# Set the Recommended number of paths per LUN [2]:

ESXi Inode Exhaustion
# Set the ESXi filesystem free Inode threshold in percent [40]:

Host Profile Compliance
# Show detailed information in report [$true]:
# Show compliant servers [$false]:

Hosts with Upcoming Certificate Expiration
# How many days to warn before cert expiration (Default 60) [60]:

Datastore Information
# Set the warning threshold for Datastore % Free Space [25]:
# Do not report on any Datastores that are defined here (Datastore Free Space Plugin) [local]:

Number of VMs per Datastore
# Max number of VMs per Datastore [5]:
# Exclude these datastores from report [ExcludeMe]:

Datastore OverAllocation
# Datastore OverAllocation % [50]:
# Exclude these datastores from report [ExcludeMe]:

Datastores with Storage IO Control Disabled
# Do not report on any Datastores that are defined here (Storage IO Control disabled Plugin) [local]:

VSAN Datastore Capacity
# Set the warning threshold for VSAN Datastore % Free Space [85]:

VSAN Configuration Maximum Disk Group Per Host Report
# Enable VSAN Config Max Disk Group Per Host Reporting? [$true]:
# Percentage threshold to warn? [80]:

VSAN Configuration Maximum Magnetic Disks Per Disk Group Report
# Enable VSAN Config Max Magnetic Disks Per Disk Group Reporting? [$true]:
# Percentage threshold to warn? [50]:

VSAN Configuration Maximum Total Magnetic Disks In All Disk Groups Per Host Report
# Enable VSAN Config Max Total Magnetic Disks In All Disk Groups Per Host Reporting? [$true]:
# Percentage threshold to warn? [50]:

VSAN Configuration Maximum Components Per Host Report
# Enable VSAN Config Max Components Per Host Reporting? [$true]:
# Percentage threshold to warn? [50]:

VSAN Configuration Maximum Hosts Per VSAN Cluster Report
# Enable VSAN Config Max Hosts Per VSAN Cluster Reporting? [$true]:
# Percentage threshold to warn? [45]:

VSAN Configuration Maximum VMs Per Host Report
# Enable VSAN Config Max VMs Per Host Reporting? [$true]:
# Percentage threshold to warn? [50]:

VSAN Configuration Maximum VMs Per VSAN Cluster Report
# Enable VSAN Config Max VMs Per VSAN Cluster Reporting? [$true]:
# Percentage threshold to warn? [50]:

Checking Standard vSwitch Ports Free
# vSwitch Port Left [5]:

Checking Distributed vSwitch Port Groups for Ports Free
# Distributed vSwitch PortGroup Ports Left [10]:

vSwitch Security
# Enable Checking of vSwitch security settings? [$true]:
# Warn for AllowPromiscuous enabled? [$true]:
# Warn for ForgedTransmits enabled? [$true]:
# Warn for MacChanges enabled? [$true]:

Snapshot Information
# Set the warning threshold for snapshots in days old [14]:
# Set snapshot name exception (regex) [ExcludeMe]:
# Set snapshot description exception (regex) [ExcludeMe]:
# Set snapshot creator exception (regex) [ExcludeMe]:

Created or cloned VMs
# Set the number of days to show VMs created for [5]:

Removed VMs
# Set the number of days to show VMs removed for [5]:

VMs with over $vCPU vCPUs
# Define the maximum amount of vCPUs your VMs are allowed [2]:

VMs restarted due to Guest OS Error
# HA VM reset day(s) number due to Guest OS error [5]:

Guests with less than $MBFree MB
# VM Disk space left, set the amount you would like to report on MBFree [1024]:
# VM Disk space left, set the amount you would like to report on MBDiskMinSize [1024]:

Checking VM Hardware Version
# Hardware Version to check for at least [8]:
#Adding filter for dsvas, vShield appliances or any other vms that will remain on a lower HW version [vShield*|dsva*]:

VMs in inconsistent folders
# Specify which Datastore(s) to filter from report [local]:

No VM Tools
# Do not report on any VMs who are defined here (regex) [VM1_*|VM2_*]:

VM Tools Issues
# VM Tools Issues, do not report on any VMs who are defined here [VM1_*|VM2_*]:

Removable Media Connected
# VMs with removable media not to report on [APP*|ETC*]:

Single Storage VMs
# Local Stored VMs, do not report on any VMs who are defined here [Template_*|VDI*]:

VM CPU %RDY
# CPU ready on VMs should not exceed [10.0]:

VM CPU Usage
# VM Not to go over the following amount of CPU [75]:
# VM CPU not allowed to go over the previous amount for how many days? [1]:

Find VMs with thick or thin provisioned vmdk
# Report on disk formats that are not "thin" or "thick", which format is not allowed? [thick]:
# Specify Datastores to filter from report [local]:

Virtual machines with incorrect OS configuration
# VMs with incorrect OS Configuration, do not report on any VMs who are defined here [VM1_*|VM2_*]:

Powered Off VMs
# VMs not to report on [Windows7*]:

Unwanted virtual hardware found
# Find unwanted virtual hardware [VirtualUSBController|VirtualParallelPort|VirtualSerialPort]:

Mis-named virtual machines
# Misnamed VMs, do not report on any VMs who are defined here [VM1_*|VM2_*]:

VM - is my network connected?
# Only show NICs that are set to Connect at Startup [$true]:

Reset VMs
# Set the number of days to show reset VMs [1]:

Snapshot activity
# Set the number of days to show Snapshots for [5]:
# User exception for Snapshot removed [s-veeam]:

VMs with CPU or Memory Reservations Configured
# VMs with CPU or Memory Reservations, do not report on any VMs who are defined here [VM1_*|VM2_*]:

VM Logging
# The number of logs to keep for each VM [10]:
# The size logs can reach before rotating to a new log (bytes) [1000000]:

VM Tools Not Up to Date
# Do not report on any VMs who are defined here (regex) [VM1_*|VM2_*]:
# Maximum number of VMs shown [30]:

NonPersistent Disks
# Exclude all desktop virtual machines [^DV-|^MLB-]:

VMs Memory/CPU Hot Add configuration
# Should CPU hot plug be enabled [$true]:
# Should Memory hot add be enabled [$true]:

Site Recovery Manager - RPO Violation Report
# SRM RPO Violations: Set the number of minutes an RPO has exceeded to report on [240]:
# SRM RPO Violations: Only look for RPO events on VMs with these names: (regex) []:
# SRM RPO Violations: Report on unresolved RPO violations only? [$true]:

Once you have completed the prompts, the scan will run and a report will be generated.



		
]]>
Cmdlet for PowerCLI to load vCenter & esxi Hosts /blog/cmdlet-for-powecli-to-load-vcenter-esxi-hosts/ Wed, 24 May 2017 20:46:53 +0000 /blog/?p=822

Powershell & PowerCLI Prep

#Set Execution Policy

Set-ExecutionPolicy RemoteSigned

#Ignore SSL Certificates warnings

Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -WarningAction SilentlyContinue

#Connecting to server & save creds:

Connect-VIServer vCenter.DOMAIN.com -User DOMAIN\Administrator -Password -SaveCredentials

#Location to open up PowerCLI normally:

. "C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Scripts\Initialize-PowerCLIEnvironment.ps1"

CMDLET

function Load-PowerCLI
{
Add-PSSnapin VMware.VimAutomation.Core -ErrorAction SilentlyContinue
Add-PSSnapin VMware.VumAutomation -ErrorAction SilentlyContinue
Add-PSSnapin VMware.DeployAutomation -ErrorAction SilentlyContinue
Add-PSSnapin VMware.DeployAutomation -ErrorAction SilentlyContinue
& "C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Scripts\Initialize-PowerCLIEnvironment.ps1"
Write-Host "================================================" -ForegroundColor White
Write-Host "
...connecting to vCenter servers
"
Connect-VIServer vCenter0.groffbox.com
}

BONUS:

Set the VMConsole to open correctly with Open-VMConsole Window

#Download and Install 32-bit Firefox, you NEED 32-bit
#Run:

Set-PowerCLIConfiguration –VMConsoleWindowBrowser “C:\Program Files (x86)\Mozilla Firefox\firefox.exe”

Now you can run Open-VMConsoleWindow

]]>
Powershell On Linux /blog/powershell-on-linux/ Fri, 19 Aug 2016 16:38:59 +0000 /blog/?p=635

You can now use Powershell with Linux Operating Systems!

See instructions below on how to set up your Linux distro with Powershell

Source

CentOS / RHEL

Install wget (if not already installed):

sudo yum install wget -y

Download PS to the temp folder:

wget -i /tmp/ https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell-6.0.0_alpha.9-1.el7.centos.x86_64.rpm

Install PS:

sudo yum install powershell-6.0.0_alpha.9-1.el7.centos.x86_64.rpm -y

Ubuntu 14.04

Install necessary packages:

sudo apt-get install libunwind8 libicu55

Download PS to the temp folder:

wget -i /tmp/ https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell_6.0.0-alpha.9-1ubuntu1.14.04.1_amd64.deb

Install PS:

sudo dpkg -i powershell_6.0.0-alpha.9-1ubuntu1.14.04.1_amd64.deb

Ubuntu 16.04

Install necessary packages:

sudo apt-get install libunwind8 libicu55

Download PS to the temp folder:

wget -i /tmp/ https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell_6.0.0-alpha.9-1ubuntu1.16.04.1_amd64.deb

Install PS:

sudo dpkg -i powershell_6.0.0-alpha.9-1ubuntu1.16.04.1_amd64.deb

OS X 10.11

Download and run this with the GUI:

Powershell OS X Download

If you wish to use the terminal, first download the .pkg and run:

sudo installer -pkg powershell-6.0.0-alpha.9.pkg -target /

Running Powershell in Linux

Run “powershell” from the terminal.

Get-Command to list available commands

]]>
PS Script install WP manually on Server 2012 R2 /blog/ps-script-install-wp-manually-server-2012-r2/ Thu, 14 Jul 2016 22:23:07 +0000 /blog/?p=548

This post does basically the same thing that I have already covered in my “WordPress on IIS 8.5 (Windows 2012 R2)” post, but it is a script that does literally everything for you. You will just need to add in a few of your own settings into the script, run it, and you will have a functional WP site.

First lets start of with the Features that I already have installed:

You will most likely have all of these but Telnet… INSTALL TELNET!

 

DisplayName                                   Name                      InstallState
-----------                                   ----                      ------------
File and Storage Services                     FileAndStorage-Services      Installed
Storage Services                              Storage-Services             Installed
.NET Framework 4.5 Features                   NET-Framework-45-Features    Installed
.NET Framework 4.5                            NET-Framework-45-Core        Installed
WCF Services                                  NET-WCF-Services45           Installed
TCP Port Sharing                              NET-WCF-TCP-PortSharing45    Installed
SMB 1.0/CIFS File Sharing Support             FS-SMB1                      Installed
Telnet Client                                 Telnet-Client                Installed
User Interfaces and Infrastructure            User-Interfaces-Infra        Installed
Graphical Management Tools and Infrastructure Server-Gui-Mgmt-Infra        Installed
Server Graphical Shell                        Server-Gui-Shell             Installed
Windows PowerShell                            PowerShellRoot               Installed
Windows PowerShell 4.0                        PowerShell                   Installed
Windows PowerShell ISE                        PowerShell-ISE               Installed
WoW64 Support                                 WoW64-Support                Installed

 

NOTES:

  • Use https://api.wordpress.org/secret-key/1.1/salt/ to generate your Salt Keys… After they have been generated, you must replace any “$” character with any other character. Not just this script, but WordPress will not work if there is a “$” character in the salt keys.
  • You will be asked for some variables, they are as follows:
Variable Example
IIS Site Name MyWordpressSite.com
IIS App Pool Name MyWordpressSite.com
Directory Path for website C:\inetpub\wwwroot\MyWordpressSite
Database Name wordpress612
Database Username wordpressuser612
Database Password mysecretpassword612
MySQL root Password v9gvBhTG@*b6n#^!v
FTP Username FTPUser
FTP Password FTPPass123!
  • You can download check out the progress of the script on my Github and you can download it with the following icon:

ps1_Icon

Now for the Script

<# 

    .SYNOPSIS
    Install a new WP site with all pre-reqs using pre-set variables. Can be used for additional sites.
    
    .DESCRIPTION
    This script will create a WordPress site with known-working configurations.
    Script can also be used to add additional sites as checks are in place. 
    To customize site, update custom variables as desired. 
    CAUTION - this script will overwrite a current site
        
    .OUTPUTS  
    A new wp site ready for your configuration! ;-)
     
    .NOTES
    Author: Michael Groff
    Minimum OS: 2012, 2012 R2
    PS Version: 4.0
    Date:  1/12/17
    
#>

#Checking Powershell Version

$LocalPSVers = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine\").PowerShellVersion | Where-Object {$_ -gt "4"}

IF (-not$LocalPSVers)
{
    Write-Host "
You need to upgrade to atleast PS Verion 5 before running this script!
" -ForegroundColor Red
    Read-Host "Press enter to exit"
    BREAK
}
ELSE
{
    Write-Host "
Correct Powershell Version found, you are good to go!
    " -ForegroundColor Green
}

###
###Variables Start: 
###
#Site Name, must inclue the TLD (.com, .info, .net, etc.)
Write-Host "
The website name, must inclue the TLD (.com, .info, .net, etc.)
" -ForegroundColor Yellow
$iisAppName = Read-host -prompt "Enter the website name"
#IIS App Pool Name: 
Write-Host "
The iis app pool name, can be same as website
" -ForegroundColor Yellow
$iisAppPoolName = Read-host -prompt "Enter the iis app pool name, can be same as website"
#Site Path
Write-Host "
The suggested website root directory path is 'C:\inetpub\wwwroot\MyWordpressSite'
" -ForegroundColor Yellow
$directoryPath = Read-host -prompt "Enter the Website root directory path"
#Database Name
Write-Host "
The WordPress Database is a MySQL Database
" -ForegroundColor Yellow
$dbn = Read-host -prompt "Enter the WordPress Database Name"
#Database Username
Write-Host "
The WordPress Database User is a MySQL User
" -ForegroundColor Yellow
$dbun = Read-host -prompt "Enter the WordPress Database Username"
#Database User Password
Write-Host "
The WordPress Database Password should be a strong password, minimum 12 characters
" -ForegroundColor Yellow
$dbpw = Read-host -prompt "Enter the WordPress Database User Password"
#MySQL root password
Write-Host "
The  MySQL root password, this will create one if it doesnt exist
" -ForegroundColor Yellow
$MySQL = Read-host -prompt "Enter the MySQL root password"
#Salt Keys - https://api.wordpress.org/secret-key/1.1/salt/ (NOTE: Replace any $ that you see with another character!)
#Authentication Key
$AuthKey = "ry=,b*Gp,+1-voDYM`zq#:S_^ODN Lp9:_:&D5o6C%0SXsyi

		
]]>
WordPress on IIS 8.5 (Windows 2012 R2) /blog/wordpress-iis-8-5-windows-2012-r2/ /blog/wordpress-iis-8-5-windows-2012-r2/#comments Sun, 24 Jan 2016 05:11:12 +0000 /blog/?p=43

The Manual Installation and Configuration of WordPress and all accompanying components on Windows Server 2012 R2

WordPress “Requirements”

  • PHP 5.6 or greater
  • MySQL 5.5 or greater
  • The mod_rewrite Apache module

– You can find the requirements more depth directly from the WordpPress page: WordPress Requirements

We are going to use:

  • WordPress Version 4.3.1
  • PHP 5.4
  • MySQL 5.5
  • IIS URL Rewrite
NOTE: This tutorial assumes you have turned off IE Enhanced Security and Enabled downloads in IE
And that you have set up DNS correctly or modified your hosts file with your domain name

Prep

Windows Roles and Services

First we need to install the proper Windows Roles and Services, some IIS add-ons and MySQL

Roles:

  • Web Server (IIS) – Add features that are required and Include management tools (if applicable)

Features:

  • .NET Framework 3.5 Features – Add features that are required and Include management tools (if applicable) – Note: this includes .net 2.0 for PHP Manager that we will install later
  • SMTP Server – Add features that are required and Include management tools (if applicable) *This will not be covered
  • Telnet Client (you dont need it for wordpress, but you should always have this installed for testing)

Role Services for IIS: (leave the default and add the following)

  • Health and Diagnostics:
    • Logging Tools
    • Request Monitor

Wordpress Installation 1

 

  • Application Development:
    • ASP.NET 4.5 – Add features that are required and Include management tools (if applicable)
    • CGI

Wordpress Installation 2

IIS add-ons (PHP, URL Rewrite,

Open IIS, click on your server, and a pop-up box will ask you if “…you want to get started with Microsoft Web Platform…” Click Yes, then proceed to download and install the Web Platform Installer.

Wordpress Installation 3

Close IIS and the re-open it, now you will see the Web Platform Installer

Wordpress Installation 4

Open the Web Platform Installer and Install the following:

  • PHP 5.4.24, this will install:
    • Microsoft Drivers 3.2 for PHP v5.4 for SQL Server in IIS
    • IIS Manager
  • URL Rewrite

Wordpress Installation 5

Click Finish and close IIS as we are done with that for now.

MySQL

Now we are going to Download & Install MySQL 5.5.45 and MySQL Workbench.

NOTE: If you know how to run mysql from the command line, the more power to you, this is for Windows. We are going to use a feature of my sql that incorporates a windowed GUI, hence the name

Links to Downloads: MySQL Server & MySQL Workbench

First install MySQL 5.5.45 and at the end of the installation, leave the box checked and you will enter the Instance Configuration.

Choose the Standard Configuration option, click Next

Wordpress Installation 6

Choose the Install As Windows Service option, name it, and then click Next

Wordpress Installation 7

Set your root password and click Next

Wordpress Installation 8

Last click Execute

Wordpress Installation 9

Now to install MySQL Workbench. I will let you figure this one out. Hint: Download the prerequisites.
At the end of the install, make sure you launch MySQL Workbench before you click Finish

WordPress

Download WordPress and unzip it to C:\inetpub\wwwroot, so you should see the following:

Wordpress Installation 10

That concludes the prep for a WordPress site to be built, now we need to start the actual configurations.

Configuration

IIS Configuration

Create a new website in IIS, and fill out the fields appropriately:

  • Site Name: MyDomain WP Site (arbitrary, just make it identifiable)
  • Physical path: C:\inetpub\wwwroot\wordpress (the folder we extracted earlier)
  • IP address: Depends on the IP’s on your server, I have one so all unassigned is fine.
  • Host name: www.mydomain.com

Wordpress Installation 11

Add in an additional binding for non-www: http, All Unassigned, Port 80, and mydomain.com

Wordpress Installation 24

Move the Default Document for index.php to the to of the list:

Wordpress Installation 12

Create a URL Rewrite rule as follows:

  • Rule Name: WordPress (or whatever you want, this is arbitrary)
  • Match URL:
    • Requested URL: Matches the Pattern
    • Using: Wildcards
    • Pattern: *

Wordpress Installation 13

  • Conditions:
    • Is Not a File
    • Is Not a Directory

Wordpress Installation 14

  • Action:
    • Action type: Rewrite
    • Rewrite URL: index.php
    • Append Query String: Check

Wordpress Installation 15

Create another URL Rewrite rule as follows:

  • Type: Canonical domain name
  • Select the primary host name: www.mydomain.com

After both rules have been entered, your URL Rewrites should look similar to the following:

Wordpress Installation 16

Additional, recommended configutations:

  • Stop your site, there is no reason to have it running.
  • Set up Recycling for App Pool:
    • Time: 4:00 AM (or whenever your site is least active, and remove the check for Regular Time Intervals)
  • Edit PHP.ini file (C:\Program Files (x86)\PHP\v5.4\php.ini):
    • Old Line: post_max_size = 8M
      • New Line: post_max_size = 1024M
    • Old Line: ;upload_tmp_dir =
      • New Line: upload_tmp_dir = C:\inetpub\temp
    • Old Line: upload_max_filesize = 2M
      • New Line: upload_max_filesize = 1000M
    • Old Line: max_file_uploads = 20
      • New Line: max_file_uploads = 200
    • Add Modify Permission the C:\inetpub\temp

 

MySQL Configuration

Open MySQL and log into the instance we created previously.

First thing you will want to do is change the default character-set-server variable to UTF8 as UTF-8 supports any language.

Wordpress Installation 17

Restart MySQL for the settings to take, or just make sure you manually set the collation of you DB to UTF8 in the next step. (Powershell command: Restart-Service MySQL)

Next we are going to create your WordPress Database.

Right-click on the blank space under the test DB and choose Create Schema…

Wordpress Installation 18

Give your Schema/DB an appropriate name, I will use mydomainwpdatabase

Wordpress Installation 19

Next, create a user for that database. I will use mydomainwpdbuser, and give that user full permissions to the Schema/DB that you just created. It will look similar to the following:

Wordpress Installation 20

Wordpress Installation 21

And that concludes the database configuration, we are almost done, just a couple more steps.

WordPress Connection Configuration

Navigate to C:\inetpub\wwwroot\wordpress and copy your wp-config-sample.php in the same folder, then rename it wp-config.php

Then you will need to make the following changes to that file to allow your WP site to connect to the database.

========================================

// ** MySQL settings – You can get this info from your web host ** //
/** The name of the database for WordPress */
define(‘DB_NAME’, ‘mydomainwpdatabase‘);

/** MySQL database username */
define(‘DB_USER’, ‘mydomainwpdatabaseuser‘);

/** MySQL database password */
define(‘DB_PASSWORD’, ‘mydomainwpdatabaseuerpsswd‘);

/** MySQL hostname */
define(‘DB_HOST’, ‘localhost’);

/** Database Charset to use in creating database tables. */
define(‘DB_CHARSET’, ‘utf8’);

/** The Database Collate type. Don’t change this if in doubt. */
define(‘DB_COLLATE’, ”);

========================================

WordPress Login

You are ready to start your site, navigate to IIS and start it up (or restart it, if it has been up this whole time). Then browse to the site in IE and set up the admin creds as you see fit.

Wordpress Installation 22

You are done!    Just log into your site and start configuring your new WordPress Site.

Wordpress Installation 23

Additional Setup for WP

Suggested WP Plugins

Suggested WP Settings Changes

Settings > General Settings

  • Site Title
  • Tagline
  • Membership
  • Timezone

Settings > Discussion

  • Deselect – 

Settings > Permalinks

  • Common Settings > Post name (or whatever makes the most sense for your site)

 

]]>
/blog/wordpress-iis-8-5-windows-2012-r2/feed/ 1
Set a Static IP on your ESXi Host /blog/set-a-static-ip-on-your-esxi-host/ Thu, 17 Sep 2015 07:09:19 +0000 /blog/?p=384 Set a Static IP on your ESXi Host V5.5

Assigning a static IP to your ESXi host is extremely easy to do, and is highly recommended as you will always want your host to have the same IP.

  • Notes:
    • If your network is set up without DHCP, then you will have to do this from the physical server itself, or the KVM.
    • When assigning a static IP to the host, make sure that you do not assign an IP that has already been used if your network does have DHCP enabled.
    • If you do not set up a static IP, you will likely have issues when you reboot the host or your router reboots.

 

For this tutorial, I am making the changes from the host’s console itself, as setting a Static IP is one of the first things to do in the configuration of a new host  

First Click on F2 Customize System/View Logs:

Set a Static IP on your ESX Host_01

Enter the password for the root user when prompted and hit Enter:

Set a Static IP on your ESX Host_02

 

Choose the third option, Configure Management Network, and hit Enter:

Set a Static IP on your ESX Host_03

 

Again, choose the third option, IP Configuration, and hit Enter.
Here you will change the option to Set static IP address and network configuration: and hit the Spacebar to apply that option. Then enter the fields for the IP address appropriately and hit Enter to apply those settings:

Set a Static IP on your ESX Host_04

 

Next scroll down to the DNS Configuration option and hit Enter.
Here enter the appropriate DNS information for your server:

Set a Static IP on your ESX Host_05

 

Hit Escape to exit this screen and then hit Y to apply the changes and restart the management network:

Set a Static IP on your ESX Host_06

 

Now hit Escape again and you will be back at the main screen and you will now see the Static IP and some of the DNS information that you just configured:

Set a Static IP on your ESX Host_07

 

You’re done, now you can go back to your computer, and access your ESXi host from the newly assigned IP.

]]>
VMware ESXi 5.5.0 on Dell C2100 FS12-TY /blog/vmware-esxi-5-5-0-on-dell-c2100-fs12-ty/ Thu, 17 Sep 2015 06:18:09 +0000 /blog/?p=41

The Installation and Basic Configuration of VMware ESXi 5.5.0 on Dell C2100 FS12-TY

Server Specs:

  • Dell PowerEdge C2100 FS12-TY
  • 2 x 2.13GHz Intel(R) Xeon(R) CPU E5506
  • 6 x 4GB RAM – Total 24GB’s of RAM
  • RAID Controller – SAS 6iR
    • 4 x 250GB WD RE 4 HDD’s

I have already set up my RAID Array as follows:

  • 2 x RAID-1 (mirror) Virtual Disks setup

For this install I am using the Dell Customized Image of ESX as it fixes known issues and loads drivers for Dell PowerEdge systems. Google if you don’t have the customized Image.

First you need to install the Dell Customized Image onto a USB. I use Rufus on a Windows PC to do so. See the settings I chose for Rufus below:

(Download Rufus)

ESX_Install_Dell_C2100_1

 

Eject the USB from your OS and go plug it into your C2100 and boot it up.

The first thing you will see when your USB is finally booting, after the BIOS and RAID controller info, is the following image:

Hit (Enter) on the Installer:

ESX_Install_Dell_C2100_2

 

Next ESX will proceed to boot into the installer, you will see the following two screens load all the way through and disappear:

ESX_Install_Dell_C2100_3

 

ESX_Install_Dell_C2100_4

 

Once those two screens finish loading we will begin the installation.

On the following screen hit (Enter):

ESX_Install_Dell_C2100_5

 

Then you will need to read through and agree to the EULA by hitting (F11) to proceed with the installation:

ESX_Install_Dell_C2100_6

 

ESX will then scan attached devices that it can install on:

ESX_Install_Dell_C2100_7

 

Select the USB drive that you inserted, not your Virtual Disks, and hit (Enter):

ESX_Install_Dell_C2100_8

 

ESX will scan the drive again and then hit (Enter) to confirm the USB drive will be overwritten:

ESX_Install_Dell_C2100_9

 

ESX_Install_Dell_C2100_10

 

Next select your keyboard layout and hit (Enter):

ESX_Install_Dell_C2100_11

 

Type in the password for the root user twice and hit (Enter):

ESX_Install_Dell_C2100_12

ESX will scan yet again, and when that is finished hit (F11) to initiate the installation of ESX onto the USB:

ESX_Install_Dell_C2100_13

 

ESX_Install_Dell_C2100_14

 

ESX will begin to install and once it is finished hit (Enter) to reboot the server and complete the installation:

This may take a couple minutes.

ESX_Install_Dell_C2100_15

 

ESX_Install_Dell_C2100_16

 

ESX_Install_Dell_C2100_17

 

After the reboot, ESX will boot into the following screen:

NOTE: For this tutorial I have DHCP enabled so ESX already has an IP issued to it, but you will want to set this to a static IP for many reasons, so I have covered this in my post: Set a Static IP on your ESX Host

ESX_Install_Dell_C2100_18

Now go back to your computer, open a web browser, and browse to the IP that we saw in the previous step and you will see the following page:

ESX_Install_Dell_C2100_19

 

Click on the “Download vSphere Client” link and Install that on your local computer.

Once VMware vSphere Client is installed, open it, and fill in the fields appropriately.

  • IP address / Name: IP of ESX Host
  • User name: root
  • Password: Password you created

ESX_Install_Dell_C2100_20

 

You will be prompted by a Security Warning, check the check-box for Install this certificate and do not display security warnings for “Your IP”. Then click Ignore

ESX_Install_Dell_C2100_21

 

Next you will come to a screen like the following:

First thing you will need to do, is create a datastore. To do so, click on the blue link, click here to create a datastore…:

ESX_Install_Dell_C2100_22

This will bring up the following window, where you will choose the Disk/LUN option and click Next:

ESX_Install_Dell_C2100_23

 

Select one of the disks that you would like to create a datastore out of and click Next:

NOTE: I selected one of the two RAID-1 Arrays I set up prior to this tutorial

ESX_Install_Dell_C2100_24

 

On the next screen leave the VMFS-5 option selected and then click Next:

ESX_Install_Dell_C2100_25

 

Confirm the disk layout settings by clicking Next:

 

ESX_Install_Dell_C2100_26

Name your datastore with a naming scheme that you see fit. I have named mine VM1-RAID1. Then click Next:

ESX_Install_Dell_C2100_27

Leave Maximum available space selected, unless for some reason you are not applying all the RAID-1 to this host, and click Next:

ESX_Install_Dell_C2100_28

Click Finish to create the datastore:

ESX_Install_Dell_C2100_29

 

Next we are going to add an image to the datastore so we can create Virtual Machines off of that image.

In the VMware vSphere Client click on the Configuration tab and then click on Storage under the Hardware Section.
Here you will right click on your new datastore and click Browse Datastore…:

ESX_Install_Dell_C2100_30

 

Create a folder in the root of that drive named Images and then click the Upload Icon and choose Upload File…:

NOTE: You can also choose to set up an NFS datastore to store your .iso and other bootable files. If you choos to go that route you can skip this step. I have already covered how to accomplish this in my tutorial: How to create and ESX Datastore from a Windows NFS Share

ESX_Install_Dell_C2100_31

 

Once the .iso, for whatever OS you have chosen, has finished uploading, you will simply right-click on your host and select New Virtual Machine…, and proceed to set up your VM according the the specs that you need.

ESX_Install_Dell_C2100_32

 

In the last step of creating the VM, where the tab on the left reads Ready To Complete and you have a Finish option, check the check box for “Edit the virtual machine settings before completion” and then click Continue.

In the popup window you will need to browse to the New CD/DVD (Adding) section and then select Datastore ISO File to Connect at power on. You are going to want to click Browse… and browse to the .iso that you previously uploaded, then click Finish.

ESX_Install_Dell_C2100_33

That is it, wait for your VM to create and then power it on.

Once you power it on, you can open the console and set up network connectivity to the server as it meets your needs.

NOTE: After you complete the installation of whatever OS you chose, you will want to go back into setting, and set either set this setting to “Client Device” or remove the check next to “Connect at power on”.

 

If you have any questions, please contact me through the site.

]]>