F1 Function One Webhelp
The Guide For Web Development

/28997

How to Start Your Own Web Server

Erebus
ryan@erebus.reno.nv.us

So you think you are ready to fire up your own web based Internet server? You have a business that you want to bring online for a reasonable cost? You are part of a club or community organization that is interested in getting wired, or you might be considering hosting web pages for other people? You have come to the right place!

There are many things a person should consider however before you plunge head first into the vast, confusing land of the Internet. You should ask yourself a series of questions: First, do I really need my own web server? What will be the primary purpose of my server? What operating system should I use for the web server? How much money should I invest in the hardware for the server? And finally, should my server be collocated? If you aren't sure how to answer these questions, read on!

Do I really need my own web server?

The answer to this question is generally "no." Internet Service Providers (ISPs) usually offer some sort of web hosting service where the content to your web site is stored on a server (which they administer) at the actual ISP. In this case, the ISP is "hosting" your web site. This setup works well for individuals or small businesses that are only willing to pay a small monthly fee. This fee varies, but is generally based on the amount of web space you are allocated on the ISP's server.

One downside to having your web site hosted by an ISP is that the URL (Universal Resource Locator) to your webpage will be something cryptic, such as "http://www.myisp.net/~joe/index.html" by default without paying another monthly fee to get your own registered domain name, such as "http://www.joe.com." Transferring the actual content (html files, images, CGI scripts etc) of your webpage to the ISPs server is another downside of having a hosted webpage service. Moving the content from your local workstation to the ISPs web server is generally done via a dial-up connection and a FTP (File Transfer Protocol) program. This transfer can be extremely slow over a conventional modem and can take a very long time if your website is very large. Uploading data to a third party server also poses a problem if your website is very dynamic and must be changed on an hourly basis.

Having your web site hosted by an ISP is the choice of the majority of individuals and small businesses. It is easy, cheap, and secure (generally). However, there are those business and savvy individuals that demand more from their web site (right on!). It is the rest of those people that this article will now cater to.

What will be the primary purpose of my server?

This is an important question because your answer will help you determine what hardware to purchase and how much money to spend on the server. Say, for example, that you are setting up a gaming web site on your own server that will be linked from many other very popular gaming sites. You should expect a very high amount of web traffic coming in from those other web sites. For your server to handle this load, it is going to have to be much faster, and have more RAM (Random Access Memory). However, not everyone that is setting up their own web server expects that many "hits" to their web site. For these people, cheap "hand me down" or used machines that are a few years old would work beautifully as a small web server.

Uptime, and stability are other important issues that should be of concern to you. If your web site is going to be a web based e-commerce business, uptime (how often the server is online) is very important to the success of your business and should be addressed in the purchase of your server.

This seems like a very trivial section in setting up your own server. But everyone's hardware needs differ in relation to the purpose of their web site. So the moral of the story: Know exactly what your web site will be about before you purchase any hardware, or a server.

What Operating System should I use for the web server?

Ah, we have come to the golden area of OS Wars! "Mine is better than yours!" "No its not, mine is cheaper than yours!" "No, my OS is faster than yours!" There are many things to consider when choosing an operating system (probably too many to address here), but it ultimately comes down to preference. Hopefully I can inform you what each OS is, and what their strengths are. This way, you can make your own informed decision on what you want your server to run.

It may not seem like it at first, but there are a myriad of choices for your server operating system. There are basically two major OS "camps" in my opinion. The Windows NT and MacOS camp, and the UNIX camp, which would include all the different UNIX flavors--IRIX, Solaris, Linux, HP-UX, Digital UNIX, *BSD (FreeBSD, NetBSD, OpenBSD) and many others. The later is always associated with rock solid, enterprise performance servers, while the former is usually associated with "user friendly," easy to setup, and administer servers. These two stereotypes are not always true however.

In my opinion, both WindowsNT and MacOS are easier to use "out of the box" than any UNIX variant. However, like anything else, power is sacrificed for user-friendliness. If you do decide to purchase new hardware for your server, x86, and Macintosh G3 machines will be cheaper than buying a UNIX based Sun Solaris, or SGI (Silicon Graphics) IRIX machine.

UNIX machines are all similar, but the system is much more difficult to learn than WindowsNT, or the MacOS. If you decide to go the UNIX route I would definitely set aside some time to learn about the OS and how to properly secure it (See my other article "Security Issues").

Another great OS solution is the Linux OS. It is a UNIX flavor that runs on many different hardware configurations. The fact that Linux runs well on older, slower machines makes it an excellent economical choice for a small web server. Linux is free too! No licenses! I have used Linux extensively, and highly recommend it for anyone with an old machine lying around that they want to turn into a web server.

Another economical OS choice would be the *BSD based operating systems. I will focus on FreeBSD, simply because it is the most popular. FreeBSD runs on almost any machine out there. It is cheap, and extremely stable as a web server or FTP server. Just look at http://www.cdrom.com! Another great UNIX solution for someone on a budget!

Lastly, there are the expensive UNIX OS's which only run on their respective company's servers such as SGI's IRIX, Hewlett Packard's HP-UX, and Sun's Solaris operating system. If you are planning on setting up a very large, complex web site that will be getting an extremely high amount of web traffic I would recommend these OS's. The hardware, and software is expensive but is probably worth it for the enterprise performance.

Confused Yet? You should be, deciding what operating system to run can be a very difficult decision. Again, ask yourself what the primary purpose of your web site will be, how much money you are willing to spend and go from there.

How much money should I invest in the hardware for the server?

Along with the cost of the actual server there are other things that need to be considered. First of all, will your server have a backup system? If you are going to be serving up data to your users and clients that is extremely important and needs to backed up either on a daily or weekly basis, I would consider getting an automated tape backup system. The software differs for each OS, but the idea is primarily the same--you schedule certain times when your database is completely backed up to a very large tape (20+GB). These tape backup systems cost anywhere from $2000 to $25,000 or even more. Only pay for what you need.

Another important piece of hardware for a server is the UPS, or the backup power supply. If downtime for your server is something that could potentially hurt your business, I would recommend investing in an automated UPS system that will keep your server running without a hiccup in the event of a power failure. You can spend anywhere from a few hundred dollars to thousands of dollars on a UPS system. Again, only pay for what you need. If you are running a relatively small server, a 300W 15-minute power backup would give you plenty of time to shutdown the server properly. If you are running a more mission critical server however, you will probably want to invest more money in this area. You could even go so far as getting gas-powered generators that have "hot-swappable" gas tanks to keep the server running without conventional power indefinitely.

The next thing you have to consider is your server's actual connection to the Internet. This is probably where you will be spending the most money. There are many different solutions to connect a server to the Internet. Some of these include: dial-up modem, single channel ISDN (64K), dual channel ISDN (128K), cable modem, xDSL, fractional T1, T1, OC-48 (T3), and fiber optic. Only pay for what you need. Ask yourself that question- "What will the primary purpose of my web server be?" and estimate how much bandwidth you will need. Obviously, the faster the connection, the more money you are going to be spending per-month. A fractional T1, or a full T1 line should be plenty for most people. If you are going to be serving up many downloadable files, and plan to have more than 500 users at once, a T3 would probably be more appropriate. Again, only pay for what you need.

Now lets deal with the actual server (yee-haw!). If you can get your hands on an inexpensive used system, that would be the ideal way to setup a small web server. To run WindowsNT web server, your will need at least 64MB RAM and a Pentium 100. The more users you plan on hitting your website the more RAM and processor power you will need. I would also recommend getting SCSI hard drive(s) for any server that serves many users at once. You can go ultra cheap on the rest of the system (monitor, video card, mouse keyboard etc) since those peripherals really have nothing to do with the web server.

You will be spending more money on the server if you decide to go the UNIX route (Solaris, IRIX, HP-UX, Digital UNIX etc.). Sun and Digital make excellent UNIX web servers. Their processors include much more level 1 and level 2 cache which speeds up things considerably. If you can afford one of these systems and are willing to learn a UNIX OS, that would be a way to go for a very stable server that would be able to handle plenty of traffic.

Should my server be collocated?

"Collocated? What the heck is that?" you say. It's pretty simple really: If your server is collocated, it means that you own the server, but it is physically located somewhere else (like at your ISP). This is the ideal way to setup a serious web server for most individuals or businesses. You can pick out exactly what kind of server you want, and what OS to run, but the ISP deals with your connection to the Internet. This can save money by not running a T1 line to your business and by not setting up costly T1 circuits or routers at your business or home. You will have to pay a monthly fee for the storage of your system though, which will probably be based on the physical size of the server. Bigger equals a larger monthly payment. If you have your server and a good local ISP, collocating the server would be the way to go.

Well, that's it! If you have read this far, I hope I have given you at least some insight into the process of setting up a web server. Just remember to ask yourself the questions I have gone over and only pay for what you need! But I am a cheap person. Heck, if you are made of money, get the best!

=) 'later
Erebus