Showing posts with label server. Show all posts
Showing posts with label server. Show all posts

Wednesday, April 6, 2016

How to install WordPress locally on your Windows desktop using WAMP

Despite the love/hate (mainly hate) relationship I have with WordPress I have decided that I need to start gaining a better understanding of how it works. Rather than making changes online to a live website it would obviously be better to do this with an offline copy which is exactly what I aim to explain here: Installing WordPress on your desktop so you can work offline.

To run WordPress on any machine there are a few requirements:
  • PHP version 5.6 or greater
  • MySQL version 5.6 or greater OR MariaDB version 10.0 or greater
  • Server software such as Apache
This may seem like an intimidating list of software to source and download one-by-one, but that won't be necessary. This is where WAMP comes into play!

What is WAMP and why do I need it?
WampServer is a Windows web development environment. It allows you to create web applications with Apache2, PHP and a MySQL database. Alongside, PhpMyAdmin allows you to manage easily your databases. An all-in-one package which contains everything that WordPress requires so our lives had suddenly become much easier. There are other clients for Windows such as XAMPP with the biggest difference being that WAMP runs on Windows, XAMPP is multi-platform. Aside from that it's a matter of personal preference. They both provide you with an Apache-MySQL-PHP environment that runs pretty much the same under both systems.

Installing wampserver on Windows
Before installing WordPress you will need to download and install wampserver on your Windows desktop. Double click on the downloaded file and just follow the instructions. Everything is automatic. The WampServer package is delivered with the latest releases of Apache, MySQL and PHP. 

You will need to choose the installation directoy for WAMP - The recommendation being that you do not install to "Program Files" but instead install it in a folder in the root directory as there could potentially be some permissions issues. I installed it to C:\WAMP which worked fine. At one point during the installation, WampServer will ask for the location of the default web browser and text editor. WampServer will automatically choose notepad.exe and Internet Explorer as the default options but these can be changed if needed. 

Once the installation completes successfully you should see the 'W' icon in your notification area:

If you don't you will need to start wampserver by finding the entry in your start menu. On Windows 8 my entry looked like this:

Creating a database for WordPress to use
Before installing WordPress you will need to create a database that WordPress can use. To do this we will need to access one of the wampserver features named phpMyAdmin. Easiest method of accessing this is to left-click the wampserver icon and click on phpMyAdmin
This will open a new browser window to http://localhost/phpmyadmin with a login prompt. The default credentials here are root with no password. When you log in you may notice the big warning at the bottom of the page stating "You are connected as 'root' with no password, which corresponds to the default MySQL privileged account. Your MySQL server is running with this default, is open to intrusion, and you really should fix this security hole by setting a password for user 'root'." Sounds scary but this is not a problem as long as this is only a local installation. 

Click on the databases tab at the top of the page which will give you a list of the current databases and allow you to create a new database. In the 'Create database' menu enter a name for your database. I called mine 'wordpress' for simplicity sake:

Download and install WordPress on Windows
Don't worry we're almost there! Now it's time to go and grab yourself a copy of WordPress from their website: https://wordpress.org/download/

This will download a .zip file which you will need to unzip. Once unzipped you will find a wordpress folder which you will need to move to C:\WAMP\www. So my directory structure looks like C:\WAMP\www\wordpress. As soon as the copy completes you should be able to access WordPress via your web browser via http://localhost/wordpress. If you rename the wordpress folder to mysite then you would access it via http://localhost/mysite. You should be prompted to choose your language for WordPress.

WordPress will then inform you that it is going to create a wp-config file using the provided information in the following steps. If for any reason this automatic file creation doesn’t work, don’t worry. All this does is fill in the database information to a configuration file. You may also simply open wp-config-sample.php in a text editor, fill in your information, and save it as wp-config.php. 

One the next page you will need to enter your database details. Here is what mine looks like:
If you recall in the earlier steps I created a database named wordpress and we logged in using the default credentials of root and no password. If this works you can proceed to the next steps with a very friendly message:
All right, sunshine! You’ve made it through this part of the installation. WordPress can now communicate with your database. If you are ready, time now to…
Now we can proceed with actually installing WordPress!

On the next page it will ask you for:
  • A website title - What is the name of your website? I just named mine offline.
  • A username for logging in with
  • A password for the above username - You can use the default here if you want but I would never remember that. 
  • An email address
It doesn't really matter what you enter here since this will only be used for offline testing anyway. Again if you plan on actually using this to host a website for the outside world you will need to be more security conscious than I am being here.

If the installation succeeds you should then be brought to the login prompt where you will need to enter the username and password you just created. 

What now?
Whatever you want! You now have a fully functional installation of WordPress which you can use testing and offline development. Have fun!!

Saturday, June 27, 2015

Setting up the Plex container in unRAID 6

In this post I am going to discuss how I went about adding the Plex container in unRAID 6. It's a fairly straightforward process and didn't cause me many headaches thankfully. I was originally running the server from my desktop but that wasn't an ideal solution because I don't leave my desktop on all the time.





Enabling Docker

The first step involved here was enabling Docker. To do this you simply navigate to the Settings tab, click Docker, and then use the drop down menu to enable Docker. PlexMediaServer is one of the default docket templates that comes packaged by lime-technology in unRAID 6. Navigate to the new Docker tab and you will see a section named 'Add container'. From there you want to choose 'PlexMediaServer' under the limetech heading. 

There is only one required folder named 'config' for this docker but you're going to want add more. The config folder does exactly what it says on the tin - Stores the configuration settings for this particular docker. I originally made the silly mistake of pointing this folder to a directory on the flash drive running unRAID. As soon as I rebooted the server I lost all the configuration I had spent the previous setting up - bummer. So for this directory you're going to want to specify a directory on the array. I created a folder called 'DockerConfig'.

In order to add any media you will also need to specify these directories too. I added one named /movies pointing to /mnt/disk1/movies and another named /series pointing to /mnt/disk1/series. 

All that is left now it to allow unRAID to create the docker container. Simple as.


Configuring Plex

There wasn't a whole lot of configuration required with Plex assuming you only want to use it locally within your home. If you plan on streaming media externally you will need to setup remote access. There are three steps required in doing this. The first step required is to sign into your Plex account, assuming you created one. If not you will need to register an account. The second is port forwarding - By default Plex will use port 32400 but you can specify another port if you prefer. You will need to forward this port to the IP of your server. Lastly you need to edit the settings of your plex server for remote access and manually specify whatever port you chose by ticking the box to manually specify. 

Wednesday, June 24, 2015

unRAID 6 benchmarks

Now that I've got unRAID up & running I thought it would be interesting to run some benchmarks so I could determine what kind of speed to expect. I have purchased a gigabit switch and cat6a ethernet cables for wiring everything up so this as fast as I can get for now. The program I used to run these benchmarks is called 'CrystalDiskMark'. This is with two WD Red 3TB drives with one acting as a parity disk.


I don't think that's too bad considering I don't have a cache device set up yet. Still slower than my desktop mechanical drive for both sequential read and write speeds but I doubt I will notice the difference when it comes to real world usage - Hopefully anyway. Parity certainly had more of an impact on the speeds than I would have liked. My internal 1TB WD Blue mechanical drive clocked the below speeds. Much faster for sequential reads and writes but a hell of lot slower for the 4k metrics.


I'll probably revisit this in the future when I set up my cache device.

Sunday, June 21, 2015

Installing unRAID 6 on my HP Proliant Gen8 Microserver G1610T

In this post I am going to discuss how I went about installing unRAID 6 on my HP Proliant Microserver G1610T.


Downloading the unRAID image

Before going about installing unRAID I was under the impression that it would come in an ISO package like every other OS. However unRAID just comes as a package of files with a 'make-bootable' executable inside. Preparing the USB is easy! First of all your USB needs to be formatted to FAT32 and the volume label must be set to UNRAID in capital letters. 

Then simply transfer all the files to the root directory of the USB (i.e. not in a folder) and then run the 'make-bootable.bat' file as administrator. (Right click -> Run as administrator) A CMD prompt will appear just asking you to confirm you want to proceed - Press any button to continue and hey presto job done.



Now you just need to eject the usb from your computer, connect it to the internal USB slot of the microserver and boot it up. Mine booted into the USB straight away without editing any BIOS options. After successfully booting up I was able to navigate to http://tower from my desktop and was greeted with the unRAID web GUI. It really was that easy!



Licensing

Before you're able to do anything inside unRAID you need a license key. Upon first installation you're entitled to a 30 day evaluation period to test out the software. To activate your license navigate to 'Tools -> Registration'. You will need to enter in your email address so the license URL can be sent to you which you then paste into the box provided.



After that you're pretty much good to go! 

Saturday, June 20, 2015

New components for my HP G1610T Gen8 Microserver - Upgrades!

I decided it would be best to invest some more money into my microserver rather than trying to struggle through with the limited resources available in the server itself. I also needed some hard drives to full up the drive bays for my NAS. 


What did I buy?

2 x 3TB WD Red NAS drives
1 x 2 Port SATA Controller
3 x Cat6a ethernet cables
2 x 8GB ECC DDR3 RAM

The NAS drives will obviously going into the bays available at the front of the server so I can set up my NAS. As I only have two drives at the moment this means the array will only have 3TB usable space due to the parity disk. Realistically that is all I need to start with as my media collection is only about that large at the moment. The SATA controller card I bought because the internal SATA connector only runs at SATA I speeds while this PCI card runs at SATA III. This will be used to connect up my cache devices if I ever get around to implementing that. 

The requirements for running unRAID are pretty minimal compared to FreeNAS with unRAID only requiring about 1GB of RAM if you have the intention of running it as a pure NAS system. However once you start playing around with containers and virtualising machines you will understandably get tight on resources. With that in mind I decided it would be best to upgrade to 16GB RAM which is the most this machine will accept. This didn't come cheap at about €160 for the two stick set - ECC RAM is bloody expensive.

Lastly I decided to invest in some decent cat6a cables for connecting up my server and desktop to the network. I've been running on cat5e cables for quite a long time because in all honesty I just had no requirement for the additional benefits in cat6 cables. Now that I will be regularly transferring files to and from the NAS I felt the requirement for additional cable bandwidth.

Wednesday, June 10, 2015

Server requirements and my plans for the future

In my previous post I was pretty happy with my purchase of a HP Proliant Gen8 G1610T Microserver so I might finally be able to get working on ESXi. Today I am starting to have some doubts as I may have underestimated what I am looking for in a host.. 


Doubts about the Gen8 G1610T

Did I make the right choice?

By all means this is a great piece of kit and pretty good value too. The problem I have is that I want both a NAS and an ESXi host but working on an all-in-one solutions seems a little difficult to implement without issues. My original plan had been to install ESXi as my hypervisor and virtualise FreeNAS  (Or some other alternative) but it seems FreeNAS does not play nice when it is virtualised as it requires block level access to the drives to function properly. You can kind of force this by passing through (I previously mentioned GPU pass-through) the disks to the VM but I've heard mixed reviews about attempting this. Seems like some people got this working without issues while others are experiencing crashes, down time, etc.




If I did manage to successfully virtualise FreeNAS without any problems this still leaves me with a resource issue on the host. The recommended resources for FreeNAS are 1GB RAM for every 1TB of storage space. I was considering a 4 x 4TB array of WD Red drives but this leaves me with no memory available for the VMs. Even if I drop to 3TB drives this still only leave me with about 4GB of usable RAM to work with. Certainly not ideal and wouldn't allow for much wiggle room.

Then there is the financial cost to consider. Obviously the drives are going to be expensive but I had planned on doing this anyway so I consider this more of an investment. I think I would like to go all the way to 4 x 4TB which I believe is the maximum allowed on this server, but honestly 4 x 3TB would be more than enough. That isn't the main concern here though - the cost of the additional RAM is. Normal DDR3 RAM is pretty expensive nowadays although it is finally dropping in price. The problem is this server requires ECC memory or Error-correcting code memory. Unlike normally every day RAM this can detect and correct any internal corruption so it is mainly used in systems where a fault could be catastrophic such as financial services. Unfortunately this kind of technology demands a hefty price tag at almost twice the price of normal RAM - Over €150 for one of the cheaper Value RAM sets of 16GB (8GB x 2). 


So what is really needed?

This is the question I am asking myself. My original intention as a starting point was to set up a media server VM in ESXi including Plex and Torrenting as well as additional media library applications such as SickBeard. I thought this would be a good starting point as it isn't exactly out of my comfort zone. This would work great in combination with a NAS fileserver so I need to find out how best to implement this - Virtualised or otherwise. I believe FreeNAS has some plugins that can be used to support these features but I've heard far from happy reviews about these in terms of uptime and general issues with staying running. 



I definitely do want some sort of functional vSphere implementation as I want to gain my VCP certification this year if I can. I'm thinking at this point it might be best to build an ESXi whitebox to accomplish everything I want in terms of different VMs and NAS as it doesn't look like the Gen8 is going to be enough for my needs.. This could well be the beginning of a home lab... Stay tuned

Sunday, June 7, 2015

Screw it I'll just buy a server instead

Considering the level of difficulty I've been having with getting any hypervisor installed I just decided to give up on my original plan and buy a server. I came across an offer on HP Micro Servers where HP were offering €110 cashback on certain models. After I get my cashback the total cost will have be about €160 for the bare-bones server. How could I say no to that? Ordered on Wednesday night and it arrived this morning, happy days!

Introducing the HP Proliant Microserver G1610T

When I collected the box I was concerned because it looked like the box may have been dropped. The below image should explain what I mean. It looks like there is a handle of sorts on the box itself and it was ripped when I collected it - If this ripped while someone was carrying the box they more than likely would have dropped it. I have to admit I felt slightly panicky when powering it up for the first time...

When I finally removed the server from its box I was pleasantly surprised at just how small this thing is. I was expecting something a fair bit bigger but this fits cleanly on my desk. It's not a whole lot bigger than my hand! My whole setup looks pretty sweet now after some desk re-organisation. I might go into this in a separate blog post.
Stylish
Hand for scale

When it finally came time to power on the server I was nervous.. but for once things went my way and it booted up without issues! Setup was a breeze with HP's intelligent provisioning wizard. A few clicks of my mouse and I had it up and running ready to go. The only issue I encountered was trying to access the iLO console - For those of you that do not know what iLO is, it allows me to mange and interact with the server from my computer via a web browser. It's almost as if I have a monitor, mouse, and keyboard connected to the server. Really handy feature. I tried to give iLO a static IP address so I wouldn't have to go looking for it every time it changed with DHCP. However this IP address did not allow me to access the server, and I could not ping the address from the command line. A reboot of the server seemed to resolve this - DHCP had been re-enabled after the reboot and the new IP worked. I just changed this to static and all was well with the world! :)

What did not occur to me when I was buying the server was that there was no HDD included in it so there wasn't a whole lot I could do disappointingly. Some time in the next few days I will get around to installing ESXi using the internal USB slot and hook up the second SSD from my desktop for VM storage. I might finally get around to setting up some VMs! But let's not jinx it..