Best Linode Setup Procedure - (newbie alert)

I'm setting up my first Linode, and command lining for almost the first time, so I thought I'd get that lack of qualification out of the way :shock:

What I want to do is, first of all, see if I can get a rough copy of my website to work, without moving it from the current webhost yet, nor redirecting the nameservers.

Then, I want to move everything over, using Linode to host my primary website, essentially a wordpress blog, complete with email, all protected. I'm interested to move my domain registrations here as well. Down the road, I am likely to add some further websites to my slice. Should I allow for that now, somehow?

The concern I have is really how to make a seamless transition to Linode, from my current shared server. I wonder if there is any order in the setup procedure that I should be wary of, to help everything work as my server environment matures.

So far, with a zillion browser tabs open to help:-

  • I've designated Intrepid and updated it, added vim-nox and a language pack

  • added a user, creating an admin group for that user

  • run visudo and given the admin group carte blanche

  • installed my SSH keys for Putty and feel very proud about that

  • drank some coffee, had a beer and annoyed the wife!

But I read at Victor's blog - http://awebfactory.com.ar/node/275 - when he moved Drupal over, that one of the first things he did was to point his domain name at his new Linode. Must I do that, yet?

Plus, at this useful tipsheet - http://wiki.slicehost.com/doku.php?id=s … nrails.org">http://wiki.slicehost.com/doku.php?id=slicesetupfrom_onrails.org - it says…

  • make sure /etc/hosts has hostname in it for 127.0.0.1

  • vi /etc/hosts

  • 127.0.0.1 localhost localhost.localdomain …and I understand that Victor's tip comes first, with that secondary advice straight after. Is that right? (Sorry, exceptionally newbie question there.)

Or can I somehow run my required LAMPP stack and then add that specific domain information…and later repointing the domain, when everything is looking good and I am more confident with my learning curve.

Perhaps I am worrying a little more than is necessary.

I run XAMPP on this local machine, so I'm not entirely ignorant, just mostly.

Many thanks for any pointers.

10 Replies

How many comments do you usually get? If it's not many than a smooth migration is really simple. Basically:

1.) Copy over all your site files.

2.) Backup/restore the database to the linode.

3.) Make sure it's working by browsing to the linode's ip address.

4.) Update dns so that your domain points to the linode.

The only problem with that procedure is if the content on your blog is getting a lot of updates (comments). Your DNS probably has a time-to-live of a day or so, which means that visitors might be getting the old site for a day after you switch it over. If they comment, their comment would basically be lost.

So, if you want to make sure you don't lose any comments in that period, you could:

1.) lower the TTL on your dns entries as low as you can or even set them to 0 so there is no caching at all.

2.) wait a day so that you know everyone has the new TTL on dns.

3.) bring down your site. (have your shared host respond with something like 503 - under maintenance for any request)

4.) Copy site content/database to the linode.

5.) update dns so it points to your linode.

Do steps 3-5 as quickly a possible.

That way you're guaranteed to not lose any comments at the cost of a slightly more involved migration and having your site down for a very short period (probably <20 minutes).

You can't move your domain registrations to Linode, because Linode doesn't do domain registrations. You should keep your domain where it is, and just change the nameservers to Linode. Of course you need to set up your domain with the DNS manager first.

If your current host takes care of your email, you should be very careful when you move things around or you could end up losing all your email. For now I recommend that you use something like Google Apps (or the equivalent in Yahoo or Live) instead of trying to host your email on your own server. Saves you a lot of hassle until you're more confident about server management.

Here's the most seamless move that I can think of:

1. Set up your linode, point an arbitrary subdomain at it, copy your data over, and make sure that everything works on the subdomain as it should. (Some software have the nasty habit of remembering the domain they're on, so watch out for that.)

DON'T TELL YOUR CURRENT HOST THAT YOU INTEND TO MOVE AWAY, YET.

2. Create some DNS records in Linode's DNS manager. Give everything a really low TTL value, and point your domain at your CURRENT HOST'S IP ADDRESS. If you have any MX or other DNS records with your current host, replicate them too.

3. Move your email accounts (if any) off of your current host.

4. Change your nameservers to ns1, ns2, ns3, ns4.linode.com. This will take about 24 hours to take effect, and in the meantime your site will still be accessible at your current host, because both your old and your new nameservers are pointing there.

5. While you wait for your nameserver change to propagate, edit your server's virtual host configuration and restart Apache so that it is ready to accept connections to your real domain rather than the subdomain mentioned in (1). Lots of newbies make mistakes at this stage, leading to their main domain not loading after the move. If you want to test this procedure before actually moving the domain over, practice with another subdomain or two.

NOW IT'S MOVING DAY!

6. Shut down your old site if possible (in order to prevent users from posting things in the middle of your move), and copy the most recent version of your files and databases to your linode. If possible, use rsync to minimize copying time.

7. Edit your DNS records so that your domain now points to your linode's IP address.

Note: At Linode, updated DNS records take effect every 15 minutes. So if you edit a record at 2:32, it'll take until 2:45, plus the time period specified in the TTL, for the update to be visible to the world. Careful timing will give you the least downtime.

8. After the time period specified in the TTL, check your site to see if everything is working properly. Make a small change to your site on the linode in order to distinguish it from the old site. This way, you'll know which one you're looking at.

9. If everything is okay, after a couple of days, cancel your account with your current host.

You can add more sites at any time in the future, by simply adding a virtual host to your Apache configuration. Heck, once you know what you're doing, it's even simpler than messing with cPanel!

You can always test your virtual domains by editing your hosts file. In windows, it's located at:

C:\windows\system32\drivers\etc\hosts

From there you can basically 'override' what DNS says a domain name resolves to, so from your computer you will go to your linode IP address rather than the real address of your site.

This way you can test your site on the linode exactly like it will be when the DNS is really pointing there.

It's absolutely the best and easiest way to verify your configuration for software packages like wordpress that make decisions based on their domain names.

Good luck!

.

@Lykaon:

You can always test your virtual domains by editing your hosts file. In windows, it's located at:

C:\windows\system32\drivers\etc\hosts

From there you can basically 'override' what DNS says a domain name resolves to, so from your computer you will go to your linode IP address rather than the real address of your site.

This way you can test your site on the linode exactly like it will be when the DNS is really pointing there.

It's absolutely the best and easiest way to verify your configuration for software packages like wordpress that make decisions based on their domain names.

Good luck!

Oh yeah, that nice little trick…… or /etc/hosts if you're on Linux. But you absolutely need to undo those changes && restart your browser when navigating to your REAL site. Too many of us are susceptible to the simple mistake of trying to administer the wrong site! See the second part of my 8. above…

guys, thank you. all that makes perfect sense. really appreciate the hand-holding. will have to google TTL though :) but I think I get the general idea.

i'm minded to set up EHCP, which i've been comparing with ISPConfig.

WHEN all goes well, i'll knock together a crib sheet of the best resources i've found for this operation.

damn, can't wait to be off a shared host…

One more tip related to the above suggestions for lower downtime and data loss:

Many blog engines allow you to disable certain features. You might want to see if Wordpress (or a Wordpress plugin) can allow you to disable comments globally while you switch things over. In effect, you're running the site in "read only" mode on the old host while you stand up the site in "read/write" mode on Linode. Then as DNS propagates the new Linode-hosted IP, people automagically recover the ability to comment and otherwise make changes. In the meantime, there's no perceived downtime and no data loss.

Dunno, just a thought. =)

that's a cracking tip, Kirbysdl…many thanks. You read my mind, as it happens, chewing over that very thing.

My linode is on the way now, nginx'd to the hilt. Don't seem to have slept much this week ;)

@the_guv:

My linode is on the way now, nginx'd to the hilt. Don't seem to have slept much this week ;)

How are you liking nginx? Have you used it a lot before or is it new to you? I've been thinking of ditching Apache and trying something more lightweight. Lighttpd seems a bit too "dirty" but apparently nginx is a lot more stable and well-coded (fewer memory leaks etc.) Any thoughts would be most appreciated! =)

(Feel free to PM if this is getting too off topic.)

Hi kirbysdl,

Well, it's very early days. But it's resolving 3 mock-ups happily, and will have 10 sites (mainly shells), unless something really screws up and I have to revert to Apache.

The reason I went with it was because it looks to be faster than Apache - less bloated, more urgent, with only 4 core modules…

…but that's really just what I've read. The benchmarks swayed me, as did some overarching suggestion along the lines of "Used Windows? Hate irrelevant services? Want that again? Then swap Apache for Nginx."

But the proof is in the pudding, so we'll see. I've a long way to go before I can advise with authority, and I've been happy with Apache on XAMP. I just didn't know what I was using till this week!

But I will write about this experience, with pretty much the prosumer review angle, and all the cool links. Won't forget, I've got a blog to fill, and rather fancy some linode/ubuntu/njinx content.

Meantime, oh dear, it's gonna be another loooong night.

One thing. I'm not that bothered about a control panel now. What's the point? I built a system using ECHP, but every action took so long to perform. Must be becoming a CLI junkie. I couldn't go without FileZilla though, on that secure whatnot SSH thing. Needed some visual crutch.

Have to say, big cheers again everyone for your above input. I have those transitionary points well mapped out in my head now - and in a text doc! - and, simple logic as they would seem to the heads around here, they make up some of the best advice I've found.

PS the missus is getting mighty fed up ;)

well, after a CLI crash course, I've got my site http://guvnr.com up and am really pleased with the result, and my choice of Linode.

Big cheers for the advice, guys. The move was incredibly smooth.

For reference, after playing with a few distros, I settled for:-

  • Ubuntu 8.04.2 LTS (Hardy Heron)

  • nginx

  • Google Apps, although that's a temporary measure.

My site is quite heavy on jQuery, and is way faster than it was on my shared server at Lunarpages.

OK, now to resume blogging :) I'll blog a piece about my Linode setup and will post a link in the how-to section, as and when.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct