Jump to content

Virtualisation: LAMP


islingtonclaret

Recommended Posts

Continued as per the wireless thread.

I was surprised at how respectable Debian runs on OracleVM - it's not exactly pulling up trees but for a virtual server on a Pentium 4 it'll do the job.

 

So, next question is one of the reasons we all want virtualisation: virtual networking. I realise I can't just "ask" about virtual networking and I'm about to read an extensive chunk of OracleVM's networking manual, but for infrastructure knowledge is it safe to assume that I can have:

 

1. Host machine

2. Virtual machine 1 (MySQL database server)

3. Virtual machine 2 (Apache HTTP, PHP, any web content served such as PHPMyAdmin)

4. Macbook plugged into host machine via. direct Ethernet crossover cable, to connect into front end apps

 

All on the same network with a 1-4 range of internal addressess? Cos that's what it looks like to me....

Link to comment
Share on other sites

In virtual world you can have either:

 

1. Bridged - Generally the best if you need to access the stuff on the virtual machines. The VM just operates on the networking interface you choose e.g. your wireless or LAN adapter and gets its own IP from your DHCP server (normally your router), or you manually set an address if you want to.

 

2. NATd - The VM operates in a dynamically chosen network and uses your physical OS as the gateway to get out. This is the simplest way if you just want to run a VM to browse the web and do stuff where you wouldn't need to connect into it.

 

3. Virtual only network - Where your host OS is given a virtual interface to talk to the guest OS and vice versa, but the VM can't get out, and there's no way in from another location. You can still get to it, but no-one else can.

 

How much memory have you got? A slim Debian server might be usable as software virtualised if you're only running one, but once you start cranking Apache and MySQL past idle, you'll start ballooning your memory and the vCPUs will start fighting for interrupts with multiple VMs on there.

Link to comment
Share on other sites

OracleVM might be the wrong description. I think the correct description should have been Virtualbox using OracleVM. So yeah, it's just virtualbox.

I did start looking at the NAT vs Bridged, and clearly bridged is what I need as the host will need to network to and share files with the virtual servers.

 

There's two things I'm trying to achieve. One is a virtual networked development environment. The other thing is knowledge. The reason, for instance, why I might seperate out the database server and the web/PHP is because it's difficult (I understand from running WAMP stacks that it's far more difficult to piece this stuff together). But yeah, for work, it's learning nooks and crannies.

Link to comment
Share on other sites

Separating the parts is so easy, I'd use the word trivial. If you are doing it as a learning exercise, then great, but there is no other benefit to running multiple virts for what you describe.

Link to comment
Share on other sites

Ah you are a man of few words!

Well in that case, I'll do it once and then put the whole stack on one server.

 

Next question: in your opinion: better to get a pre packaged LAMP stack (XAMPP springs to mind, plus I think I saw it's in a .deb package as well which is useful) or piece the thing together? I suppose I'll have to piece it together first anyway if services are going to be running on serperate instances

Link to comment
Share on other sites

Ah you are a man of few words!

Well in that case, I'll do it once and then put the whole stack on one server.

 

Next question: in your opinion: better to get a pre packaged LAMP stack (XAMPP springs to mind, plus I think I saw it's in a .deb package as well which is useful) or piece the thing together? I suppose I'll have to piece it together first anyway if services are going to be running on serperate instances

sudo apt-get install mysql-server apache2 

 

= LAMP stack

  • Like 1
Link to comment
Share on other sites

Or even this to get all goodies at once.

 

sudo apt-get install tasksel

sudo tasksel
 

pirat9unixmen-laptop_001.png

 

edit: Only tried this on ubuntu

Edited by Tegis
Link to comment
Share on other sites

Fun fact: I was the first one to propose task-based metapackages for GNU/Linux distributions.

(unless Debian had them prior to 2003, but I don't recall that being cited as a nice thing about Debian and considering the number of Debian advocates I was hanging out with back then...)

Link to comment
Share on other sites

No not apt.

The .deb package format supported "Recommends: ", so that (especially for software which had a plugin-type architecture) optional-but-nice-to-have companion software could be specified without explicitly requiring it.

At the time I was involved in the development of Mandrake Linux, which is rpm-based. RPM doesn't support Recommends:, and at the time there was a whole lot of those optional-but-nice-to-have stuff which had become a hard requirement along with a movement to pare it back to just the essential requirements, with much gnashing of teeth that RPM didn't support a Recommends-type requirement. So I proposed meta-packages which would be nothing but requirements for packages that worked well together with enough configuration file modifications to make them work together. It took a few years (during most of which I was off the grid), but eventually various distros incorporated the idea.

Whether my post to the Cooker list back then set that into motion, I don't know. But unless someone shows a mailinglist post that predates it, I'm taking credit...

Link to comment
Share on other sites

×
×
  • Create New...
Â