OVH Community, your new community space.

RPS - build web server manually


freshwire
04-06-2010, 01:48
Most distros (or config provided when manually compiling) will have your server reasonably secure as standard so nothing to worry about unless your paranoid or providing hosting to others.

Just make sure you keep the software up to date.

eAccelerator wasn't updated for quite a while but then it seemed to come back to life. The latest version came out just a few days ago.

Not sure about the lighttpd and apache config thing (I may be wrong); as far as I knew it wasn't directly compatable. Lighttpd might have equivilent modules but I don't think they can be swapped in place for apache2. If you want the rewriting etc. then you could consider the nginx (static files) + apache (php) that I suggested before. You could use apache for static too if you wanted and then just have nginx for caching. In terms of raw speed nothing will compare to nginx serving from its cache. Most CMS won't play nice with cache (the content just won't get cached) so you might want to mod the scripts to send out the right headers.

All that said, 150 uniques/day will prove to be no trouble, for any solution you go for.

melat0nin
02-06-2010, 20:46
Quote Originally Posted by freshwire
Nginx is a nice alternative to lighttpd that you might want to look at. I like to use apache just to serve php pages (as you can still do tricks with .htaccess) and then run nginx over the top (acting as a cache too) but also serving static files (css/images etc) from a seperate host. You could use fastcgi with nginx just as easily but as I just said I prefer having apache solely for that purpose.

Are you limited in the amount of RAM you want to dedicate to these service? Is that why you want 'light'? Using your RAM effectively is often more benefitial than just stripping everything down to its core (though that is helpful too); the obvious example of this is in memory caches (of generated pages mainly).

Yeah so pretty much the PHP/MySQL on the CMS is your weakest point. You can install eAccelerator for PHP which will cache the bytecode and generally help with PHP performance. You will also want to modify the various MySQL caches/buffers to best meet the needs of the CMS (you will want to give it a few days to get some stats built up first though). I can't stress enough the whole cacheing idea; You can have nginx cache your pages (if they don't change often) and the result will be 5000+ req/sec even on the slowest of hardware.

I currently use Varnish cache for one of my clients (effectively doing the same job as nginx but in a more customised way). His wordpress blog was able to handle over 100,000 page views within 2 hours as a result (he has ~1Ghz celeron CPU).

No idea on the RTM. Don't use it at all

I think I probably rambled a bit above but hope you got something from it

Jonathan.
Thanks for the tips, much appreciated!

I had planned to use APC because apparently eAccelerator isn't maintained anymore..? How does it compare?

I need URL rewriting (which is one of the problems I'm having with the OVH distro, hence the reinstall) which initially is done thru htaccess.. my understanding is that Lighty accepts most of the same configuration and modules as Apache, which makes migration really simple. Others don't migrate quite so easily, or?

As for lightness, it's purely to make sure it's as screaming fast as possible. The site isn't complex or massive, nor will it get huge traffic (~150 unique visitors a day), but I want to deploy it and have it cause little or no trouble for my client.

Thoughts much appreciated!

How about securing the server in general? is anything special needed other than safe passwords, as few accounts as possible, etc?

freshwire
02-06-2010, 19:56
Nginx is a nice alternative to lighttpd that you might want to look at. I like to use apache just to serve php pages (as you can still do tricks with .htaccess) and then run nginx over the top (acting as a cache too) but also serving static files (css/images etc) from a seperate host. You could use fastcgi with nginx just as easily but as I just said I prefer having apache solely for that purpose.

Are you limited in the amount of RAM you want to dedicate to these service? Is that why you want 'light'? Using your RAM effectively is often more benefitial than just stripping everything down to its core (though that is helpful too); the obvious example of this is in memory caches (of generated pages mainly).

Yeah so pretty much the PHP/MySQL on the CMS is your weakest point. You can install eAccelerator for PHP which will cache the bytecode and generally help with PHP performance. You will also want to modify the various MySQL caches/buffers to best meet the needs of the CMS (you will want to give it a few days to get some stats built up first though). I can't stress enough the whole cacheing idea; You can have nginx cache your pages (if they don't change often) and the result will be 5000+ req/sec even on the slowest of hardware.

I currently use Varnish cache for one of my clients (effectively doing the same job as nginx but in a more customised way). His wordpress blog was able to handle over 100,000 page views within 2 hours as a result (he has ~1Ghz celeron CPU).

No idea on the RTM. Don't use it at all

I think I probably rambled a bit above but hope you got something from it

Jonathan.

melat0nin
02-06-2010, 17:50
Hi all

After having some problems with OVH's Gentoo Release 2, I'm thinking of reinstalling my RPS with Ubuntu Server 8.04 (raw distro) and starting from scratch to create a LAMP stack. The server will be running only one site, based on the concrete5 CMS, so nothing too strenuous. However I want it to be as lean and mean as possible. I don't need any email capability (apart from sendmail) or antivirus etc, so I think it could be quite a bit leaner than the OVH install.

I was thinking of using Lighttpd (Lighty) instead of Apache. I won't be installing a control panel, except perhaps LXAdmin, because I've heard it is very light.

Does anyone have any tips on things to look out for when building a server from scratch? I've installed LAMP stacks on my home machines but in that scenario things like security are not that important. Are there any things to consider when deploying the server on the web for a production site?

Does anyone know if RTM is installed on raw distros? And if not, is installing it using the instructions here (http://help.ovh.co.uk/RealTimeMonitoring) okay on Ubuntu?

Any advice would be much appreciated. I want it to be secure and light. That's about it.