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

Problems with the Windows version of XAMPP, questions, comments, and anything related.

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

Postby Tomica » 18. September 2011 16:18

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?
Tomica
 
Posts: 8
Joined: 18. September 2011 16:01

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

Postby Sharley » 18. September 2011 16:29

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.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

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

Postby Tomica » 18. September 2011 16:44

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?
Tomica
 
Posts: 8
Joined: 18. September 2011 16:01

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

Postby Sharley » 18. September 2011 16:48

You tell MySQL where to look for the data folder/directory in the mysql\bin\my.ini file.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

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

Postby Tomica » 18. September 2011 17:17

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.
Tomica
 
Posts: 8
Joined: 18. September 2011 16:01

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

Postby Sharley » 18. September 2011 17:23

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 :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

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

Postby JonB » 18. September 2011 17:31

If anything is dependent on File Permissions, its a no-go
also - what file system were you thinking of putting on this shared partition?

:?:
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

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

Postby Tomica » 18. September 2011 17:41

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?
Tomica
 
Posts: 8
Joined: 18. September 2011 16:01

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

Postby JonB » 18. September 2011 18:16

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)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

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

Postby Tomica » 18. September 2011 18:37

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"
Tomica
 
Posts: 8
Joined: 18. September 2011 16:01

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

Postby JonB » 23. September 2011 22:58

To the OP -

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

viewtopic.php?f=17&t=44954

8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 120 guests