Tag Archive for 'MySQL'

Invest in a good webhosting

After two years with the same host, I realised that I wasn’t satisfied with their service. I’d often get spike lags, down times for no reason which was frustrating. But you can’t expect an overselling web hosting to provide a service of high quality. Everything come down to a price.

I believe that by buying my own web server (dedicated) I did the best decision I could because now I have total control over it. No one is limiting my usage (in term of sql query, bandwidth, cpu usage, etc). The only down side is that I have more management to do, but I like that down side since I wanted to learn about web hosting, and specifically how I could do it myself.

Here’s a quick tutorial of what I did:

1. Installed the operating system
I opted for Fedora, which is a solid solution based on Red Hat.

2. Install Apache/PHP/MySQL
Those are the easiest to setup, mostly because they are pretty much correctly setup from the beginning, so issuing a small

yum install httpd mysql php

would do the trick.

3. Install mail
This was a bigger problem than expected. Installing a mailing software is not as easy as you’d thought it would. I’m not going to go into much detail but if you aren’t familiar with software installation, I’d suggest you get a friend or someone who’s good at it to help you out, like I did.

4. Install mydns/Bind
Since you’re most likely going to act as a server, you need to be able to manage your domain name, but this is not necessary. I found that mydns was the easiest to setup and it works with mysql. Managing it is also a piece of cake.

5. Transfer
When your installation is complete, it’s time to transfer your data onto your new server. I had ssh access on my old server, so I simply did a

tar -cfv base.tar.gz /

in order to get all my stuff into a compressed archive.

I also did get a backup of my mysql databases with a simple

mysqldump –all-databases

With all that done, I simply put that stuff onto my new server and I was good to go.

Remember to always check out if everything is working fine. Some of the time, due to different server settings, thing may work while others may not. I often had to correct the permissions over the files I had transfered, which was a SMALL pain in the ass compared to the new control I have over my stuff.