# webserver/router on 350 Megahurtz machine?

## Jiokah

I have an old IBM Aptiva that I wanted to use as a webserver and router, and I was hoping to run Gentoo on it as most of my linux experience is on that OS.

I have a router, but it's not powerful enough, so I want to get a wireless card and install it into the Aptiva, with 2 other NICs. This way I can connect the cable modem to one NIC, the other NIC to my normal computer, and the wireless NIC can provide internet to the other computer in the house, with the router I currently own being inbetween to relay the signal. I'm a webdeveloper and host apache for development purposes only on my computer, but I was hoping to host this on the Aptiva (which I would have on all the time), this way my clients would have access to their work-in-progress website even when I'm not around. My Aptiva currently has only a powerbox, a motherboard, a hard drive, and a cd-rom drive. I plan to remotely configure it (as it doesn't have a video card/peripherals).

Is this plan possible? If so, which NICs/wireless NIC would be a good choice? Also, I don't except anyone to write an in-depth tutorial for me, but I would appreciate it if someone could point me in the right direction, even just an informative link would do.

The Aptiva runs at 350 Megahurtz with 128 megs of ram.

Thank you very much!

-Matthew

----------

## Bones McCracker

I don't see anything in your plan that's impossible.

The main issue I see is that the Aptiva is not likely to serve your web applications in a responsive manner for your customers to review.  In fact, with only 128 MB RAM it might be swapping a lot and be quite slow.  You might have problems with Apache.  It will probably be quite usable as a router, provided you've got decent NICs in it.

As to the wireless setup, a cleaner (and cheaper) alternative would be to connect a wireless base station (or your existing wireless router configured as a pass-through) to your second NIC (on your Aptiva) -- unless you really need it as a relay to achieve the signal strength on the other end.

----------

## Jiokah

That's great, I may just try that out. Is 128mb of ram really not that much for a simple webserver? I know my router has a webserver on it, and I know it doesn't have near that much ram. Is there maybe a lighter alternative to apache that can run PHP and MySQL? If not, I'm sure I can make a simple upgrade to the Aptiva for cheap.

Also about the router, I do need it as a relay, otherwise the signal just isn't strong enough. Which wireless NIC would you recommend in this situation?

Thanks a ton for the advice, it means a lot...

-Matthew

----------

## Mad Merlin

It really depends on what sort of web serving you're planning on doing. If you're just serving up some simple static webpages you could probably get away with 32M or even 16M of memory. If you're planning on heavy database work with lots of big tables and lots of dynamic content, then things will probably be more sluggish than you'd want. But, for most cases, 128M of memory should be fine.

----------

## Aurora

 *Mad Merlin wrote:*   

> It really depends on what sort of web serving you're planning on doing. If you're just serving up some simple static webpages you could probably get away with 32M or even 16M of memory.

 

It is also possible to use a smaller HTTP server if static pages is all that's being served up.

http://tinyhttpd.sourceforge.net/

There are others, too.

----------

## Jiokah

Good suggestion, but they will be as dynamic as they get. I use PHP and MySQL, and there can be quite a bit of processing sometimes. Not that I know much about this, but with, say, a meg of code and 3 megs of data in the database, and say 5 megs of images total per one website, and say 3 people viewing each website at any given time, with only two websites up at the same time, that couldn't be more than 36 MB of ram being needed. Again, I know nothing about how ram work, so some of you may be laughing at this calculation.

----------

## Bones McCracker

Right.  I just guessed based on his wording and his choice of Apache that he was probably talking about dynamic pages and possibly an underlying dbms (and by his tone, that it might involve media of some sort).

The only way you'll know for sure is to try it.  But don't even tell your clients about it until you've thoroughly tested it and satisfied yourself that it's responsive enough.

Other things you could do are:

- get a hosting service (a small LAMPS server)

- talk one of your clients into hosting your "work in progress" site (beginning of course with THEIR work-in-progress), maybe in exchange for some sort of discount on support or an extended free support period

----------

## tarpman

Try lighttpd for the web server.  It does PHP and such while having a far smaller footprint than Apache.

You may not want to hear this, but for an older machine like that one I'd actually suggest avoiding Gentoo and going for a binary distro.  In my case, I have Debian running (and my only Linux experience before this was Gentoo) on a LinkStation (400MHz ARM processor) - lighttpd (although mostly static content), irssi+bitlbee inside a screen, an ftp, and a few other random services, and I have yet to see the load go above 0.3.  Trust me, regardless of how well it serves normally, any time it's compiling stuff you will notice a significant drop in server performance.  :Wink:   Debian and Arch are both good binary distros that are quite easy to get used to.

Regardless of what distro or software you decide to go with, keep an eye on your memory/cpu usage once it's been deployed, ask users for feedback, and tune where necessary.

----------

## mackerel

I use the same size server for a proxy server. I would recommend using distcc for Gentoo to share the compiling load.

----------

## Jiokah

Hey thanks for all the replies...

distcc, that sounds like a good idea. If my little server can handle lighttpd and everything else but not the compiling, might as well let my other computer do the compiling.

So lighttpd supports PHP, but does it also support MySQL? If it does, I'm set.

On a side note I just struck a very nice deal with my ISP which will allow me to host server applications (most ISPs disallow this) on my 5mbit line. So down the road I might even look into getting a real server and studying what's needed to host websites as an extension of my business.

----------

## tarpman

 *Jiokah wrote:*   

> So lighttpd supports PHP, but does it also support MySQL? If it does, I'm set.

 

As far as I know SQL support is implemented in PHP rather than in the web server itself.  So any webserver that has PHP support should be able to run SQL commands in PHP.

----------

## Jiokah

 *tarpman wrote:*   

> As far as I know SQL support is implemented in PHP rather than in the web server itself.  So any webserver that has PHP support should be able to run SQL commands in PHP.

 

Right, but my question more specifically is whether I'd be able to host a MySQL database. I wasn't thinking right, a MySQL database is seperate from the webserver. How would my little machine fair hosting MySQL?

And thanks again for all the answers!

----------

