Ask Slashdot: Is There a Web Development Linux Distro?
Qbertino writes I've been a linux user for more than 15 years now and in the last ten I've done basically all my non-trivial web development on Linux. SuSE in the early days, after that either Debian or, more recently, Ubuntu, if I want something to click on. What really bugs me is, that every time I make a new setup, either as a virtual machine, on concrete hardware or a remote host, I go through 1-2 hours of getting the basics of a web-centric system up and running. That includes setting PHP config options to usable things, setting up vhosts on Apache (always an adventure), configging mod_rewrite, installing extra CLI stuff like Emacs (yeah, I'm from that camp) walking through the basic 10-15 steps of setting up MySQL or some other DB, etc. ... You get the picture.
What has me wondering is this: Since Linux is deeply entrenched in the field of server-side web, with LAMP being it's powerhouse, I was wondering if there aren't any distros that cover exactly this sort of thing. You know, automatic allocation of memory in the runtime settings, ready-made Apache http/https/sftp/ftp setup, PHP all ready to go, etc. What are your experiences and is there something that covers this? Would you think there's a need for this sort of thing and would you base it of Debian or something else? If you do web-dev, how do you do it? Prepareted scripts for setup? Anything else? ... Ideas, unkown LAMP distros and opinions please."
What has me wondering is this: Since Linux is deeply entrenched in the field of server-side web, with LAMP being it's powerhouse, I was wondering if there aren't any distros that cover exactly this sort of thing. You know, automatic allocation of memory in the runtime settings, ready-made Apache http/https/sftp/ftp setup, PHP all ready to go, etc. What are your experiences and is there something that covers this? Would you think there's a need for this sort of thing and would you base it of Debian or something else? If you do web-dev, how do you do it? Prepareted scripts for setup? Anything else? ... Ideas, unkown LAMP distros and opinions please."
Not everyone configures this stuff the same way, and new versions of software would mean you'd need to change this tuning all the time. Plus, you'd likely need to know all the tuning anyhow in case you need to debug or adjust it. Your best solution probably is not going to hope for a distro so much as baking yourself an image (or install script, or chef/puppet/ansible recipeset, or similar) and using it to build these systems for you. A custom distro wouldn't make sense.
For every problem, there is at least one solution that is simple, neat, and wrong.
You want to make an Image you like and keep coping it/modifying it to fit your needs over time. Periodically update a running instance and make mode as you need, then that becomes the new ref image. You are talking about config/software options, not things that even SHOULD be part of a distro imo.
http://xkcd.com/1205/
Any fucking distro you want. Pretty much every distro does this.
You can try vagrant or docker. And keep your dev env as an image.
I like the cloud9 web IDE too
http://www.turnkeylinux.org/la...
Roll your own?
Seriously. You don't sound like you want a cents with the web server packages (very good option in my opinion). You sound like you want your setup to be concrete and to meet your own specifications.
The only way to get a distribution with your own specifications is to commission or roll your own.
Another good option (what I do for my glassfish domain) is to setup cantos on a virtual machine with the generic install and then export the VM so I can create arbitrary copies of my perfect centos distribution.
You want your settings and your preferences automatically configured? How the hell is a distro supposed to know what you want mod_rewrite to do?
It's all there and ready to go right after install. Why do you have to make it so complicated?
...setting up vhosts on Apache (always an adventure)...
When I was faced with the task of configuring my many Apache virtual hosts with individual IPv6 addresses while keeping them all with the same IPv4 address (throw in a couple of SSL certs as well), I jumped into the Apache config files. After a few hours of Apache frustration, I took a peek at nginx. I have not looked back since.
.
Within an hour of installing nginx, I had all the sites running as I wanted, using the one IPv4 address, the individual IPv6 addresses, and the appropriate SSL certs.
I could not believe how simple it was to configure nginx.
Note: I have never used any of this software. My company has used some of the listed software extensively to deploy stacks much like your needs
Have you tried looking at Configuration Management Software, like CFEngine or Puppet? You can find a quick list here: http://en.wikipedia.org/wiki/Comparison_of_open-source_configuration_management_software.
Configuration Management Software allows one to manage deployments of services across multiple machines, and looks to be exactly what you are searching for. It will allow you to deploy a PHP setup that has the configuration already done, a DB setup that just works on your new machine.
Take a look.
Have you tried tasksel in Ubuntu? It won't setup your vituralhosts or Emacs CLI, but it does nearly everything else you mentioned.
This isn't necessarily what you were asking for but I maintain a small group of configuration management modules that extend a base class just for this. This allows me to maintain a common configuration standard that I can push across a wide variety of hardware and software configurations. I can spin up an ArchLinux development instance in my VM stack and have it configured the same as production which makes things convenient, doubly so when I decide it's time to pick up a *BSD again or what have you.
( o ) one could say I'm rather baked
If you've done this over and over, why is setting up vhosts an "adventure"?
Surely a) you know how to do this in your sleep by now and b) you have scripts/templates to do all the heavy lifting for you?
If not, fail.
Debian! apt-get apache php mysql... oh wait it's not set up the way you want?
Why would anybody set up their server exactly the way you want it? Sounds like you need some sort of automatic configuration utility rather than a distro.
If you have to do more or less the same in all, set up a shell script, ansible/puppet/salt/chef cookbook, docker image or even a .tar.gz with your custom configuration and deploy it wherever you need. Most current distributions will work well enough in that conditions.
Read up on Puppet or Chef. These are sysadmin tools for configuring a linux instance using a script. Once you have your script written (list of packages you want, config files, etc) you can "push" this configuration to a linux instance to set it up.
Use a tool that is built for "state management" such as Nix, Puppet, Salt, etc. I have used puppet, for your exact task, for years with great success.
Recently I am playing with NixOS which is an entire operating system built around this paradigm.
Good luck to you.
P.S. the great part of these is you can share with other people the same configurations.
Crunchbang had a good post-install script that would set up apache and mysql for you. It's probably safe to use until Debian Jessie is released. It's a shame that the distro is dead. In the long run, configuration management might serve you better than a distribution per se.
Those who advocate genocide deserve every protection afforded by law, and none afforded by common human decency.
See here:
https://juju.ubuntu.com/
and here:
https://juju.ubuntu.com/features/
Have you looked into disk cloning?
It's really the wrong question. The industry is going in the direction where the OS is simple and secure while the App deployment package is responsible for having all the required bits and pieces required to make the app work.
For instance for a Java application we might use something like Spring-Boot to assist in creating the deployment artifact. That artifact will include the Apache Tomcat server. So all we need is a simple Linux server that has a JVM installed. Comes in handy for automation for running stuff at one of the many "cloud" providers.
Though these scripts are not distribs, they allow to easily create mysql databases/ configure vhosts, users/ftp etc.. This allows to host multiple sites on one host zand from what I understand, this is what you are trying to do.
Never antropomorphize computers, they do not like that
.. that make a custom tailored distro really pointless, at least for server/development setups.
Vagrant (and maybe Packer), combined with a virtual machine app (like virtualbox) or container system like docker is basically what you want, though of course, those aren't the only choices, others may have different recommendations.
You can use vagrant to create "boxes" with a bare-bones minimal install of your favorite distro - you can either go in and tune an instance of that box yourself to have all the tools you want preconfigured, and then in turn "box" that, so that it can be reused over and over and among many projects or machines - or you can write provisioning scripts that vagrant will automatically run for you. The upside to that option is that you can use cross platform provisioning tools, that make it easy to provision to various linux flavors, allowing you to test your app on a wide range of distros, if that sort of thing is needed.
It might bot hace everything you want out of the box but it covers pretty much the listed software and settings of the OP. It might be worth checking it out.
Www.turnkeylinux.com
Seriously, there's an entire IT industry setup to solve this problem. Just go spend a few hours reading through a tutorial on Ansible, chef, puppet, SaltStack, whatever else written in whichever language you prefer, whip up some recipes/manifest/playbooks/whatever, and stop wasting time hand tailoring every deployment. Even better, you can set things up in a way that choice of distro really isn't that big of an issue.
Or, if you want to be all cutting edge, look into using docker or some other container system to handle the automagic deployment and testing angle.
If you're doing PHP development and want a off the shelf solution then I would point you to the Laravel Homestead. http://laravel.com/docs/5.0/ho...
Brought to you by Team SPAM! where we believe: "Information in the noise!"
It's a pre-rolled VM specifically for web application development. You pick the distro and software versions and it'll set it up as a VM for you. This is an awesome configuration tool for it: https://puphpet.com/
I suppose you could transfer that to a real disk and try and run it as a filesystem, but it's purpose-built -- no window manager or anything out of the box.
Would you think there's a need for this sort of thing and would you base it of Debian or something else? If you do web-dev, how do you do it? Prepareted scripts for setup? Anything else? ... Ideas, unkown LAMP distros and opinions please."
Why preparet when parrots work so well on demand?
Setup a vagrant file for whatever development needs you have and your good to go. http://src.tf/vagrant
That seems pretty quick to me. Whenever I setup a new machine it takes me at least a full day to get configured the way I like (admittedly I don't use LAMP, but still). What exactly is the problem with this?
This is not a base OS configuration problem. It's a personal taste of working environment problem, especially for your environment's web server needs.
So look to service configuration tools, like cfengine, puppet, chef, or any of the dozens of other tools that already have setups for this.
I guess what you are looking for is something like Vagrant or Docker to have stacks depending on your different codes. ...
Sites like https://puphpet.com can help you to set up your environment in minutes for Vagrant, the same must exist for Docker
He is looking for a distro that is setup right straight from the box to the iron?
Sounds like he needs an IT admin. Sorry, I don't see why anyone worth a fuck would ask that question.
I have used zpanel in the past, and it works fairly well. That project is somewhat abandoned, but the main devs have forked and called the new project Sentora. http://www.sentora.org/ They just made the first stable release, might be worth looking into.
http://drubuntu.github.io/drub...
There are some distributions that are ready to go with web development out of the box. You might want to look into Turnkey Linux appliances. That way you get LAMP running as soon as you install the distro. the next closest thing would be to run something like Ubuntu Server and install the LAMP tasksel pakcage at install time.
Another way to go would be to set up what you need once and then take an image of it. Assuming you are using a virtual machine, just take a snapshot of what your development environment is and you can replicate it elsewhere. On physical hardware, using Clonezilla will allow you to create endless clones of a server development environment.
Basically, no, there aren't many "out of the box" solutions for web server/testing, but it is pretty easy to set these up once and then just keep using the same image.
We don't do things by hand anymore today: it does not scale and it is not repeatable.
Vagrant changed my life! Learn about Vagrant, use shell and evolve towards Chef/Puppet provisioning, then optimize toward application containers to go even faster. You'll gain the benefit of keeping your customer development environment on your Windows/Mac/Linux desktop or laptop while being able to test multiple different projects for different business clients reflecting their production environment.
I had a lengthier example, but I lost the post. Anyhow, this is the beginning of your journey to immutable infrastructure as code: a lot of buzzwords that won't mean anything until you complete the journey..
Vagrant is part of a free toolset ecosystem (Packer, Terraform, Consul, etc.) which solve modern infrastructure issues that the OP is expressing: the Vagrant creators are smart and approachable in the forums and I've had the chance to meet some in person to confirm they are humble and generous souls.
My opinions are my own, but you may share them!
Try Virtualmin. It has a web gui interface to configure things like vhosts, along with mod_fcgid, php, etc. It installs and sets up a bunch of extra crap as well that you probably won't need, but it's so quick that might be worth looking at anyway and just remove what you don't need.
you said you spin up VMs for your dev, why don't you just have a pre-configured images with all your settings to clone from? And you might be able to deploy that image to some hosting provider if it's in the correct format. You should be able to make a script for most of your commands for a remote server, though you might need several different ones depending on target OS.
This may not what you are looking for, but the Bitnami stack is pretty good. You basically install a core module and then you can install other things as "apps" that may depend on each other. You can also just start with a VM image, which will save you even more configuration time.
Isn't that was Vagrant is for? Just spin up a preconfigured vm for every task and don't worry about the particulars. If you configure your vagrant box with puppet you can even use that puppet script to deploy to production machines.
I've also been using Linux for 15 years and it doesn't take me hours to setup new machines. Though I have all my shit scripted.
I am a webdev role. We use Vagrant on hosts to provision local vms.
So its a simple of typing
vagrant init (box name)
vagrant up
vagrant ssh -c 'my config script'
As others have pointed out there's various installer programs that will get you a consistent environment to work in.
You really want to keep your development environment and local system separate and VMs are a great way to do it. Just as a quick starting point try using Vagrant with Virtualbox and scotchbox which is a simple LAMP setup ready to go.
Run a headless VM, treat it like a remote server. This is better than using your own system for many reasons. It allows you to configure your test environment as closely as possible to the actual production server. Since its a VM you can easily move it to another system if needed. You can clone it and test updated software versions. Also you can allow automatic system updates without mangling your dev environment.
Just a simple thing like installing a git server (try gitlab) on a VM can really help modularize your workflow and allow you greater flexibility on your actual workstation.
Cwm, fjord-bank glyphs vext quiz
I've had great success using remastersys Set up the distribution exactly how you want, then create an image which can run live or be installed on virtual or real machines.
Of course, the distro should include a copy of all versions of IE, to test your website on.
If Pandora's box is destined to be opened, *I* want to be the one to open it.
And I'm ready to do web development. I don't need a distro, It takes longer to download NodeJS than it does to have it ready for development.
Another idiot that can't Google! I had this same question three years ago and answered it myself with two or three Google searches. WTF people!
A bit tongue-in-cheek, but...
Package.json + npm install is a lot easier than dealing with zypper, yum, rpm, and then 30 other package managers I'm forced to juggle with on all the different distros I encounter. Obviously I'm brainwashed, but I've been 100%* node for over a year.
Granted, setting up ___sql will pretty much always be a 1-hour job, i'm glad to be free of the A and P in LAMP.
* except when a new contract requires me to dive into LAMP again
https://www.accountkiller.com/removal-requested
Also, I forgot to mention, Puppet Labs' IT automated config is pretty effing amazing. I've been trying to dedicate time to ramping on it, and have been to a few classes at their office in Portland, but it is definitely on my list of tools to learn.
http://puppetlabs.com/
https://www.accountkiller.com/removal-requested
Heh, as someone who's done web development from both OSX and Windows, by far the most annoying task was trying to figure out how to do things that were simple in Linux using cygwin in Windows or using homebrew on OSX. Good thing it's so easy to throw Linux on a fullscreen VM so I can still be productive while I figure out all of the issues and workarounds I run into on Win/Mac.
I was happiest when I had Linux on the bare metal, and tossed Windows into a VM to handle all of the office crap. That ensured that Outlook never ballooned to use more than a GB of RAM, and I could easily suspend the VM when I didn't want annoying popups and notifications jumping out in front of my work.
where the more you know, the harder it is to answer.
Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
I use puppet for this sort of thing. I have a set of manifests which describe the basics of a VM I use for development, and I make changes based on whatever project I'm working on. These manifests usually get added to a repository either for developers; or (when possible) production
-- 'The' Lord and Master Bitman On High, Master Of All
Yes there is www.turnkeylinux.com.
Install it and an app in cli appears. Apache, mysql, phpmyadmin, I net settings, everything.
I am a huge fan! They have about a dozen other appliances and it pulls from the Debian wheeze distribution
http://saveie6.com/
Why aren't you just configuring your own VM image and starting with that?
That is all.
But have a look at xampp
:
https://www.apachefriends.org/...
It, and it "spiritual" peers, wampp (Windows)
http://www.wampserver.com/en/
mampp (Mac)
http://www.mamp.info/en/
Are commonly used in my local wordpress community for doing web dev work, as is the also mentioned bitnami
Why not use a base distro like Fedora, and add what you need. I mean, that's what a general purpose distro is for, right? This question never occurred to me before. By the time I pull in my software development tools, Apache, and whatever else (infinite piles of Java crud for J2EE like Hibernate), I've basically installed the entire universe. That's not counting other tools like python for exercising web services and stuff like that. What would a development distro do exactly that a general purpose one wouldn't?
Disclosure - I am part of the Flockport team. This is the exact problem Flockport tries to solve with LXC containers. You can download containers of popular apps and web stacks and launch them in seconds.
And you get all the advantages of LXC containers; portability, flexibility and near bare-metal performance. You can deploy multiple versions of apps and stacks all in their own containers, you are not wedded to any host, your apps and workloads in containers are portable and can be moved easily across any Linux host. It's like a mobile server. And you get clones, backups, snapshots. It's a complete delight to work with.
LXC containers are lightweight and give you all the advantages of virtualization without the performance overhead. LXC is supported in the vanilla Linux kernel and most distros have ready to install packages, we have a repo for Debian Wheezy as it doesn't have updated packages. You have to install LXC and after that every thing is a quick download and deploy.
karma
Webmin will load all the right packages and set up Apache, mail, DNS etc. for you on a variety of Linux distributions.You can use it like a control panel afterwards or just ignore it and use the usual text config files and the command line from then on if you want. It's free and quick to run. I find it saves a lot of time (and mistakes). I made a tutorial if that's any use.
Phil McKerracher
You know, with only one additional keystroke you could have written the actual word instead of a dumb-looking of word.
It's focused on running web apps, rather than developing then, but if you can get Apache and PHP and MySQL etc for a webapp like ownCloud fully installed and configured with a single command, as UBOS does, it may help you anyway. UBOS is a very small distro but you can always point your repositories back to Arch, from which it is derived, and that should give you whatever packages you want.
I use Bitnami.
then you probably shouldn't have root to begin with. Try a CPanel/Plesk/Webmin interface that configures this for you, and a virtual hosting provider that spits out pre-packaged images you can connect up, and simply accept that you're using *that*, but "powered by LAMP" of some type.
Alternative: Virtual hosting configuration is *not* that hard any more, even if you're just editing text files.
Pithy Alternative: Don't ask a sysadmin to hold the hands of a brogrammer unless we're getting paid (well) for it.
Hire a Linux system administrator, systems engineer,
Ive used linux i guess power user i suppose, just as a hobby the thing that scares the hell out of me about it, is when a root level bug is found its usually been there for 6 + years.
It's called OS X. The only person still using Linux for development is Linus Torvalds.
>setting up vhosts on Apache (always an adventure),
Use nginx. It's never been an adventure to setup vhosts for me. It works pretty simply.
Replace PHP with Python + Flask. Replace MySQL with PostgreSQL. Replace Apache + php-fpm with nginx + uwsgi. Spell out GNU/Linux properly.
Now put it all in a Docker container, or write an Ansible playbook. Problem solved.
That's like asking "is there a car for those days when I have to take my daughter to school but I"m menstruating."
Liberty.
CentOS & Webmin/Virtualmin do everything you're asking for and more.
Let's make like a bird... and get the flock outta here.
Why not setup a base LAMP VM, clone it and adjust to your needs for a project?
Chewbacon
The Bible is like Wikipedia: written by a bunch of people and verifiable by questionable sources.
I often develop for VPSes running CentOS and DirectAdmin.
So i got a VPS like that for ~€14 /month. I upgrade pretty much the LAMP stack using DireactAdmin custombuild, and have VPS snapshots to easily roll back to in case i broke something. I need to maintain the VPS though, but my hoster informs me about (and how to fix) the latest critical bugs. Its simple and enlightening.
Developing this way is quite versatile too; i make a user per solution. I can backup that user and import it on other servers (production) or just archive this username.tar.gz file. This backup bundles relevant files, databases, accounts such as email or ftp, even DNS records if i want to.
Hivemind harvest in progress..
Thanks for the feedback. My conclusion is, that I'm going to look into a few variants of solutions, one main track being ready-made VMs of my favourite installation, the other being Debian FAI. ... I'm pretty sure I'm sticking with Debian for this task, so FAI is probably the way to go. I will look into Puppet aswell, although I'm not sure yet if it's usefull for speeding initial installation and setup of individual systems.
I wasn't aware of the Turnkey Linux stuff, so thanks for that tip aswell.
I also understand the notion that setup and configuration is bascially our job as devs and IT experts, nevertheless, I suspected that the strong presence of LAMP might have brought about something ready-made that speeds up the task a little. ... I'll start rolling my own solution and perhaps put it online some day for others to use. ... Scratch your own itch, they say, don't they?
Once again, thanks for the feedback.
We suffer more in our imagination than in reality. - Seneca
nice docker script would
this is actually a good question - but rather than choose your desktop distro based on this, choose a Docker machine that will behave the same no matter where you go.
for example, this is a docker machine to be used with Ruby on Rails.
I got as far as "... setting PHP config options.." and your issue became clear.
I'm a fairly well-qualified PHP hater having spent/wasted several years on it. Anyway, Vagrant is excellent. If you were to see the light one day and say use Python, you'd be using virtualenv, which would also greatly reduce your pain.
[FrLz]
automate!
seriously, who still does this stuff manually these days?
On a long enough timeline, the survival rate for everyone drops to zero.
take o look at vagrant VM manager. at the beginning, you create your own config files (provisioning included) and youre ready to go wherever you want to.
the best way to do any kind of coding, but web development especially, is through VM. why for gods sake would i spent time with apache vhosts, when i can simply run a separate VM for each project/domain? those project can share the same source files on host machine, yet still have different configs on virtual server (mod rewrites, sql connections and ports, file permissions...).
such a setup is easy to deploy on any kind of co-worker work station (windows, unixes), can be manually tweak without any touch to the host system. i cant imagine installing all those software on my host (currently: redis, apache, ngynix, 5x mysql, neo4j, tomcat, confluence, ~10 different web projects). its just not managable anymore.
Rather that rolling a specific distro for this - which is not a trivial task to create, or maintain - wouldn't the better approach be to write a distro-neutral Chef Cookbook (or Puppet equivalent) that brings any system to your desired state?
Why would anyone want a whole OS tuned for such a purpose?
Use whatever distro you like and configure just your text editor / IDE / whatever. Use something like Vagrant (https://www.vagrantup.com/) to set up your dev environments.
Why not just use docker containers? You can then save the docker image and replicate as many instances as you want, across machines. You can also fire up different versions of the same container on your local machine for different projects (so you don't have to worry about config file stomping across different software stacks).
Yes you have to do the initial setup, but every place I've worked always had the 'magic script' or whatnot that everyone used to pull down needed libs, link files, set environment variables, and so on. Do it once, save the image, and boom! Finish line.
"The mind is a terrible thing to, um, uh, oh bollocks." -- Me
If every time you build a VM or host to do this development on you have to spend 1-2 hours doing a config, you're doing it wrong!
Make a checklist of stuff that needs to be updated and keep around copies of working config files. Chances are you typically like all the same settings and for the most part you can just drop a php.ini that you have that worked and be done with it.
Same goes for VHost config files.
Same goes for installing necessary things. copy/paste the yum or apt command lines to install them.
Better yet, keep around a VM Image that's all ready, just change the hostname/IP etc and you're done. Take advantage of snapshot functionality in your hypervisor.
"If you love someone, set them free. If they come home, set them on fire." - George Carlin
On Windows Azure, OpenStack, Citrix and even the ever-lame VMware,there are extensive orchestration tools. Write your script once and next time you need a server, click deploy.
In addition to Puppet, Chef, and other obvious automation choices, you should check out NixOS. It's a distribution geared around declarative, reproducible configurations that you can reuse as needed. It has some advantages over the other options because the distribution itself goes out of its way to eliminate unwanted sources of internal state within the installed system, which is the chief problem with other automation approaches.
It already exists and it's called an automated install. In the Centos-RedHat-Fedora world, it's called a Kickstart while in the Debian world it's a preseed.
This is really simple: you create scripts that does everything for you and voila, you can recreate the same machine again and again. the only canvas is when you install a new release but if you go the LTS way, that means you redo your script(s) once every 4 years.