Newb-Friendly Linux Flavor For LAMP Server?
First time accepted submitter bhcompy writes "I need to setup a system to serve 2500 users and I've been looking at a LAMP setup. This is not commercial, more of a personal side project for some friends. I've no experience configuring or administering a Linux server having worked with MS and PICK based solutions my whole life, so I'm looking for something that will be relatively straightforward to implement and not a chore to manage and preferably not completely CLI. I will be serving a forum(phpBB 3 suits my needs and seems adequate) and a variety of PHP driven content with a MySQL backend. Requirements are PHP 5.3.0+ and MySQL 5+. Suggestions?"
I haven't verified that it has all the versions that you want, but I've used SME server on and off over the years for such things. It's quite newb friendly, and not completely command line. There are quite a few other options as well.
-- Who is the bigger fool? The fool or the fool who follows him? --
I suggest Virtualmin on top of Ubuntu. Its easy to configure and setup and maintain.
http://www.virtualmin.com
Ubuntu has the largest mindshare, and the most nubie friendly support http://ubuntuforums.org/ as well as paid support if you get in over your head. You can install the "Server" version, and with "sudo apt-get install ubuntu-desktop" you would have the full GUI. You you can run a server on the desktop version, but with that many users, you will want a server kernel.
For a completely unknown platform I'd suggest mucking about with a very small project with just yourself as a user or maybe a couple of others that don't care if it's down or broken. Once you know your way around you can then move on to something else.
Making stupid mistakes in front of an audience of 2500 users would be embarrassing no matter how trivial the subject matter of the site is. You are better off making the stupid newbie mistakes where only you can see them. Having test and production environments only go so far if there is nobody in the project that really knows what you are testing for - if you don't know what you are doing your stupid stuff will go live.
CentOS and RHEL have become the industry standard for LAMP setups, for whatever its worth. Given that you probably don't need a support contract, CentOS 6 would fit the bill nicely. A free control panel like Webmin would probably make your life a bit easier in the configuration department.
"Make it idiot proof, and someone will make a better idiot."
I'd suggest that you go with one of the mainstream/common Linux server distros: either RHEL (for which you can use CentOS, which is essentially the same, minus the RedHat-copyrighted bits) or Ubuntu Server.
Either of these can be configured to use a GUI. I'd actually pick RHEL/CentOS over Ubuntu, and during the install (which is graphical), you can select to install a web+database server along with a Desktop (GUI). The installation is fairly straightforward; the most complex part is arguably the partitioning, although you can use the guided partitioner to just use all free space on the disk. Partitioning isn't something that's linux-centric, although the partition scheme for Linux is perhaps a bit more complex than what'd you would expect coming from a Windows world (dedicated swap device, LVM to virtualize the partitions, etc..). If you use the guided "do it for me" option, you can avoid getting your hands wet with this complexity.
The primary reason I'd suggest going mainstream is that the support will be there. If you choose some OS that no one really uses, you'll be hard-pressed to find distro-centric documentation for it. If you go with Ubuntu or RedHat, you can use Google to get through any obstacles you may find. There are plenty of tutorials available when you google for a simple [do this task] on [this distribution]. For example:
http://www.google.com/search?gcx=w&ix=c1&sourceid=chrome&ie=UTF-8&q=install+phpbb+on+rhel
http://www.google.com/#sclient=psy-ab&hl=en&safe=off&site=&source=hp&q=install+phpbb+on+ubuntu+server
While you could probably use this documentation to complete a task on another distro, it's helpful to have a tutorial for the specific OS you're using; all the commands will be the same, and any dependency problems, etc... will all be accounted for.
Additionally, should you decide that you want to learn more and play around, having something mainstream installed means that your learning experience will be directly relevant to anything you want to do down the line.
As an alternative, you could go with a pre-built phpBB appliance. http://www.turnkeylinux.org/phpbb is a single ISO or VDK that is built on Ubuntu Server and comes pre-configured with phpBB (they have many other applications available as well - highly recommended!). It'll ask you a few questions during the install, and once complete, you'll boot up into a fully-functional Linux server with phpBB already running.
Nemilar http://www.techthrob.com - Visit Me!
Is that you, Zuckerberg? I'm not setting up any systems for you without a firm contract.
www.debian.org
The essential, and without any brown lipstick smeared all over.
These are arguably the best options for beginners. Both have great communities and any issue you have you can typically find a solution on Google in 5 minutes. Ubuntu even has a LAMP package that will setup everything(well, most everything) you need. Couple pointers: Disable root login via SSH as soon as possible. You're asking for a bruteforce attack if you leave that enabled. Set up something like fail2ban or OSSEC monitoring to help thwart bots that are trying to break into your server.
A simple Ubuntu or Debian 5 installation will fill the bill nicely. Webmin will take some of the sting out of having to learn the CLI. However any true IT professional should learn and use the CLI (Even newer MS servers can not be installed sans GUI). Once learned, it is quicker, simpler, more powerful way to do things than any other method I know.
Don't let the unfriendly reputation of NIX scare you away. I did 16 years ago when I started our ISP. Went entirely Windows NT servers. What a mistake! These things were constantly failing for various reasons. I began learning Linux and slowly replacing the failed servers with Linux systems and they just didn't fail unless some hardware failed (not nearly as frequent).
Life is much easer now and I spend very little time on server maintenance.
not a chore to manage and preferably not completely CLI.
Aren't these inherently directly conflicting goals?
Easy to manage, is you change one little thing in your puppet config and puppet magically makes it happen, instead of having to babysit everything.
Easy to manage is someone tells you "make /etc/apache2/apache2.conf look exactly like this" instead of "click on the 2nd icon from the right that looks like two mating centipedes, then look randomly about the screen until you find the icon that looks like a discarded kleenex, oh you're seeing an icon that looks like a black hole, well, then click two pages back" etc for about ten minutes.
An analogy is "teach me physics, without any of that tedious math stuff".
"Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
Have you even thought about a WAMP setup? A poorly admined Linux box is worse than a well managed Windows one. - from a *nix sysadmin
The default kernel installed with Ubuntu server id different from the default kernel installed with Ubuntu desktop. Short version is that the desktop kernel is optimized for a single user at the desktop, where the server kernel is optimized for lots of threads, but a slightly laggier desktop experience.
Yes. Don't fear the CLI. As the GP says, UbuntuForums is a great resource, and in many cases you can cut-n-paste commands directly from there into your terminal. If the OP is completely new to the CLI, he/she will want to be cautious about this and do some research (RTFman-page) to make sure the commands do what's wanted.
From the summary, it sounds like the OP wants to set up a forum for some group. Therefore, most of the "hard" part (the CLI stuff) will be required during initial setup. Once phpBB is up and running, most of the admin stuff will be done within the native phpBB interface.
One suggestion: get familiar with one of the numerous backup/restore utilities available. Google around for a comparative review and you'll probably find one that fits your GUI requirements. Figure out how to use it (preferably before you go live with the server) so you can easily save your bacon in case of a catastrophic fuckup.
XML is like violence. If it doesn't solve your problem, you're not using enough of it. --AC
How about just buying a webhotel instead of setting up a server? I mean if you just need to run php5.3 and mysql there is really no need to setup your own server.
I agree with the suggestion to use Ubuntu, especially due to the massive amount of old forum posts online that will answer most questions. However, installing ubuntu-desktop will certainly give you a GUI, but that GUI won't particularly help you to administer your LAMP stack.
I find it very useful to have a GUI when administering an Ubuntu system. It's great to have a couple CLI windows open in which commands can be typed. I can 'tail' a log file while I type commands in another terminal window. A web browser can be used to check the results of commands that will affect the outward facing parts of the system.
When you get to using the on line support forums to help deal with issues, it's great to be able to copy a command from the web browser into a term window. I do have CLI only Ubuntu installations but I administer by SSHing into the box and administering it from the GUI on another PC.
And WRT your suggestion to keep a cheat sheet of common commands, I do that as well. I keep them in a text file so I can cut and paste them into a terminal window.
Of course this can all be done using something like PuTTY from a Windows PC but is slightly more convenient on the system console using X copy/paste. (Highlight text and paste with or middle mouse button.)
I am surprised that no one has mentioned XAMPP or Portable XAMPP yet.
I used Portable XAMPP under WinXP as a development environment for several years. It comes with a couple of GUI management tools and has an active community behind it. Advantages: you get a LAMP-like setup on a removable drive running under an OS you are already comfortable with. If things go totally weird, you can replace the XAMPP drive with one loaded with an earlier backup and be confident that none of the weirdness has been left in your system. I found that was a very comforting thought when I was going through the newbie jitters phase.
XAMPP is probably powerful enough to handle 2,500 users doing typical Internet stuff (avoiding serving out hundreds of full length movies, etc). So it might be suitable for your production environment as well as development: install it on a fast fixed HD using Ubuntu Server as the OS and you will have a bullet proof operation that is easy to manage and develop for. XAMPP is plain vanilla and seems to play well with any of the Linux servers.
Here is a link to one source of XAMPP goodness. Anyone who is still using Windows should think about exploring the PortableApps site, too. There are some FOSS gems there.
Will
I'm surprised that no one here has suggested Suse/OpenSUSE yet. It's extremely easy to install and set up, with a LAMP stack, ready to go off the disk. I realize that there are some philosophical reasons amongst the free software community against Suse, but I've never cared about those, just to be frank. And once you do get familiar with the CLI, Suse has an advantage that I haven't found in any other major distro: I can go in remotely with SSH and use the CLI Yast program. which uses an NCurses interface that duplicates the GUI version of Yast. Everything's in the same place. This is absolutely wonderful. :)
I've used Ubuntu, and the last thing I want to do is start a flame war. Ubuntu LTS is extremely stable and yes, the online support is excellent. However ... it is almost entirely CLI for administration (unless you install Webmin/Virtualmin, as someone else here suggested), and if you go into the Ubuntu forums with a problem, the help provided will almost certainly be CLI. Also, speaking from experience, if it's a really puzzling problem, you'll get two or three conflicting suggestions. (Again, speaking from experience.)
Remember, the original poster's experience is entirely with Microsoft-style stuff. That's where I was a decade ago, I can still remember how difficult it was to transition to Linux. Mandrake (now Mandriva) made my switch a breeze, even though others were screaming at me to use Red Hat or Debian (both of which I tried, and both of which almost soured me to Linux entirely). When you recommend something to the OP, keep that in mind. What's easy for YOU (going into /etc and editing a file, for example) might completely baffle him or her. Now add in the fact that most error reporting under Linux is via the log files, instead of pop-up screens.
Cogito, igitur comedam pizza.
turnkeylinux.org has great LAMP appliances, along with other loadable VMs. Free.
---- Teach Peace. It's Cheaper Than War.
That's really a side effect of not setting up the OS and Apache properly.
If you're expecting a large amount of simultaneous connections, configure the OS to provide that many file descriptors to Apache and configure Apache's MPM preforking accordingly to that ratio with mod_php. I suggest avoiding threaded MPM for security, recovery and stability reasons.
You will suddenly find that nginx's performance is not so great in comparison and doesn't have the disadvantage of PHP-FPM's additional usage of file descriptors.
Apache isn't very good against nginx when it's starved of file descriptors, but that's normally due to not configuring the system accordingly for the load expected. Regardless, by not configuring your system accordingly, you're generating additional CPU load as the software has to fall back on other more CPU intensive methods to deal with the lack of file descriptors. The extra load on the CPU usually costs more power as well as the potential capacity if it had more file descriptors available.
Change is certain; progress is not obligatory.
Seriously, if you don't know anything about linux, and don't want to be bothered with securing and updating it, just go with a hosted solution like Dreamhost who has a GUI panel for most of your administrative needs. Getting something "simple" is a recipe for you getting hacked.
Also, if you are uneasy with a CLI, you need to ask yourself whether you can actually do this. Unease with CLI is typically due to lack of understanding how things actually work. In that case you should stay in the MS world, where people are (mostly) protected from making severe mistakes but are seriously limited in what they can actually do.
If you are trying to break out of the MS-world corset, then do not fear the CLI, learn to use it instead. It is the only way to be free of those restrictions, as GUIs are not and cannot be powerful interfaces due to fundamental limitations. Remember, the CLI gives you the power to command (and shoot yourself in the foot), while the GUI just interfaces you, allowing you to do just what the GUI designer chose to allow you to do. Both terms are surprisingly self-explanatory.
Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
+1 recommendation for Turnkey Linux. So far it has been the only distro I've been able to successfully setup as a webserver since I don't know Linux very well. Easy to setup and easy to contain in a virtual-machine, if that's your kind of thing.
I run a few sites with equal or slightly larger audiences as the questioner. My servers are evenly split between Ubuntu server and Debian. A few things to note:
1. Don't be afraid to go headless and learn the bit of shell commands you'll need to know. You'll need them at some point anyway. Besides, most web-based packages you'll be using these days can be administered with either a web-based interface or an administration app. eg. For administering sql servers I use Sequel Pro on my Mac and connect over an ssh connection. Also definitely look into installing Webmin http://www.webmin.com/ - it definitely eases admin responsibilities.
2. Debian-based distros are all easy to find help for. As the parent mentioned Ubuntu has some of the best support out there, but even if you choose Debian 99% of what you'll find on Ubuntu-specific forums will apply. LTS Ubuntu server is rock-solid, easily as stable IME as Debian. And although my desktop systems have switched to Deb lately due to the recent odd GUI-related decisions of Canonical, these issues haven't spread to the base distro.
3. Administering any system is a learning process. If someone tells you that it's problem-free if you use X and Y they're lying. Expect a bit of a learning curve.
My problem is that I don't want to spend any more money on it than I have to, plus I get to expand my knowledge in the process. It's a "production" server, but it's not commercial/business related and there is no cash at risk.
> SuSE is still around?
On the assumption that you're serious, try www.opensuse.org.
I personally think that their support forum is the best, by the way -- and I'm including Ubuntu in that comparison. By far.
And by the way, for the original poster: Swerdna has a complete walkthrough on setting up LAMP for OpenSuSE here:
http://www.swerdna.net.au/linux.html
And of course, Falko has some great stuff over at How-To Forge as well: www.howtoforge.com
Cogito, igitur comedam pizza.
I suppose I get too excited about things like webmin, and i haven't worked with it in something like eight years, but I'm going to warn you anyway.
Tools like webmin are just wrong in principle.
First, they expose way too much of the administration interface to the vagueries of ssl. (Thankfully, they usually at least give you that these days). You did notice the flap about the BEAST attack on chained block ciphers recently? (MSWindows tools also vulnerable, to the extent it's an issue.)
Don't confuse SSL with SSH, by the way.
Second, they hide the real tools from you. If you want to learn Linux/Unix tools, you don't want tools like webmin hiding the tools you want to learn from you.
Third, as many have said already, don't fear the command line. It really is your friend. Sure, the GUI tools show you the most used commands and options with a lot less excess information than the man pages. But you really want to learn to use the man pages, because sometimes the options you need aren't in the GUI interface. Searching the web is also necessary in many cases, whether you use the GUI stuff or not.
Well, I suppose I won't convince you.
Whether you use webmin and its ilk^H^H^H like or not, you really want at least one other machine for this project, for practice and backup.
If you do use the same machine for practice and backup, you probably want a detachable drive to keep the backup on. USB is okay, but don't try to just copy stuff onto VFAT or NTFS formatted USB drives. If you don't use a *nix format like ext3, you must at least pack up your archives with tar, so that permissions and stuff can be retained. ("man tar". And check the options for the ACLs if you use those.)
Practicing/designing on a machine that is not the live server is a good idea whatever OS you use, of course, but especially when you are learning a new OS/environment.
Which kind of brings me back to the command line. You are going to be doing remote work. You are going to be using ssh. You can tunnel an X session over ssh, but there's a kind of chicken-and-egg problem there, since you end up using command-line tools to set the tunnel up.
Don't fear the command line. Just get a practice server and make lots of mistakes on it. Problems solve themselves that way.
Computer memory is just fancy paper, CPUs just fancy pens with fancy erasers; the 'net is just a fancy backyard fence.
I may get flamed by the Ubuntu/Fedora crowd for this, but for servers I use and recommend Debian stable.
There are two major reasons for this: great support and things don't change unexpectedly. Because of its long release cycle you rarely see the latest and greatest versions of anything in the repos, but if anything mission-critical is needed these can be installed manually. Some recent python libraries or Firefox builds come to mind. See http://bugs.debian.org/release-critical/ for a graphical view of recent Debian releases.
The current Stable release ("Squeeze") meets your MySQL and PHP version requirements (5.1 and 5.3.3 respectively).
"Nine times out of ten, starting a fire is not the best way to solve the problem." - my wife