How to set up a Web Server?


Forum: water cooler
Topic: How to set up a Web Server?
started by: bigkahuna

Posted by bigkahuna on April 25 2005,02:45
I'm starting to give some serious thought to setting up my own internet web server.  I think I have almost all the hardware I need: a Pentium 133 notebook with 40mb ram, 2 gb hd and now DSL 0.92 fully installed.

I'm on a strict budget (yup, I'm poor  :(  ), but I think I can justify upgrading my dialup service to ADSL ($30/month) if I can host my 3 websites on it (which costs me about $18/month) and still access the internet (which I'm paying about $10/month).  My websites don't get alot of traffic (maybe 15-50 hits/day, with a max of about 500 hits on rare occasions).  Plus I think this will be a great learning experience.

So my questions are:
1.  Is what I'm thinking about doing possible or am I wasting my time and money?
2.  Can I use DSL as the host system's OS and use Apache, PHP, Perl, cron and mySQL on my lowly notebook computer?
3.  Will I be able to host my 3 websites (or possibly more) on this system?
4.  Will I also be able to network this host system with another system to access the internet?
5.  Can I use my existing 52kb hosting service to "experiment" and try to set up a "test" site or is this a waste of time?
6.  Any good tutorials / sites you might recommend to get me started?
7.  Any other tips?

Thanks very much,

Paul

Posted by cbagger01 on April 25 2005,04:00
1. Yes
2. Yes - but mySQL will be very demanding unless you get more RAM. RAM will be your limiting factor.
3. It should be possible with something like dyndns
4. If you have two network cards, yes.
5. Unless you can get more RAM or use a lighter database system, despite testing, it will be a waste of time.  Even with more RAM it will require many hours of configuration and tweaking.  You really have to like doing this kinda stuff or you will get frustrated and give up.
6. Nope.  But others have done similar projects here.  Try searching the DSL forums.
7.  First tip. By a cheap server-class computer and use it for hosting instead of an old notebook.  An old used Pentium 3 server class machine with 256MB of RAM can be had for under a hundred bucks.  Second tip, don't use a PC to do Internet Connection Sharing.  Buy a cheap home router instead. They have multiple wired and wireless ports, use less power and are already optimized for the task at hand.  For example, this week Compusa has a 4port Linksys wireless 11b router for $19.99 after rebates.  Check out  http://www.salescircular.com for similar deals.

Posted by bigkahuna on April 25 2005,04:40
Quote
Yes - but mySQL will be very demanding unless you get more RAM. RAM will be your limiting factor.

How much ram do I really need?  The mySQL database I have now is -really- small (less than a meg), but I hope to add a forum that will be substantially larger.  Or a "blog" instead of a forum?  Not sure yet.

Quote
First tip. By a cheap server-class computer and use it for hosting instead of an old notebook.  An old used Pentium 3 server class machine with 256MB of RAM can be had for under a hundred bucks.

I'd love to, but I'm kinda shy on bucks right now and I'm trying to get my wife to go along with this "project" so buying another computer is kinda out of the question for now.

Quote

Second tip, don't use a PC to do Internet Connection Sharing.  Buy a cheap home router instead. They have multiple wired and wireless ports, use less power and are already optimized for the task at hand.  For example, this week Compusa has a 4port Linksys wireless 11b router for $19.99 after rebates.  Check out  http://www.salescircular.com for similar deals.

Yes, this is what I was planning on doing.  Sorry I didn't include this in my original post.

What I think I'd like to do first is set up a simple, super cheap test website.  Just some simple html/php pages (no database) to run through a 52kb modem.  The idea is to get my feet wet and learn the basics.  Any other advice?

Thanks,

Paul

Posted by cbagger01 on April 25 2005,04:56
I can't say for sure what the magic number for enough RAM is for mySQL.

However, I can say that merely starting up the mySQL daemon (without any applications or database configuration) brought my 40MB system to its knees.

Your first order of business is to boot DSL with minimal memory usage for boot command:

fb800x600 noicons

and then do a hd install and create a 128MB swap partition or swap file.

Then you can work on getting mysql/php/etc up and running and even apache.

DSL is a Debian-based linux system, so it is possible to use apt-get to install applications if you Enable Apt or use Synaptic.

Once again, search the forums for something like:

keyword: Apache
ALL FORUMS
FROM THE BEGINNING or
NEWER

or other keywords like

php

or
mysql

keep in mind that the search function is an "OR" logic search so if you want to find 2 keywords, you need to enter them like this:

Apache AND MySQL


Also, you can do a simple php non-database web site from DSL without much trouble.  The builtin web server (Monkey) supports php that can be easily installed.

Posted by bigkahuna on April 25 2005,05:44
Thanks.

After a quick look at "Monkey", looks like it will be good enough for 2 of the 3 sites I've developed (only one is using a mySQL database).

I tried a search for info on "Monkey" and didn't find much (just a page on how to install PHP).  Any leads on docs for it?

I'm kinda getting excited, this is looking very possible...

Thanks,

Paul

P.S. - Thanks also for the "forum search" hint.  That helps alot!

Posted by Caspar_s on April 25 2005,17:41
http://monkeyd.sourceforge.net/docs/monkey+php.en.html
Ooops, I thought you were looking FOR setting up php.

What kind of docs do you need?

Posted by bigkahuna on April 25 2005,17:46
Since I'm a newbie, I was looking for some basic "how-to" info on Monkey.  I tried launching Monkey (I've got DSL 0.92 installed to my HD) and I heard the hard drive shuffle a bit but no application appeared.  Is that normal or did it fail to run?  I'm running DSL on a Pentium 133 notebook with 40 mb ram and 1 gb partitioned to DSL.

I'm also trying to figure out what PCMCIA NIC card I should get for this notebook.  It had a Fujitsu FM 10304/8 Ethernet Card (lost, but the Windoze drivers are still there) and still has a Montana 28.8 Modem (worthless to Linux since it's a Winmodem).

Thanks,

Paul

Posted by SaidinUnleashed on April 25 2005,21:44
Remember, DSL already has a full SQL implementation (SQLite).

It may be able to do everything you need, and it uses a LOT less memory than MySQL.

-J.P.

Posted by cbagger01 on April 25 2005,22:38
Monkey is a background server process, so it doesn't smile and wave to you when it is started. So yes, it is normal.

Once started, you should be able to visit your local website.

Open up Dillo, Firefox or links on the same computer and type:

< http://127.0.0.1 >

or

< http://localhost >

and you should see the default web page on you new server.

Posted by bigkahuna on April 25 2005,22:53
Quote
Remember, DSL already has a full SQL implementation (SQLite).  It may be able to do everything you need, and it uses a LOT less memory than MySQL.


I'll be darned, you're right!  I never noticed that before.  I don't think it will work for the one site I currently have using mySQL (it's using a "protected/compiled" script I purchased for that site).  But it might be usefull if I decide to add a forum to one of my sites.  Any "lite-weight" forum scripts out there?

Quote
Monkey is a background server process, so it doesn't smile and wave to you when it is started. So yes, it is normal.
Once started, you should be able to visit your local website.
Open up Dillo, Firefox or links on the same computer and type:
< http://127.0.0.1 > ...


Cool!  It works!  That was just too easy.  You wouldn't believe how hard it was to get Apache and mySQL working on my Windoze XP system for prototyping websites...  I'm -really- starting to like DSL, looks like it has darn near everything I need!

Now I'm looking for a PCMCIA NIC for this system.  Any suggestions?  I'm looking at a Netgear FA411 which looks like will work but is pretty slow...

Paul

Posted by SaidinUnleashed on April 25 2005,23:17
I haven't found a wired pcmcia nic that won't work with DSL.

Just go grab a cheap Netgear, Linksys, or 3com.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.