Patrick Useldinger wrote:
OK, but you can always compile a different version
yourself. My question
is rather if it makes sense to ALWAYS compile from source.
I would not compile every library and command tool myself. I would
concentrate on the services the server provides. For example for a
webserver I would simply take apache, PHP, etc from the project's
homepage instead the distro's version and compile it from source. So you
have the exact version of the software you need, you are independent
from distro updates (security related or not). You are able to switch
distros at any time (or even to OSes like *BSD, Solaris, AIX, ...)
without recreating a new Apache config file since you are able to
compile exactly the same version of the software on the target platform
using the same defaults and paths.
I made the experience that if you are using the distro version of
Apache, Postfix, etc. it may not be possible to reuse the config files
unaltered. Paths may be different. But not only that: Many lines are
commented out in the config files, so the software uses "compiled in"
defaults. "Compiled in" defaults are likely to be not the same on
RedHat's or SuSE's version of Apache! Simply coying a config file
(httpd.conf for example) to a new platform is not enough if you use the
distro's package. People on the projet's forum may find it easier to
help you if you have downloaded the source tarball instead of a distro
specific binary package which has been altered to the distro's needs.
Compiling the entire distro and optimizing it for your CPU may even have
a negative impact. The binaries may be faster on your CPU, but often
they are also larger which means that your caches (CPU cache, file
cache, etc) may not be optimally used. It makes sense to recompile the
kernel for your CPU, the main software that defines the function of your
server (webserver, database, mailserver, etc), perhaps the libc library,
but it rarely makes sense to recompile everything.
Greetings, Patrick Kaell