Develop in a Virtual Machine
After much time spent struggling with Mac OS's odd version of Unix, I've come to really appreciate developing in Ubuntu Server inside of a Virtual Machine.
You should too. It will save you time. Here's why:
(And if you scroll down, you'll see a link to tell you how!)
- Increase your server-foo quickly. Tasks which MAMP automated for you become first-hand re-usable knowledge. The result: You can easily find your around most web servers, and get a feel for why errors or issues might arise. This has saved me more time than I am willing to count.
- Your OS stays clean. I have installed zero web-server apps onto my Macbook Air. It's still pristine. No apache, no mysql. No Xcode. No fear of an OS upgrade breaking Git. No wasted time ** fixing Mac OS oddities. No **time wasted on Brew.
- Your development environment is your production environment. I use Ubuntu Server for development. (I like its package manager. I like its pre-configurations. I like easy.) If I can, I use Ubuntu Server for my production environment. I run into most issues ahead of time in my virtual machine so I can have a smooth project launch.
- Projects can be separate. For larger projects, I create a VM just for that one project. This lets me test out systems I might otherwise be hesitant to install (Redis, Memcache, Sphinx search, just to name a few things I don't want in my main server instance). That way I have configurations setup ahead of time, and have worked out any kinks in my application.
- VM's are lightweight. I run my Ubuntu Server VM off of an external harddrive with no slow-down. I often run multiple VM's at once on my puny Macbook Air. No problem.
- They can fail without stressing you out. You can copy your VM at any point. You can rebuid your VM at any point. If you keep your code in a cope repo, you can waste little time setting another server. Note: I've never had a VM server crash.
- You can develop on your favorite OS. Some of you still use Windows. A VM levels the playing field. Use your favorite or most efficient development practices while still being able to do anything *nix-y you need to.
In the 6 months since I've begun developing on a VM, I've gone from little server knowledge to setting up secure, load-balanced, backed-up and replicated server architectures.
Tip: Record every new command or process you learn. Including installing/setting up a server, installing a LAMP server, and any tool that gives you a hard time, or configuration you want to remember.
Tip: Create a server virtual machine, and then copy and paste that VM for all your other VM's. You can create a server onces and re-use it to your hearts content whenever you want.
How? Yes, the important part! Here's how to develop in a virtual machine with Ubuntu Server.comments powered by Disqus