views:

112

answers:

3

In short:
I have a multiboot machine with Win XP, Windows 7 and Ubuntu, and I would like my localhost web projects to be shared by all three OSes.

Details:
I finally want to get rid of Windows XP for my web development work, but my local Apache + PHP + MySQL stack is tied to my old OS, and I spent some time and thinking to tweak this setup up to the way it is now.

It would be great if I could have the databases and web files in a location that is independent of the current OS, so I can reboot with a different OS and continue working on the same projects.

Ideally I would also want to keep and share settings and files for other applications (Firefox addons, Opera keyboard shortcuts, Mail and chat accounts, Eclipse settings etc), but that's probably another issue.

If possible, I would like to avoid serious performance hits.

And finally, once I pick a solution, it would be nice if I can find an easy way to port settings from the Windows XP setup to the new shared environment. Especially: databases, htdocs folders, vhost settings.

Is VirtualBox or vmware a solution? Or something with portable apps? Or should I run separate Apache / MySQL / PHP on each OS and then make them share their setup and htdocs files?

Thanks!

+2  A: 

I have a multiboot machine with Win XP, Windows 7 and Ubuntu, and I would like my localhost web projects to be shared by all three OSes.

You will find more difficulties than benefits trying to work on multiboot.

The solution (I current using and) you can try out is virtual machine. I have a WAMP stack on a VM using VMWare, other VMs for different purposes and all talks to the AMP stack VM as web server.

You have choice to develop on your physical machine or in one of your VM. You may also share the same instance of VM in different OSes (depends on the choice of your VM software).

This worked out great for me after I seperate my WAMP stack with physical machine and development environment as I now can blow up or time travel my WAMP VM after mis-/experimental configurations while not effecting os performance or have to more file repository around.

rockacola
Thanks! Some more questions, in case I go with a VM solution.1) What is the performance impact of having the AMP stack on a VM instead of the OS itself?2) What kind of setup do you recommend for the VM ? How much disk space etc?3) Does it make sense to have Eclipse IDE on the VM, or is it better to run that on the main OS, with access to the files on the VM ?4) VMWare vs VirtualBox - Any reason to prefer one or the other?
donquixote
Time travel? And if you have a "WAMP VM" does this mean your VM is running Windows? I had the idea that some type of Linux would be the better choice, or not?
donquixote
Answer to 1) Depends on your VM software, your VM *should* mimic how a real machine behave and the performance is reflected directly by your config on AMP stack VM settings. Also, it is an industrial practice to have server sitting in VM.
rockacola
Answer to 2) For hobby website development a dual core processor with 3GB RAM will get you started. My recommendation for VM is single core with 750MB of RAM. HDD space is depending on your usage, however I recommend you to prelocate your virual HDD (oppose to dynamic) for performance.
rockacola
Answer to 3) Yes you can have IDE in VM with no problem (at least for windows developments, it's more painful to VM a mac). My personal development workstation config as: physical machine does nothing but host VMs and repositories; 1 XP VM for generic usage include dev; 1 XP VM for WAMP stack.
rockacola
Answer to 4) I'm a VMWare Workstation (Commercial) and Server 2.0 (Free) user and have never use other software. Sun VirtualBox is a close competitor with VMWare and should provide as much if not, more feature than VMWare Workstation has to offer.
rockacola
Answer to 5) (Time Travel) VMWare Workstation allow you to take snapshots and you can time travel back to previous instance with easy. It is a great feature for debugging software in different state, but not that useful for web development. You can setup LAMP stack in VM, which is common.
rockacola
+4  A: 

Same here, as rockacola said, It has its difficulties but there are workarounds.
you can change your localhost path by editing Apache2 configs, in Ubuntu edit the file at /etc/apache2/sites-available/default and change your DocumentRoot value. Also symlinking could be a good idea.
You can copy the MySQL data folder of your XAMPP/WAMP installation into /var/lib/mysql in Ubuntu. rsync might be a good solution for MySQL data synchronization issue. Also I have a script to periodically synchronize the MySQL data folders across OSes.

Sepehr Lajevardi
A: 

Sharing config files will be more trouble than it's worth. Just sharing htdocs, well that's a different story. I have a similar problem myself. The real problem is MySQL. AFAIK, MySQL table data is not portable. You will need to use phpMyAdmin or something to copy the data from one OS to another. I am assuming you are using the Windows partition for htdocs and symlinking it in Ubuntu. This should not be a problem, but be sure permissions for the files are set up right if they need filesystem access or something.

George Edison