避免停機! 無縫的網站/博客移動-車輛定位系統聖經#19

English 英國(更改)
  • Digg
  • Twitter
  • Technorati
  • del.icio.us
  • Facebook
  • MySpace
  • Reddit
  • StumbleUpon
  • LinkedIn
  • email

設置非託管車輛定位系統(4新成員) -第19部分:移動天! 如何移動您的博客或網站

服務器機櫃圖片

遷徙你的網站或博客,以新的服務器以最小的問題或不便。 本指南的步驟證明了搬遷程序。

當我提出我的網站從我的共享主機我的嶄新的車輛定位系統在Linode,這是對我的關注,特別是我有一個不斷變化的數據庫。 洗毛網絡,我發現了一些很少,但沒有詳細說明,也沒有教程,給了我信心。 所以我問了Linode論壇,這一過程制訂了下面是一個重溫的意見,賦予這種鄉親,因此有我自己的經驗。

成立了一個非託管車輛定位系統(4新成員).. 聖經的車輛定位系統

在20個複製/粘貼操作.. 從零到英雄,空白方塊可愛的Linux服務器。

向下的全系列指數。

所以,嘿,下跌共享與虛擬萬歲!希望有所幫助。the_guv

.. 因此,對於這個過程中,你應該感謝Linode論壇用戶btmorex,Lykaon,kirbysdl和hybinet。

本指南是指共同對車輛定位系統移動,但可以適用於任何服務器到服務器移動。

一是建立,自助服務

別告訴你的老主機,你打算搬走。

註冊一個新的Web主機

如果你不知道什麼類型的主機你的需要, 車輛定位系統聖經第1部分:車輛定位系統(虛擬專用服務器)隊共享隊專用將幫助您選擇。

如果你要非託管車輛定位系統的路線,請閱讀本聖經從頭到腳。 如果您是託管,對於其他的本指南中,我假設你已經建立的框。 對於共享,管理車輛定位系統或專用,你的箱子是建立無論如何,所以讓我們跳過。

創建DNS記錄

基本上,這告訴服務器來查找一個域。

如果你的新主機不允許DNS配置,這是非常不好。 否則你的共享服務器,在這種情況下你得到什麼您支付。 對於那些誰可以執行DNS管理..

添加DNS記錄在你的控制面板等,例如,與Linode或Slicehost這樣做了,在DNS管理器。 你可以向車輛定位系統聖經第9部分:添加域區到您的車輛定位系統的細節,說明視頻。 讓一切真正低的TTL(生存時間)值。 如果您有任何MX或其他DNS記錄與您現有的主機,複製的。

不要擔心,這不會使您的域名解析到新的主機過早,但它準備遷移。

雙舊網站或博客

重複您的網站或博客的文件結構,在新的服務器,創建和連接任何數據庫,並在您的數據導入。

網站及博客設置資源

大多數這些教程的視頻指南,以及複製/粘貼操作方法。 注意:有些是Nginx的中心,但是這通常被視為最有效的Web服務器無論如何。

修改Hosts文件來測試網站或博客

頂技巧,這一點。 你可以改變一個文件在您的電腦您的URI重定向到新的服務器,只為你。 這並不影響原來的網站,還是其總流量(除非他們已經改變了他們的主機文件呢!)

視窗

轉到我的C:“窗口”> system32>“驅動程序”等,並打開主機使用文本編輯器。

Linux的

後藤等“開放的主機使用文本編輯器。

蘋果

我不知道。 請lemme知道!

你會知道它是正確的文件,因為這將有1項或2如: -

127.0.0.1	localhost

... and that is the format you want for the new lines you have to add to the file. So add something like:-

12.34.56.78  domain.com
12.34.56.78  www.domain.com

... swapping the IP for your new IP, and the domain for yours.

Upon saving the file, when you surf to domain.com, instead of taking you to your old server, it will take you to the new one, and you can fully test your site's functionality.

(I told you that was top ;) )

NOW TEST YOUR NEW SITE'S FUNCTIONALITY.

But don't administer the wrong site: after testing, don't forget to delete the new hosts entry, else comment it out with a # at the beginning of the line. And restart your web browser.

Resolve Email

Move your email accounts from your current host.

If you want a simple, spam-free solution with no web server resource cost (ie no personal mail server), check out the VPS Bible Part 18: Google Apps for Domain-Specific Email .

Test your email.

Create A or AAAA Records

This is the key to a seamless move, which is particularly important if, for example, you host a forum or receive a lot of blog comments.

What we're going to do is to set up your new host to resolve the domain call to your old host. Basically, this eliminates the possibility of writing to more than one database while, for example, the nameservers propagate or Google's global servers refresh your new domain details.

In the new server's DNS settings, add two A/AAAA records using these guidelines:-

Hostname IP TTL (Time to Live)
domain.com old web host IP address shortest option
www.domain.com old web host IP address shortest option

When you save your options, you may find one of the hostname fields is blank. That's normal.

Point Domain to Nameservers

Goto your domain registrar account and look for the Nameserver option. Renew the data.

For example, with Linode, bless, change to ns1.linode.com, ns2.linode.com, ns3.linode.com and ns4.linode.com. You'll find your new web host's nameserver details easily enough.

Now we are awaiting full propagation, at all server points around the world. I have no idea how long that takes, but about 72 hours is generally reckoned, so allow for 4-5 days to be safe.

MOVING DAY!

Go back to those A Records we created, replacing the old host IP to your new host IP. Set the TTL to the shortest possible 'time to live'. But before you click OK ..

Take a final backup of your old database and import the data into your new one.

.. And now you can click OK on those new A records.

While your A record changes will update the new host nameservers within minutes, it takes up to 72 hours for full web-wide propagation. You may find new data records in the old database, so you'll have to export and import those strays.

Note: At Linode, updated DNS records take effect every 15 minutes. So if you edit an 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.

Final Checks

If you completed the previous testing properly, there should be no surprises. Then again ..

After the time period specified in the TTL, check your site to ensure everything works. Because your local nameservers may not yet have resolved with the new A record data, and so that you can be sure you're looking at the new, not the old, web application, use the host file trick.

Shed Shared, Viva Virtual!

Whatever kind of web host you've moved to, you can cancel the old host 4-5 days after moving day. Your breathing will gradually shallow out. Take tea!

Virtually Done

This series is pretty much complete, and I'm definitely gonna be spending more time down the pub.

However, as a round-up, VPS Bible Part 20: Blogroll, Links, Credits, Resources will list some of the best resources on the web for anything Linux or VPS. Plus it's a bit of a thank you to all those whose advice has helped me to go from VPS newbie, a few months ago to, well, senior newbie. Hey, you be the judge, but I sure ain't a sysmin.

By way of a follow up, and as promised in VPS Bible Part 17: Nginx Control Panel Workarounds , I'll be publishing some appendix guides too, showing you how to administer your VPS without relying on bloatware like cPanel.

Here's the you-know-what ...


SETUP an Unmanaged VPS (4 Newbies) .. The V-P-S Bible

Serve multi sites & blogs on a budget .. at the fastest possible speed .. with the least downtime .. in the most secure environment .. and future-proofed for easy admin.

That's what the VPS Bible is about, stepped out in simple copy & paste guides.

From high traffic WordPress blogs to startup web hosts, here's what you need.

Set it up?   Click here for the 21 part follow-up .. V-P-S Admin

  1. * Includes video tutorial.

  2. Not linked = not published. Won't be long. Fix a feed for updates.


If you liked that ...
... maybe you'll like these?

.