I am planning to install OpenVZ on Centos 6.3 and create containers using OS templates.I understand OpenVZ creates Virtual Private Servers.So is there a need to install LAMP in the host distro before installing OPenVZ?
Asked
Active
Viewed 136 times
1 Answers
3
You only need a LAMP stack when you want to present a web server.
If you are wanting to run a number of virtual servers via OpenVZ on a single hardware server, you should not install the LAMP components on the host OS. Install them on the guest OS's if you need them.
On the other hand, you may wish to have some management and reporting via the host OS, in which case, there may be a need for a web server to be running, check the requirements for the management and reporting tools.
Julian Knight
- 14,313
- 3
- 27
- 41
-
What I need is a single physical web server that runs many containers each one an exact copy of the original web server.Each session (container) should be assigned to a dedicated web server and isolated from other sessions . – charmin Mar 03 '13 at 06:20
-
Sorry @charmin but you don't need that! You need a single physical HOST in which to run many guest virtual servers. You **can** do this with just Apache if you want though there are some risks. Otherwise, you don't need a web server in the host except for the reasons I've given. You only need the web server in the guest OS's. – Julian Knight Mar 03 '13 at 14:43
-
Alright got it now.I am new to all these,sorry if i sound like a moron, so if there is web sever instance within a container can a user in another session access it? What about MySQL?should it also be installed on a per container basis. – charmin Mar 04 '13 at 09:54
-
No worries, we all have to start at the beginning. MySQL is the same really. You could create a VM purely for MySQL if you wanted to, the web servers could all reference it. But if to want to totally separate the data (perhaps all of the VMs are for different customers) then you can run it in each VM - just be aware of the overheads you are introducing by having multiple instances of all of these services. – Julian Knight Mar 04 '13 at 13:23
-
Great! Now with apache running on individual cotainers, can I host a website or something similar in them? – charmin Mar 05 '13 at 04:36
-
Yes, you can host as many web sites in a single Apache instance as you like. Within the limits of the resources you've assigned to the guest OS. – Julian Knight Mar 05 '13 at 08:38