# [SOLVED] Lightweight uclibc-based web/mail server

## Adrien

Hi!   :Smile: 

I'm planning to build a quite light web/mail server running gentoo with uclibc and need advice for it:

Here's what the server will be meant for:

1- Web server - the box will host just one basic web site (a quite small one) on which I'll only need to display text and pictures (I may need to incorporate a viewer for slideshows)

2 - Mail server - the mail server shouldn't get too busy as I plan to create not more than 3 accounts, mainly for answering to the mails I'd receive about the website.

I have two machines at home that I'm not using at the moment:

An old laptop , P3@600MHz and 32Mb RAM

Another one with P4@1,8GHz and 256-512Mb RAM

Given that I'd like my system to be quite light, I'm hesitating between lighttpd or apache for the webserver (never used any of these yet).

For the mail server, i had the idea of qmail but don't know wether you have a better idea (never used any mail servers either btw)

Could you guys tell me wether all this seems possible and what you think is best in my case (for the hardware especially)?

thanks in advance!   :Very Happy: Last edited by Adrien on Fri Mar 07, 2008 10:42 pm; edited 1 time in total

----------

## Carnildo

I'm doing something similar: I've got a Pentium MMX 233 with 48MB of RAM running lighttpd, mysql, qmail, bind, sshd, and a few other bits and pieces.  My observations:

* Disk space is more important than memory.  If you don't have at least 2GB, you can't have a self-hosting Gentoo system.

* Give yourself plenty of swap space.  A quarter-gigabyte is about right if you're going to be compiling.

* No need for ulibc.  If you don't mind the multi-day compile time, glibc works just fine.

* Minimal Apache is much heavier than Lighttpd, at 6MB to 2MB, but much of it will swap out to disk and stay swapped out.

* Qmail is a pain to work with, but extremely lightweight.

* Using denyhosts in daemon mode isn't a good idea: it's about 10MB, and doesn't swap out.

* PHP takes a *lot* of memory to compile.  If you don't have at least 250MB of free RAM+swap, it's going to run out of memory, crash, and take a few other things with it.

----------

## Adrien

hey Carnildo! Thanks for sharing your experiences!   :Smile: 

First of all, I'm ok with disk space (I have like 10Gb on my laptop). I'm really used to gentoo, my questions are more about requirements for gentoo web/mail hosting as I'm a complete n00b for this.

Regarding compilation, if I learn with the answers I'll get here that my laptop will be sufficient, I'll use cross-compiling from a chroot on my desktop.

So, what about your box, do you feel like it's running fast enough for what you want? Or is ti too laggy? 'cause I plan to use much lighter stuff on mine...

thanks again for your advice   :Wink: 

----------

## Carnildo

The box is fast enough for almost everything I've tried on it.  For hosting static content, it's as fast as anything else out there.  Some of the dynamic stuff is a bit slow (awstats takes a few seconds to display server statistics, for example), and other stuff takes too much memory (MediaWiki or Catalyst-based websites), but as long as you're selective about what you run, you should be fine.

I haven't tried stress-testing the email system, and I don't have any spam filtering running, but I haven't noticed any problems.

----------

## Adrien

Ok I'll go for the laptop and then, see what happens...

Thanks again  :Cool: 

----------

