Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm a PHP programmer who would like to stop editing files on the live server over FTP (please don't taunt me), so I'm thinking about replicating the live server environment inside a virtual machine locally so I can edit files more quickly and use a php debugger.

My requirements are:

  • lightweight -- it will run in a VM and my computer isn't very powerful
  • small -- HDD space is limited, too; would like to stay under 1 GB per VM
  • GUI -- I haven't really used Linux before, so I'd be more comfortable having a GUI (even if as an option)
  • work out of the box -- I know administering a server is no easy task, but I just can't devote enough time to it, so it'd be great if I didn't actually have to install and configure Apache, PHP, and maybe sendmail myself.

I'd appreciate recommendations or any other tips. Thanks!

share|improve this question
2  
I won't taunt you, since many of us started there. Using a Dev server that replicates Live is a great step, but I would urge you to also start using some version control system. In my opinion it's one of the few tools every developer should know. Check out this visual guide to version control which explains the why and how: betterexplained.com/articles/a-visual-guide-to-version-control As to which VCS to choose, I would suggest skipping Subversion and going for something like Mercurial or Bazaar. Git is popular, but I believe the learning curve is too steep. Good luck! –  Martijn Heemels Nov 7 '09 at 14:13
    
@Martijn I'm in the same situation the OP describes - I edit live over FTP and want to emulate the server on a VM - but I do use version control! Actually I have the server's FTP plugged into explorer (via NetDrive), so TortoiseSVN is always a couple clicks away. I don't keep a local project folder because I rarely code when offline. –  Camilo Martin Mar 20 '11 at 17:55

7 Answers 7

I don't know why your requirements are so constrained. These days, you can get 500 GB hard drives for less than $70, or 8 GB SD drives for less than $30. If you're even more astoundingly broke than that, you can pick up a 2 gig SD drive for less than $10 at the same store.

Nevermind that entire Netbooks can be had for $200 these days. I have a version of Ubuntu running on my EeePC.

But here's the solution I use at work (with a desktop machine dedicated to Ubuntu, which is pretty old actually), and it's ideal:

  • The latest version of Ubuntu
  • Ubuntu's LAMP/web server install
  • Kdevelop

Kdevelop is the cat's pajamas for PHP development as far as I'm concerned. It's a multi-language GUI IDE that has all the debugging tools you'd need, lets you run your code locally (when the LAMP stack is installed), and has a built-in web browser to view your output and read the PHP documentation online. I can't imagine a more perfect solution.

With Ubuntu, you don't really have to know much about Linux. The learning curve is pretty shallow - it's like learning a new version of windows at worst, and all that software is available through its internal package manager. Just tick off a box and wait for your software to download, basically.

share|improve this answer

Personally if you are keen to learn about the stack I would use ubuntu server there are plenty of tutorials so you don't have to worry too much about the GUI. The optimal setup would be a VM which replicates your remote environment however in that way you can aim to ensure that you have the same versions of MySQL and PHP etc. I know this will use more resources than you intend however something you might find worthwhile.

share|improve this answer

I think you'll find this interesting:

Grandma's LAMP

There are a bunch of other LAMP (Linux, apache, mysql, php) server appliances where I found that one:

http://www.vmware.com/appliances/directory/cat/0?k=lamp

share|improve this answer
    
+1 Oh nice find...I didn't even think about a virtual appliance. But I do think there is only so much you can do to avoid learning to properly configure apache and mysql if you're going to call yourself a web developer that's using a LAMP stack. –  3dinfluence Oct 30 '09 at 14:26
    
These look interesting. I also found Turnkey Linux turnkeylinux.org which offers both "appliances" and installable or bootable ISOs. –  Robert Cook Oct 30 '09 at 19:50

The easiest way to do this is to use VirtualBox for virtualization. I'm assuming your development machine here is Windows b/c you mention not running Linux before.

For OS I would recommend Ubuntu Server. It doesn't have a GUI but you're not going to get a GUI/LAMP stack in under 1GB of space. Ubuntu will ask you what tasks the machine will be doing as part of the installation. Just pick LAMP and it will install PHP, MySQL, and Apache. At some point you're going to have to learn how to configure the web server if you're doing web development. Same with the basics of MySQL if you doing anything that's database driven.

If you really want a UI you can try WebMin but I think you're better off just learning how to configure these services.

You mention Sendmail but with the more modern Sendmail compatible MTA's available there's no compelling reason to use Sendmail these days unless you prefer it's cryptic configuration. But I think most will agree that Postfix or Exim are much easier to configure if you need a full blown MTA.

share|improve this answer

You should try Tinycore Linux. I've had a lot of fun with it.

http://tinycorelinux.com/

share|improve this answer

If you're using Ubuntu as the Host operating system, you can easily create lightweight Ubuntu Server virtual machines running jeOS (Juice) easily with vmbuilder.

Official documentation: https://help.ubuntu.com/9.10/serverguide/C/jeos-and-vmbuilder.html

share|improve this answer

Umm, why don't you edit the files locally rather than building a server? Install XAMPP and you're finished.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.