|Which Linux OS to use for a web server?|
My only experience so far is using Windows, Apache, PHP. However I'd like to play around with Linux OS and Apache as a web server. My question is, which of these Linux OS (Redhat, ubuntu, etc) is a good choice?
My requirements are for the OS are:
Thanks in advance
Is this for a live server, or for a test environment?
"Standard issue" for webservers is probably Red Hat Enterprise Linux (RHEL) - however that is not free. There is an exact clone of RHEL called CentOS, which is free, and is an excellent choice.
Other free options incluse Debian: [debian.org...] or FreeBSD (which is not Linux but is similar): [freebsd.org...] .
All major Linux distributions support Apache/PHP. For a webserver, the most important aspects are stability and long-term support.
you should also check out netbsd [netbsd.org].
There's little difference between distributions. Update procedures are a bit different from distro to distro, sometimes files are in different locations, but effectively they're all the same.
I've used Mandriva for about 10 years and have been very happy. I also use it on my desktop/laptop. That being said, the tried and true distro is RedHat, and the new up and comer that's everyone's favourite seems to be ubuntu.
Any one of those three and you should be fine. Or pick a different one, you'll still be fine.
I have used different versions of Fedora Core Linux, Debian Linux and FreeBSD. All Linux versions are good voor web servers, the main differences are on the console level where each distro has its own preferred choice of graphical user environment.
The main drawback of (mainly Fedora) linux distro's is the short lifetime of a version and the necessary upgrade actions to be sure of security updates. With each upgrade some utilities are removed and some others are added because either the developer stopped maintaining the utility or distro package, or the distro maintenance people found another utility for a specific task which they thought would be better in a new distro. Also the problems you can run in with different glibc versions during upgrades or when installing binaries of specific software kan give you a real headache.
Therefore I am currently testing a FreeBSD server. That operating system is maintained as a whole by one group of volunteers (not one group who maintains the kernel and a second group for the utilities as is the case with Linux) and therefore I expect it to be a better choice for me as a long term base for my webservers with less upgrade problems.
I am a current and past user of various flavours of Red Hat / Fedora, CentOS and Ubuntu.
All have worked pretty well for me.
I don't use PHP, but I do use Apache (+ Java, DNS, NTP).
RHEL/Centos is probably the most popular, widely-supported OS for web servers. As a newbie, you will find more support, information, published books, etc. on these OSs than others. And more hosts that offer it.
I've heard good things about the BSDs - primarily that they are "mean and lean" - but realize that these are niche OSs. They are NOT versions of Linux, being derived from the Berkeley Systems Distribution of Unix. While BSD does have a strong - if minority - following, do realize that it's NOT Linux and it's also a fork (some think the superior one) of modern Unix's - most of which today are based on Unix System V.
Although Linux is not Unix, I'd say it's more System Vish than BSDish.
I use Centos on my VPS, and Fedora 8 on my development machine. Though there are some differences, due to Centos being a couple of years behind Fedora, I find I want the latest Fedora features on a desktop system, and it is close enough that I can move back and forth between the systems comfortably.
|Although Linux is not Unix, I'd say it's more System Vish than BSDish. |
Ahh, reminds me of the old days when I worked on both BSD and System V machines and always forgot if I had to use "ps -aux" or "ps -ef" to get a list of all processes.
Compared with Linux, FreeBSD runs somewhat behind in development of hardware drivers for equipment like video cards and other multimedia equipment (not really needed in a webserver anyway), but it has a very solid networking and security base. It is the operating system used by some large players in the market like Yahoo and hosting provider Pair.
For the OP: If you have no experience with any *nix system, the learning curve for a Linux or FreeBSD server will be the same with probably less headaches with the latter one in the long future.
Gentoo wouldn't be a bad choice either. It's not a hugely popular choice although I just found quite a few providers offering it as an OS choice.
I'm biased of course, since I've been using Gentoo for years :)
I would say, do not pick your server OS based on what makes a good desktop. I see no advantage for (for example) Ubuntu over Debian for a server. I like Mandriva, but my experience of setting it up (or rather having someone do it for me) as a server was that it was a bit more work.
RHEL if you want to pay for support, CentOS (RH clone) or Debian otherwise, seem to be the most mainstream choices.
If you want a good desktop that will also let you run test servers, or if you need the same distro on your desktop and server, Mandriva or Kubuntu.
Any Linux distro I can think of will have Apache and PHP in the repos. All the major distros are entirely free as in speech and free as in beer apart from a few third party packages.
If you have an old piece of kit handy, this might work for you:
Makes a great little development platform, and will sit happily on the end of your DSL line. Get a free domain name from dyndns and you're good to go.
No monitor or keyboard needed after install.