With dnspod and squid to build their own CDN full share _linux

Source: Internet
Author: User
This tutorial is facing the object of personal webmaster, so all aspects will strive to fool, so that everyone can understand. Of course, the prerequisite is that you need to have a studious heart, as well as perseverance.
On the other hand, this article basically does not involve the content of Windows, the whole system will be the architecture in CentOS Linux 5. Don't ask me why not windows, because Windows can only take one word to describe: rotten. Friends who don't like Linux, or who think Linux is difficult to learn, can stop here.
Some might ask, why Linux, not FreeBSD? Because FreeBSD no matter from the optimized configuration of the system, or the performance of the file system, are not suitable for beginners.
Previously said, this article is not a lot of technical basis for the personal webmaster, so the article will have the installation of Linux, basic operations and some things to teach you, so that you learn simple, time spent valuable.
Again, in the next time you will face a dark, full of English screen, please be prepared psychologically.


Note: This tutorial will * not * involve the following:

1. Dynamic content (such as BBS)
2. Large files (such as software download station software)

1th Chapter CDN and Intelligent DNS
1. What is a CDN
In short, a CDN is something that makes your site more accessible. For example, Netcom users visit you in the network of CDN server above a file, CDN system will determine whether the file has been requested, if requested, in the absence of failure, will be from the system's cache to read the file and return to the user. If this file has not been requested, the CDN will automatically retrieve the file from your primary server and then cache it in the CDN system and return it to the user.
See here, smart Friends will ask: If Netcom's CDN server, Access my primary server in the telecommunications speed is very slow, then is not the first time the user request this file will be very slow? Hey, congratulations, that's true. And, when the file is not fully cached to the CDN, all users accessing the file will have errors, such as the Web page open incomplete, file download to half. But as long as your site traffic is large enough, the impact on the user is insignificant.
Then there are friends who ask why the business CDN does not exist in this problem? Because, the commercial CDN has its own leased line, walks by itself. That's why the commercial CDN is so expensive to sell. Of course, how to go this route, build such a large CDN system, not within the scope of this article.

2. What is smart DNS, what is Dnspod
The principle of intelligent DNS is simple: When users parse a domain name, judge the user's IP, and then match the IP table inside the DNS server to see whether the user is telecommunications or netcom users, and then return the corresponding IP address to the user.
Dnspod is the website of Brassiere classmate, provides the free intelligent DNS service. You only need to change the DNS of your domain from the original registrar to dnspod, you can enjoy this service immediately.
Note: dnspod only provide domain name Intelligent Parsing Service, do not provide domain name also does not provide server, do not think that your domain name to Dnspod can become a double line.
2nd. Preliminary preparation

To continue with the steps that follow, you have to prepare the following items:
Domain Name A
Server two, telecom netcom each one, the general P4 can be more than 2G of memory
Blank DVD r+ CD-ROM (or CD-R 6 sheets)
DVD burner One (or CD RW burner one)

Then you also need to download the CentOS ISO image
Casually in the mirror below the address to pick one, temporarily no domestic, suggest hanging a thunderbolt slowly down

http://ftp.ncnu.edu.tw/Linux/CentOS/5.0/isos/i386/
http://ftp.cse.yzu.edu.tw/pub/CentOS/5.0/isos/i386/
http://ftp.cs.pu.edu.tw/Linux/CentOS/5.0/isos/i386/
http://ftp.tcc.edu.tw/Linux/CentOS/5.0/isos/i386/
http://mirror.mirr4u.com/centos/5.0/isos/i386/
http://mirror.tini4u.net/centos/5.0/isos/i386/
http://mirror.averse.net/centos/5.0/isos/i386/

After opening the URL above, you can find a filename similar to the following
Centos-5.0-i386-bin-1of6.iso
...
Centos-5.0-i386-bin-6of6.iso
These are CD images, a total of 6, download the disk comparison waste resources, so I recommend downloading the following DVD image
Centos-5.0-i386-bin-dvd.iso
No more nonsense to say, download back after the plate can be.

After that, make an arrangement for the resources, so here's a hypothetical:
Suppose the domain name is naizhao.com
Assuming that two servers, telecommunications server for a, Netcom's server is b
Assuming a server for content server, b server for CDN server, b server all the required content from a server to obtain
Suppose a server IP is the IP of the 1.1.1.1,b server is 2.2.2.2

OK, the things we need are basically ready when we get here. ISO may not have been downloaded well, no hurry, slowly hung, we first to the domain name DNS set good

(not completed, to be continued)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.