Fork me on GitHub
 
 

Jumping into Cloud hosting

I recently decided to move my hosting to a cloud environment, which was a pretty daunting task since I didn’t really have any experience managing my own server, hopefully this article about my experience can help you do the same!

Why the cloud?

I’d been pretty happy with my previous host Heart Internet for a few years, I chose them because they we’re a UK based host, and their reseller account seemed perfect for me. Not that I resell a lot of hosting (although I was planning to at the time), but I have a few sites I need hosting for, and being able to setup and manage as many independent accounts as I needed, each with unlimited disk space and bandwidth for £40 a month seemed like great value for money.

But, being shared hosting, it had it’s limits. I couldn’t run a CRON job more than once an hour, I had to sign various legal agreements for every account I wanted to use SSH on (which I never once managed to actually get activated!), I was stuck with the PHP setup they wanted to use (although this was never really a problem), the speed of the server never seemed too impressive, and there was more down time than I would have liked.

Why not the cloud?

Cloud servers, on the other hand, have none of these limitations. I now have full access to the setup, I can change the OS, configure it how I like, and do with it as I please. On the other hand, the major downsides are that I can change the OS, configure it how I like, and do with it as I please! Aside from hardware or network problems, any downtime is my fault, and it’s my responsibility to fix it.

Unless you’re a developer, or have some unusual need for your hosting, Cloud probably isn’t the best choice for you.

But as it turns out, this isn’t as big an issue as I’d thought it might be.

Choosing a host

Since you choose your own setup for a cloud environment, there aren’t as many comparisons between hosts – you don’t need to pick one with the features like SSH or latest the PHP build etc., that’s all up to you.

I went with Rackspace, because they’re reasonably priced, have UK servers, and I’ve heard good things about their support (not that you get much with Cloud hosting, but still, good support is good support). They also have some handy things such as Cloud files and (optional) automatic daily backups of your cloud instance.

Choosing your OS

There’s quite a few options here, which may be limited by your host. My first choice was Redhat Linux, because a previous (non-cloud) host I’d used ran Redhat, and it seems to be the industry standard. I even paid the extra monthly licence for it for a while.

But, I’ve since changed to CentOS, which has no monthly licence fee. There isn’t really any major difference between the two, Redhat comes with YUM (which lets you automagically install things), whereas CentOS has up2date instead. However, as I’ll explain in a minute that shouldn’t really matter, so save your pennies and go with CentOS :)

Getting setup

The first things I tried (and don’t recommend you do), is doing it all myself, since that seemed to be the Cloud way.

While I was using RedHat, I logged in with SSH and ran ‘YUM installgroup “web server” ‘, and after saying yes to a few things and watching it do lots of stuff I didn’t understand, I had a fully installed web server and felt very please with myself. I dived into apache config files and went about learning how to configure the hosting all by myself.

Then, I learnt about webmin and installed that [sort of] automagically using YUM too. That made things a lot easier, but then I decided to go an even better way!

Getting setup, the proper way

I’d previous ignored using cPanel, because I looked at the single licence price of about £265 ($425) and thought, whats the point, I can do it all myself, and learning how to do it manually will benefit me in the long run, right? Well, yeah, maybe.

Then, someone pointed out that the licence I’d actually need for a VPS (aka, Cloud environment), was only ~£125 ($200), and I could get a cheaper monthly licence from a cPanel reseller! I figured a £10/month cPanel licence from buycpanel.com, plus the roughly £15/month for hosting was still far cheaper than the £40 I’d been paying for hosting previously, so, I gave it a go!

I deleted the Cloud instance I had, since cPanel comes with everything you need (PHP, MySQL, etc., so don’t install anything yourself), and went about installing cPanel.

Installing cPanel

To install cPanel, log into your sever with SSH as root, and set a hostname by typing:

# hostname your-domain.com

This shouldn’t be a domain you want to use as a publicly accessible site (although you can do that, it’s not recommended).

Then, run these simple commands:

# cd /home
# wget -N http://httpupdate.cpanel.net/latest
#
sh latest

Thats it. It’ll take a while, but that will install cPanel for you, and you’ll have  everything you need right there.

You can then log into cPanel using your root username and password at your-domain.com:2087.

cPanel will manage everything for you, you can even setup reseller accounts which can setup their own hosting accounts. And, it monitors the server for my common issues, and even restarts crashed processes!

Hopefully this will give you an idea what to expect if you jump into Cloud hosting, and get you setup in the quickest, easiest, and perhaps most affordable way. I’ll write another blog soon about some excellent add-ons I use to secure my server and monitor it to make sure it’s running smoothly.

Let me know if you found this helpful or not in the comments!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" cssfile="">