Page 1 of 1

A server shared between two installed OS (Ubuntu and WinXP)

PostPosted: 18. September 2011 16:18
by Tomica
Hi guys.

is there a way to have two operating systems (Ubuntu and Windows XP) installed side by side on a machine with XAMPP/LAMPP installed on both, so that the same hosted projects are accessible regardless of which OS is running?

For example, I would create three partitions, like so:
  1. Ubuntu
  2. Windows
  3. Server
Both OS would have XAMPP/LAMPP installed, but htdocs, databases and such would be hosted on the Server partition, and thus be accessible by both installations.

Is such thing possible? And if yes, does anyone have any suggestions on how to do it the best way?

Re: A server shared between two installed OS (Ubuntu and Win

PostPosted: 18. September 2011 16:29
by Sharley
Look into (research) VirtualHost as it will give you the ability to have a DocumentRoot (htdocs) in any location you choose.

Sharing a database on different OSs may be a little trickier, not sure if it is possible but someone on here may have had some experience with that aspect of your query.

Sharing anything on different OSs could prove difficult for obvious reasons.

Re: A server shared between two installed OS (Ubuntu and Win

PostPosted: 18. September 2011 16:44
by Tomica
Thanks Sharley for the quick reply.

I also thought that sharing htdocs would not be that much of a problem. What I don't know is can the databases be shared too. And also, should anything else apart from these two be shared?

As you said, sharing anything between two different OSs can be tricky, but I'm asking this because I managed to restore into Ubuntu my server backed up from Windows, so that got me to believe that this is not something impossible.

To be honest, I still haven't tried doing this, but having in mind that htdocs can easily be moved to another local partition, and supposing that database files (well, at least the MySQL ones) could be moved from [INSTALLDIR]/mysql/data, there might not be that much more to be done to achieve this.

Any other suggestions?

Re: A server shared between two installed OS (Ubuntu and Win

PostPosted: 18. September 2011 16:48
by Sharley
You tell MySQL where to look for the data folder/directory in the mysql\bin\my.ini file.

Re: A server shared between two installed OS (Ubuntu and Win

PostPosted: 18. September 2011 17:17
by Tomica
Ah, cool then :) I guess I better give it a try and I'll post the results here later on. MySQL is probably only important to me, I'm not planning to work with other engines any time soon. Thank you once again Sharley.

Re: A server shared between two installed OS (Ubuntu and Win

PostPosted: 18. September 2011 17:23
by Sharley
Your most welcome 8) and please do post back as I and most likely other readers would like to know how it all pans out.

Good luck :)

Re: A server shared between two installed OS (Ubuntu and Win

PostPosted: 18. September 2011 17:31
by JonB
If anything is dependent on File Permissions, its a no-go
also - what file system were you thinking of putting on this shared partition?

:?:

Re: A server shared between two installed OS (Ubuntu and Win

PostPosted: 18. September 2011 17:41
by Tomica
Well, to be honest, I wasn't thinking much about anything :) It was just a question off the top of my head. But I guess Ext4 is out of question and Ext2/Ext3 would require some tweaking around Windows installation, so I'd probably go with NTFS or FAT32, probably the former.

Also, I've completely forgotten about permissions :roll: JonB do you have any idea about what kind of problems would this cause, regarding permission and in general?

Re: A server shared between two installed OS (Ubuntu and Win

PostPosted: 18. September 2011 18:16
by JonB
The database idea is way, way out there - that would take a bunch of MySQL researching. You would have to have a common symbolic link (or the right entries in my.cnf and my.ini) to the data files (that would be all you could have in common). It might work - MySQL really doesn't care (from an internals point of view) what OS it is on. I just don't know enough of the super-technicalities of it.

As far as the partition - it would probably need to be FAT32 (just a guess) as it supports the CIFS spec.

You won't be able to control anything that is in the serverspace that is on the shared partition that needs execute type access, I don't think. FAT32 doesn't support that, nor Unix style file permissions. Maybe you could do some .htaccess methods to get around that. Saying that, I think the Linux side will be the tricky thing -

My best guess is that it would work for static content, but is likely to be a headache for anything else.

BTW, XAMPP for Linux is nothing at all like XAMPP for Windows, other than the Sample apps and common elements in the 'XAMPP Security Concept' and the fact its an all-in-one installation. Its much more like a traditional LAMP stack, and you need a fair knowledge of Linux at the CLI level. (if you were thinking along those lines)

I'd also be very interested to see someone make this work. many, many, many challenges. I think if you search enough, someone did something close, I just don't recall the details.

Good Luck and keep us posted. Be sure the coffee/tea/beer/whatever is on hand and ready...
8)

Re: A server shared between two installed OS (Ubuntu and Win

PostPosted: 18. September 2011 18:37
by Tomica
Sure thing ;) I'll keep you guys informed. Thanks once again for the advices and wishing me luck :)

Just for the record, regarding htdocs folder, it can be moved by editing httpd.conf and changing this line:
Code: Select all
183. DocumentRoot "C:/xampp/htdocs"

Re: A server shared between two installed OS (Ubuntu and Win

PostPosted: 23. September 2011 22:58
by JonB
To the OP -

I knew I had seen it - Shared server problems w/MySQL

viewtopic.php?f=17&t=44954

8)